AutoTraj (包含Dsft和Dself两个子数据集)
收藏资源简介:
AutoTraj是由东南大学和中国科学技术大学联合构建的面向工具集成推理(TIR)任务的专用数据集,包含两个核心子集:Dsft通过大语言模型修复低质量工具使用轨迹生成,用于监督微调训练;Dself由修复后轨迹与原低质轨迹配对构成,支持轨迹级奖励模型训练。数据集覆盖数学推理和知识密集型推理场景,通过多维度评估(答案正确性、置信度等)确保轨迹质量,旨在解决TIR中监督信号稀疏和轨迹质量偏差问题。
AutoTraj is a specialized dataset dedicated to the Tool Integration Reasoning (TIR) task, jointly developed by Southeast University and the University of Science and Technology of China. It comprises two core subsets: Dsft, which is generated by repairing low-quality tool-use trajectories with large language models (LLMs) and intended for supervised fine-tuning training; and Dself, which consists of paired data of repaired trajectories and original low-quality trajectories, supporting trajectory-level reward model training. The dataset covers scenarios of mathematical reasoning and knowledge-intensive reasoning, and ensures trajectory quality via multi-dimensional evaluations such as answer correctness and confidence level. It aims to solve the problems of sparse supervision signals and biased trajectory quality in TIR tasks.
AutoTraj数据集概述
数据集基本信息
- 数据集名称:AutoTraj
- 主要用途:用于训练和评估轨迹生成模型,支持监督微调(SFT)、强化学习(RL)和工具集成推理(TIR)评估。
数据集内容与结构
- SFT阶段数据集:包含高质量轨迹数据,文件为
sft_high_quality_trajectory_masked.json,需放置在LLaMA-Factory/data/目录下。 - 奖励模型数据集:包含比较对数据,文件为
rm_compare_pairs_masked.json,需放置在LLaMA-Factory/data/目录下。 - 数据集注册:需在
LLaMA-Factory/data/dataset_info.json文件中注册上述数据集。
数据处理与训练流程
1. 监督微调(SFT)
- 环境依赖:通过
for_sft_requirements.txt安装。 - 训练框架:基于LLaMA-Factory。
- 配置步骤:
- 准备数据集并放置到指定路径。
- 在
dataset_info.json中注册数据集。 - 配置训练文件
qwen_sft_autotraj.yaml。 - 运行训练脚本
train_sft.sh。
2. 奖励模型训练
- 数据集:使用
rm_compare_pairs_masked.json。 - 配置步骤:
- 准备数据集并注册。
- 编辑配置文件
qwen_lora_reward.yaml。 - 运行训练脚本
train_rm.sh。
3. 强化学习(RL)阶段
- 环境依赖:通过
grpo_requirements.txt安装。 - 训练框架:基于VERL和Tool-Star。
- 核心组件:
- 滚动实现:
src/verl/verl/workers/rollout/vllm_rollout/vllm_rollout.py - 奖励计算:
src/verl/verl/utils/reward_score
- 滚动实现:
- 训练步骤:
- 配置训练脚本
run_tool_star.sh。 - 启动奖励模型服务
rm_server.sh。 - 运行RL训练
run_tool_star.sh。
- 配置训练脚本
- 模型转换:使用
Tool_Star_RL/model_merger.py将RL检查点转换为Hugging Face格式。
4. TIR评估
- 环境依赖:通过
inference_requirements.txt安装。 - 检索服务:基于FlashRAG和FastAPI部署Wikipedia检索服务。
- 资源准备:需下载预索引的Wikipedia、Wikipedia语料库及对应的检索模型。
- 服务配置:编辑
evaluation/search/serving_config.yaml,填写检索模型路径、索引路径、语料库路径和可用GPU ID。 - 服务启动:运行
host_wiki.py启动检索服务。 - 推理生成:运行
AutoTraj/trajectory_generate/start_generate.sh进行轨迹生成。
注意事项
- 训练前需确保所有数据集路径配置正确。

- 1Guided by Trajectories: Repairing and Rewarding Tool-Use Trajectories for Tool-Integrated Reasoning东南大学·计算机科学与工程学院; 中国科学技术大学·认知智能国家重点实验室 · 2026年



