Skip to content

fix(grpo): align prompt format across SFT, GRPO, and CoT warmup #43

@abrichr

Description

@abrichr

Problem

Three different prompt formats exist in the codebase creating distribution shift:

  • SFT (next_action.py): includes action history, "Thought: ..." format, step counter
  • GRPO (trainer.py _build_agent_messages): "Goal: ..." with no history or thought
  • CoT warmup (cot_warmup.py): "Instruction: ..." prefix, different history format

The model trained on SFT encounters different prompts during GRPO, degrading early GRPO performance.

Proposed Fix

All three should use a shared prompt builder with configurable components (history, thought, step counter). This ensures the distribution seen during SFT matches what the model encounters during GRPO rollouts.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions