THUDM / THUDM/slime

[Proposal] TCOD — extending slime's On-Policy Distillation to multi-turn agents

Open
#2,002 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

question
Dominant language
Python
Stars
8.5k
Forks
1.3k
Avg merge
5h 36m
Merged PRs (30d)
22

Description

Your Question

I'd like to bring TCOD (a published method, arXiv:2604.24005) to slime: on-policy distillation for multi-turn agents with a temporal curriculum — essentially the multi-turn extension of your existing single-turn OPD example (examples/on_policy_distillation). It is not yet implemented in any RL framework, so I'm asking where it best fits before writing any slime-specific code, rather than showing up with an unsolicited recipe PR. Two concrete questions:

  1. Does slime support multi-turn agent rollouts (LLM → env step → repeat) that TCOD's curriculum would hook into? Your current OPD example is single-turn (math), so if multi-turn agent rollout isn't a supported path yet, TCOD probably belongs in a standalone repo instead of the core examples.
  2. If multi-turn rollout is supported, would you accept TCOD as an example sibling to examples/on_policy_distillation (lightweight, CI/run-verifiable)? If not, would you be open to linking a standalone TCOD repo from the slime README — the path CONTRIBUTING points to for algorithm-style projects?

Either way I'm not proposing large refactors or new abstractions into the core.

What I've Tried
  • Read CONTRIBUTING and checked TCOD against your scope, which is why I'm opening a question first instead of a PR.
  • Studied examples/on_policy_distillation: a Qwen3-8B student imitates a Qwen3-32B teacher by matching token-level log-probs as a KL penalty on top of the advantage estimator (Math500 76% → 94%), single-turn, with sglang / megatron teacher modes. TCOD reuses this same on-policy KL-to-teacher objective.
  • TCOD itself (in the paper): single-turn OPD applied to multi-turn agents is unstable — errors compound across turns, per-turn KL grows with turn index, trajectory KL escalates and success rate collapses. TCOD keeps the standard KL-to-teacher objective but grows the trajectory depth k exposed to the student short→long (k = min(k_start + floor(n/η), k_max)), in two variants: F2B (student rolls out only the first k steps, drop-in) and B2F (teacher replays the first L-k steps to seed the student, then student takes the remaining k). Reported gains: +up to ~15 SR over vanilla OPD, stable KL, ~32% less training time.
Environment (if relevant)

No response

Additional Context
Pre-submission Checklist

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with CONTRIBUTING.md and the existing examples/on_policy_distillation entry point, then determine whether slime supports the multi-turn rollout path described in the issue. Done means establishing whether TCOD belongs as a verifiable sibling example or should remain a standalone project linked from the README.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
ai, machine-learning
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.