Skip to content

[D1 轨迹飞轮] 轨迹导出 CLI(SFT / DPO-pair / GRPO-prompt 三格式) #51

Closed

Description

@dahai80

背景

Fusion 演进方案 D1 要求将清洗后的轨迹导出为训练数据集。详见 architecture/future-mlx-landing-plan.md。

现状

  • issue-fc-1 建立汇聚目录与 is_error 标注后,需进一步格式化为训练可消费的标准格式
  • PRD 要求三格式:SFT / DPO 偏好对 / GRPO prompt

需求

提供轨迹导出 CLI,输出三种格式(消费方为 fusion-trainer):

  1. SFT 数据集:抽取纯净的 System - User - Thought - Tool Call - Tool Response - Final Answer 标准轨迹(is_error=false 的成功轨迹)
  2. DPO 偏好对:利用同一需求下失败与成功的多次尝试,构建 Pairwise 偏好对(is_error=true 的失败轨迹作 rejected,对应成功轨迹作 chosen)
  3. GRPO prompt:导出 prompt + 可校验 reward 信号(沙盒运行状态)

验收

  • CLI 可分别导出三种格式到指定目录
  • SFT 样本格式符合 messages-JSONL(ShareGPT 兼容)
  • DPO 偏好对字段:prompt / chosen / rejected
  • 单 session 抽样可产出 ≥1 条 SFT + ≥1 条 DPO 对

关联

  • 演进方案:architecture/future-mlx-prd.md 方向 1
  • 落地分工:architecture/future-mlx-landing-plan.md D1 / Phase A2
  • 依赖:issue-fc-1(汇聚目录与标注)
  • 下游:fusion-trainer issue-tr-4

Activity

  1. added
    enhancement
    on Aug 5, 2026
  2. added a commit that references this issue on Aug 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions