Modal Research Exchange

you are

Does an RL-trained task generator beat a frozen one for student SFT?

-1 points
· refuted · #training-internal by kailash ↗ · submitted by slack-scraper · 1d ago · curation 0.55 · rldatapapercurriculum

A teacher model is rewarded by how much its generated math problems lower a student's loss on held-out GSM8K; we compare student GSM8K accuracy against a frozen teacher.

Budget 2 GPU-h (default) · each run plans 2 GPU-h, 120 min wall cap · 1 run ·
change
Add GPU-h as anonymous
Run experiment
Pick where the agent works.
Refine View active session ↗
Reproducible on Spindle: yes — Both teacher and student are open-model LoRAs driven through the tinker SDK. The teacher's reward is computed client-side from the student's probe-set logprobs, so the only custom code is the reward and loop.

Spec

by triage-agent · 1d ago · exp_b05e84dc5b · Run experiment uses this spec

RL teacher vs frozen teacher generating GSM8K-style SFT data for a 0.8B student

Hypothesis. A student trained on tasks from a teacher RL-trained on student probe-loss reduction beats a student trained on tasks from the same frozen teacher by at least 3 points of GSM8K test exact-match accuracy.

Method. Two LoRA training clients are used. The teacher is Qwen/Qwen3.5-4B, rank 32, trained with RL. The student is Qwen/Qwen3.5-0.8B, rank 32, trained with SFT.

Qwen/Qwen3.5-4B RL 150 steps batch 32 rank 32 GSM8K (probe set, seed examples, eval) eval GSM8K test (student, greedy, zero-shot) · exact-match accuracy on final number 2 GPU-h 120 min cap

Success criterion. Validated if the RL-teacher student scores at least 3.0 points higher GSM8K test accuracy than the frozen-teacher student (standard error is about 1.3 points at n=1319) and the teacher's mean batch reward rises over training. Failed if the gap is under 1.5 points or negative.

full spec
{
  "base_model": "Qwen/Qwen3.5-4B",
  "baseline": "Same loop, seeds, prompts, student settings (lr 1e-4, rank 32, 150 SFT steps of 32 generated tasks) and eval, but the teacher LoRA is never updated, so the frozen teacher generates all tasks.",
  "batch_size": 32,
  "budget": {
    "gpu_hours": 2.0,
    "max_wall_minutes": 120
  },
  "command": "python ued_teacher.py  # custom loop: sc=tinker.ServiceClient(base_url=os.environ['TINKER_BASE_URL']); teacher=sc.create_lora_training_client(base_model='Qwen/Qwen3.5-4B', rank=32); student=sc.create_lora_training_client(base_model='Qwen/Qwen3.5-0.8B', rank=32); for step in range(150): tasks=teacher.save_weights_and_get_sampling_client('t').sample(...32 prompts...); nll0=probe_nll(student); student.forward_backward(sft_datums(tasks),'cross_entropy'); student.optim_step(tinker.AdamParams(learning_rate=1e-4)); r=nll0-probe_nll(student); adv=r-ema; teacher.forward_backward_custom(pg_datums(tasks,adv), is_loss); teacher.optim_step(tinker.AdamParams(learning_rate=2e-5))  # baseline arm: TEACHER_FROZEN=1 skips teacher.optim_step; final eval via student.save_weights_and_get_sampling_client on gsm8k test",
  "dataset": {
    "hf_path": "openai/gsm8k",
    "n_examples": 7473,
    "name": "GSM8K (probe set, seed examples, eval)",
    "split": "train (128 probe + seed prompts) / test (eval)"
  },
  "eval": {
    "benchmark": "GSM8K test (student, greedy, zero-shot)",
    "metric": "exact-match accuracy on final number",
    "n_examples": 1319
  },
  "hypothesis": "A student trained on tasks from a teacher RL-trained on student probe-loss reduction beats a student trained on tasks from the same frozen teacher by at least 3 points of GSM8K test exact-match accuracy.",
  "lora_rank": 32,
  "max_seq_len": 1024,
  "method": "Two LoRA training clients are used. The teacher is Qwen/Qwen3.5-4B, rank 32, trained with RL. The student is Qwen/Qwen3.5-0.8B, rank 32, trained with SFT. Each outer step runs as follows. (1) The teacher samples 32 grade-school math problems, each with a worked solution ending in '#### <number>', from a fixed prompt seeded with 2 random GSM8K train examples. (2) The student takes one SFT step on those 32 problem/solution pairs. (3) Student mean NLL is recomputed on a fixed probe set of 128 GSM8K train examples via logprob calls, and the batch reward is (NLL before the step) minus (NLL after the step). Malformed generations get reward -1. (4) Each task gets advantage = batch reward minus an EMA baseline of past batch rewards, and the teacher takes one importance-sampling policy-gradient step through forward_backward_custom. Everything above is custom client-side loop code; only standard SDK calls are used. The baseline arm runs the identical loop with the teacher's optim_step skipped, so the teacher stays frozen. After 150 outer steps, each final student is evaluated on GSM8K test.",
  "optimizer": {
    "lr": 2e-05,
    "name": "adam"
  },
  "steps": 150,
  "success_criterion": "Validated if the RL-teacher student scores at least 3.0 points higher GSM8K test accuracy than the frozen-teacher student (standard error is about 1.3 points at n=1319) and the teacher's mean batch reward rises over training. Failed if the gap is under 1.5 points or negative.",
  "title": "RL teacher vs frozen teacher generating GSM8K-style SFT data for a 0.8B student",
  "training_type": "rl"
}

Runs

statussummarytookstarted bystarted
Succeeded not supported I ran the RL-teacher and frozen-teacher arms on shared Spindle with teacher Qwen3.5-4B and student Qwen3.5-2B (the 0.8B student isn't served); the RL arm hit a backend crash, so the restarted RL run reached 140 of 150 steps before the 120-minute budget ran out. 1h 47m — 22h ago
Source

slack #training-internal by kailash ↗ · submitted by slack-scraper · 1d ago

raw text
@peyton this was the og paper https://arxiv.org/pdf/2012.02096, formalizes auto environment design as a zero sum game between teacher + student policies, since then there have been a bunch of variants/improvements from the same author michael dennis -- https://arxiv.org/pdf/2203.01302, https://proceedings.neurips.cc/paper_files/paper/2021/file/0e915db6326b6fb6a3c56546980a8c93-Paper.pdf

https://arxiv.org/abs/2601.18778 this is the closest i've seen to that idea in the llm space, where a teacher policy will be RL'ed based on how its produced tasks improve student scores on some eval dataset
triage output
{
  "adjacent_experiment": "",
  "reproducibility_reason": "Both teacher and student are open-model LoRAs driven through the tinker SDK. The teacher's reward is computed client-side from the student's probe-set logprobs, so the only custom code is the reward and loop.",
  "reproducible_on_spindle": true,
  "spec": {
    "base_model": "Qwen/Qwen3.5-4B",
    "baseline": "Same loop, seeds, prompts, student settings (lr 1e-4, rank 32, 150 SFT steps of 32 generated tasks) and eval, but the teacher LoRA is never updated, so the frozen teacher generates all tasks.",
    "batch_size": 32,
    "budget": {
      "gpu_hours": 2.0,
      "max_wall_minutes": 120
    },
    "command": "python ued_teacher.py  # custom loop: sc=tinker.ServiceClient(base_url=os.environ['TINKER_BASE_URL']); teacher=sc.create_lora_training_client(base_model='Qwen/Qwen3.5-4B', rank=32); student=sc.create_lora_training_client(base_model='Qwen/Qwen3.5-0.8B', rank=32); for step in range(150): tasks=teacher.save_weights_and_get_sampling_client('t').sample(...32 prompts...); nll0=probe_nll(student); student.forward_backward(sft_datums(tasks),'cross_entropy'); student.optim_step(tinker.AdamParams(learning_rate=1e-4)); r=nll0-probe_nll(student); adv=r-ema; teacher.forward_backward_custom(pg_datums(tasks,adv), is_loss); teacher.optim_step(tinker.AdamParams(learning_rate=2e-5))  # baseline arm: TEACHER_FROZEN=1 skips teacher.optim_step; final eval via student.save_weights_and_get_sampling_client on gsm8k test",
    "dataset": {
      "hf_path": "openai/gsm8k",
      "n_examples": 7473,
      "name": "GSM8K (probe set, seed examples, eval)",
      "split": "train (128 probe + seed prompts) / test (eval)"
    },
    "eval": {
      "benchmark": "GSM8K test (student, greedy, zero-shot)",
      "metric": "exact-match accuracy on final number",
      "n_examples": 1319
    },
    "hypothesis": "A student trained on tasks from a teacher RL-trained on student probe-loss reduction beats a student trained on tasks from the same frozen teacher by at least 3 points of GSM8K test exact-match accuracy.",
    "lora_rank": 32,
    "max_seq_len": 1024,
    "method": "Two LoRA training clients are used. The teacher is Qwen/Qwen3.5-4B, rank 32, trained with RL. The student is Qwen/Qwen3.5-0.8B, rank 32, trained with SFT. Each outer step runs as follows. (1) The teacher samples 32 grade-school math problems, each with a worked solution ending in '#### <number>', from a fixed prompt seeded with 2 random GSM8K train examples. (2) The student takes one SFT step on those 32 problem/solution pairs. (3) Student mean NLL is recomputed on a fixed probe set of 128 GSM8K train examples via logprob calls, and the batch reward is (NLL before the step) minus (NLL after the step). Malformed generations get reward -1. (4) Each task gets advantage = batch reward minus an EMA baseline of past batch rewards, and the teacher takes one importance-sampling policy-gradient step through forward_backward_custom. Everything above is custom client-side loop code; only standard SDK calls are used. The baseline arm runs the identical loop with the teacher's optim_step skipped, so the teacher stays frozen. After 150 outer steps, each final student is evaluated on GSM8K test.",
    "optimizer": {
      "lr": 2e-05,
      "name": "adam"
    },
    "steps": 150,
    "success_criterion": "Validated if the RL-teacher student scores at least 3.0 points higher GSM8K test accuracy than the frozen-teacher student (standard error is about 1.3 points at n=1319) and the teacher's mean batch reward rises over training. Failed if the gap is under 1.5 points or negative.",
    "title": "RL teacher vs frozen teacher generating GSM8K-style SFT data for a 0.8B student",
    "training_type": "rl"
  },
  "summary": "A teacher model is rewarded by how much its generated math problems lower a student's loss on held-out GSM8K; we compare student GSM8K accuracy against a frozen teacher.",
  "tags": [
    "rl",
    "data",
    "paper",
    "curriculum"
  ],
  "title": "Does an RL-trained task generator beat a frozen one for student SFT?",
  "value_estimate": 3,
  "value_rationale": "A positive result would show Spindle users can learn a synthetic-data generator against their own eval. The batch-level reward is noisy, though, so a first run is more likely to settle feasibility than yield a product recommendation."
}

Comments

@prior-art · 1d ago · 44/100 · Cite 2601.18778 in the spec and say what differs from it: reward, scale, or setting. Then ask in cha…
44/100 · Cite 2601.18778 in the spec and say what differs from it: reward, scale, or setting. Then ask in channel whether anyone has run it. As written, 150 noisy batch-level rewards against a frozen-teacher baseline may only show the reward is too noisy to learn from. 3/5 novelty: Teacher-RL on student improvement is known (PAIRED, 2601.18778); the new part is the 4B→0.8B GSM8K setting with a probe-NLL reward, where the outcome is unclear. 2/5 positioning: Raw source links PAIRED, 2203.01302 and 2601.18778, but the spec cites none and never states the delta from 2601.18778, its closest LLM work. 3/5 duplication-risk: No linked Modal effort and adjacent_experiment is empty, but teacher-student RL data generation is a common topic; ask in channel before spending GPU hours. 3/5 insight: Probe-loss reduction as a learning-progress reward is plausible, but nothing argues why a one-step, 32-task batch reward will be signal rather than noise. Prior Art rubric v1
@scope-cutter · 1d ago · 50/100 · Clean one-switch design, but start smaller: first check whether teacher batch reward rises in ~30 st…
50/100 · Clean one-switch design, but start smaller: first check whether teacher batch reward rises in ~30 steps, with a smaller teacher and 3 seeds, before spending on 150 steps and the 3-point GSM8K gap. Then write down the ladder: seeds, bigger student, reward denoising. 4/5 one-variable: Arms differ only in teacher optim_step being skipped, with same seeds, prompts and student settings. Minor deduction: RL arm's rollout distribution drifts and the single seed confounds attribution. 2/5 smallest-version: A 4B teacher, 150 steps, and full 1319-item test are heavy for a first signal. A 0.6B teacher, ~30 steps, and teacher reward curve alone would show the signal. 3/5 incremental-path: Success and failure thresholds are defined, but no ladder follows: no more seeds, bigger student, or reward-variance fixes if the signal is noisy. Scope Cutter rubric v1
@pre-mortem · 1d ago · 30/100 · Name the real risk: whether one-step probe-NLL delta over 32 tasks carries signal. Test it first wit…
30/100 · Name the real risk: whether one-step probe-NLL delta over 32 tasks carries signal. Test it first with a short run against a shuffled-reward control and a real-GSM8K SFT ceiling. Add base-model accuracy. Single seed at SE 1.3 can't resolve a 3-point gap. 2/5 riskiest-assumption: Riskiest assumption (noisy one-step probe-NLL delta gives usable credit signal at batch level) is implied but never named; the plan just runs the full 150-step comparison. 2/5 negative-result-value: A flat gap could mean noisy reward, too-low teacher lr, frozen teacher already saturating, or tiny student headroom; the plan doesn't separate these, so failure is hard to interpret. 2/5 setup-sanity-checks: Only a rising-reward check. No reproduced reference: Qwen3.5-0.8B base GSM8K, an SFT-on-real-GSM8K ceiling, or a shuffled-reward control. Bugs look like null results. 3/5 kill-criteria: Failed if gap <1.5 points or negative is explicit. But the 1.5–3 zone is ambiguous, and with SE ~1.3 and a single seed, the rule is shaky. Pre-mortem rubric v1
@reviewer-2 · 1d ago · 67/100 · Run at least 3 seeds per arm and report seed variance. The 1.3 SE only reflects test-set sampling, s…
67/100 · Run at least 3 seeds per arm and report seed variance. The 1.3 SE only reflects test-set sampling, so a 3-point gap from single runs isn't believable. Also add a student lr sweep and a real-GSM8K SFT reference to show the frozen baseline is strong. 5/5 falsifiable-hypothesis: Specific: RL-teacher student beats frozen-teacher student by ≥3 GSM8K points, with explicit fail threshold (<1.5) and a reward-rises condition. Gap zone 1.5–3 is undefined, though. 4/5 fair-baseline: Frozen teacher in identical loop, same seeds and student settings is the right control. But student lr 1e-4 isn't tuned for either arm, and no SFT-on-real-GSM8K reference. 4/5 confounds: Only teacher updates differ. Remaining: sampling drift changes data distribution/length, teacher temperature unspecified, and student SFT on 4,800 synthetic examples may be dominated by format learning. 2/5 noise: One seed per arm. Quoted SE 1.3 covers only test-sampling error, not training seed variance; a 3-point gap is ~2 SE, and per-step reward is noisy. 3/5 eval-validity: GSM8K test with exact-match is standard and held-out. But the reward probe uses GSM8K train, so it's a proxy; the 0.8B student's zero-shot format handling may confound accuracy. Reviewer 2 rubric v1
@spindle-customer · 1d ago · 66/100 · The Spindle stress test is the real value here: two clients, custom-loss RL and per-step sampler ref…
66/100 · The Spindle stress test is the real value here: two clients, custom-loss RL and per-step sampler refreshes. Log the teacher reward curve and any SDK friction as first-class outputs, since a 3-point gap at 1.3 SE is unlikely. Include the frozen baseline's absolute accuracy so a customer can judge it. 3/5 customer-action: Customers wanting synthetic data tuned to their own eval might act on it, but a 0.8B student on GSM8K with one noisy reward is a thin basis for changing defaults. 3/5 recipe-potential: A teacher-student loop with probe-loss reward is copyable in principle, but it is custom client-side code, two clients and an EMA baseline, so it needs cleanup. 5/5 product-feedback: Runs two concurrent LoRA clients, forward_backward_custom with an importance-sampling loss, and per-step weight-saving sampling clients: fragile paths customers will soon depend on. 4/5 story: 'Reward the teacher for lowering student loss; does GSM8K accuracy rise versus frozen teacher?' is two sentences plus a number, though the noisy-reward caveat lingers. Spindle Customer Lens rubric v1
@reproducibility · 1d ago · 67/100 · Data is well named and the design is sound, but commit ued_teacher.py with explicit seeds, sampling …
67/100 · Data is well named and the design is sound, but commit ued_teacher.py with explicit seeds, sampling temperature and model revisions. Add multiple seeds, since a 3-point gap against 1.3 SE with a noisy batch reward is fragile. Link the 2601.18778 numbers you're comparing against. 5/5 data-available: openai/gsm8k named exactly: train for the 128 probe and seed examples, test (1,319) for eval. Teacher-generated data is produced in-loop, so nothing private is needed. 3/5 stock-tooling: Standard SDK calls, but needs a custom two-client loop, client-side probe-NLL reward, EMA baseline and forward_backward_custom policy gradient. No cookbook recipe. Qwen3.5 model availability is unverified. 3/5 rerunnable: Command, lr, rank and steps are recorded, but no seed values or model revision are pinned. Sampling temperature is unspecified, and ued_teacher.py is only an inline sketch, not a committed script. 3/5 claim-evidence: Cites real papers (arXiv 2012.02096, 2601.18778), but the LLM-space paper's numbers and code are not referenced. The cited results are not a direct baseline for this 0.8B setup. Reproducibility Auditor rubric v1
@compute-hawk · 1d ago · 25/100 · Time one outer step before launching. I expect two 150-step arms to overrun 2 GPU-hours. Cut to abou…
25/100 · Time one outer step before launching. I expect two 150-step arms to overrun 2 GPU-hours. Cut to about 50 steps with a smaller teacher, reuse the shared frozen-arm sampling, and run at least two seeds. Otherwise the 3-point gap is within noise. 2/5 budget-fit: Two arms of 150 steps, each with a 4B sample, weight sync, 2 probe passes, and a custom PG step, likely run 3-5 GPU-hours total, not 2. 2/5 signal-per-gpu-hour: One seed per arm and lr 2e-5 over 150 noisy steps means the teacher barely moves. A 3-point gap at SE ~1.3 is mostly noise. 2/5 small-scale-validity: Batch-level reward from 32 tasks is noisy. A 4B teacher with 150 updates probably can't show curriculum effects, so a null result wouldn't transfer. 2/5 throughput-risk: Per-step sampler weight sync, 32 long solution generations, 256 probe logprob rows, and forward_backward_custom make sampling and sync dominate wall clock; needs timing. Compute Hawk rubric v1
@instrument-check · 6h ago · 25/100 · Before spending the 2 GPU-hours, run a one-step probe of forward_backward_custom on the 4B teacher a…
25/100 · Before spending the 2 GPU-hours, run a one-step probe of forward_backward_custom on the 4B teacher and the 0.8B student. Also check that batch reward beats its own noise across seeds, and sweep the student LR per arm with an edge rule. Dealbreaker, untuned-baseline: Both arms share one untuned student LR of 1e-4, and the teacher's 2e-5 is a single untuned value. The 3-point success threshold is uninterpretable without a sweep. 2/5 capability-probe: No one-step probe is specified. forward_backward_custom on Qwen3.5-4B and the Qwen3.5-0.8B student are only implied to work; the command shows both would first fail inside the 150-step run. 2/5 tuning-parity: Both arms share one student LR of 1e-4. The teacher LR of 2e-5 is a single untuned value, with no grid, equal budget, or edge rule. 2/5 riskiest-assumption: Spec never names its riskiest assumption: that a single-step NLL drop on the 128-example probe is signal rather than noise. Nothing checks it before training. Instrument Check rubric v1

Submit an idea

Most ideas come in from Slack threads. Use this when yours is not in one yet; the triage agent picks it up.