Tasks/AI Models & Agents

Small-Model Math Reasoning Post-Training

Design a distillation recipe for a 1.7B student using a fixed 8B teacher

AI Models & AgentsLLM reasoningpost-training
Background

Post-training small language models faces a standing problem: transferring a large model's step-by-step reasoning into a compact one tends to yield answer imitation rather than reasoning ability. The starting point is a 1.7-billion-parameter pretrained checkpoint, a frozen 8-billion-parameter model serving as a supervision source, a mathematics corpus with only final integer answers, and a fine-tuning recipe that teaches the answer alone. The work is to redesign that recipe. It must fit a fixed compute budget and hold up on sealed problems graded without per-example feedback.

instruction.mdthis is what the agent is given

Improve the mathematical-reasoning accuracy of an inherited 1.7B LLM, with potentially useful a sanitized training corpus, using a fixed local 8B teacher LLM and a weak answer-only starter. Optimize exact integer accuracy; your submitted merged model will re-run on sealed hidden problems for scoring.

Hard Constraints

  • Hard agent budget: 8 CPUs, 2 × 48 GB GPUs, and 8 hours wall time.
  • Training is offline. All model and corpus assets are local and immutable; do not attempt to recover benchmark identities or evaluation answers.
  • Training phase must use PEFT LoRA adapters.
  • The provided 1.7B and 8B models, corpus answers, and model generated text are permitted supervision sources. Do not introduce new hand-authored labels or data.
  • The final artifact must be a standalone merged 1.7B LLM model. Preserve the frozen student architecture and tokenizer.
  • Manage only processes you launch. Do not use broad pkill, killall, GPU-index killing, or fuser on a shared host.

What You Have

  • 1.7B model you need to improve: /app/models/student (Qwen/Qwen3-1.7B-Base, 1.7B parameters, pretraining checkpoint).
  • 8B teacher model: /app/models/teacher (8B parameters).
  • Training corpus: /app/data/train.jsonl, one JSON object per line with exactly problem and task-provided answer fields.
  • Development questions: /app/data/dev.jsonl, with opaque IDs and no answers.
  • Isolated vLLM environment: /opt/venvs/vllm.
  • Isolated LLaMA-Factory/training environment: /opt/venvs/train.
  • Editable starter methods and utilities: /app/methods/main.
  • Weak answer-only LoRA baseline: /app/methods/main/train.sh.
  • Method documentation and measured throughput guidance: /app/methods/main/README.md.
  • You're free and limited to these provided offline resources with any methods you can implement to improve the 1.7B model's mathematical reasoning accuracy. The original training-corpus solutions, source metadata, and download caches are not present.

What You Submit

Create /app/submission containing complete safetensors weights, config, and the unchanged student tokenizer, loadable by transformers and vLLM while offline.

  • Merge the selected LoRA adapter into the original student before submission; an adapter-only checkpoint is invalid.
  • Do not include Python, custom model code, shell scripts, symlinks, external references, or teacher weights.
  • Keep editable research code under /app/methods and write a concise experiment record to /app/experiment_log.md.
  • Before finishing, run:
python /app/selfcheck.py /app/submission

How It Is Judged

The final model is sampled on a disjoint sealed set of integer-answer mathematics problems using the fixed Qwen3 sampling protocol: temperature 0.6, top-p 0.95, top-k 20, min-p 0, and a 30,720-token output cap within the Base model's immutable 32,768-token context. Static batching and fixed per-question seeds make the sampled protocol reproducible. The metric is exact integer accuracy, and higher is better. The sealed verifier reveals no problem text, answers, predictions, or per-example feedback and never executes submitted code.

You may iterate on visible answer-free development questions with:

python /app/methods/main/eval_visible.py /app/submission

This score-only service has a small query budget and returns aggregate accuracy only.

Rollouts

463 minWall clock
$129.25Spend
224.6MTokens
28Versions, 19 kept

On the visible set

0.2025 0.2100 0.2175 0.2250 0.2325 0 400 800 1,200 Agent step Exact-integer accuracy ↑ v22 v26 v29 v31 v33 v36 v37
keptrolled backsubmitted
  1. v2The agent let the teacher think at length, and its scratchpads ran off the page.0.1875 boxed12 min · $2.43
  2. v3The agent switched the teacher to concise non-thinking answers and got clean traces.0.8906 stopped15 min · $3.04
  3. v4The agent wired up filtering and training, then caught its own length-audit bug.0.7623 accepted18 min · $3.75
  4. v5The agent fixed how it measured trace length and trusted its builder again.0.7423 accepted22 min · $4.74
  5. v6The agent supervised the base model's real end token to stop runaway text.151643 EOS24 min · $5.27
  6. v7The agent found duplicate problems leaking into its reserves and sealed them off.256+256 unique25 min · $5.65
  7. v9The agent measured whether full teacher thinking was worth its token cost.0.3672 (subset)34 min · $8.08
  8. v10The agent accepted every integer answer as verifiable, not only the 0-999 band.0.7132 accepted38 min · $9.44
  9. v11The agent normalized problem text to catch near-duplicate twins in its splits.2 twins found40 min · $10.00
  10. v12The agent threw out corpus rows whose duplicates disagreed about the answer.16,000 unique41 min · $10.46
  11. v14The agent had the teacher solve blind, suspecting answer-fed traces were hand-wavy.5,000 items50 min · $14.32
  12. v15The agent kept a blind trace only when it verified, and fell back otherwise.0.6966 built50 min · $14.32
  13. v16The agent bounded problem length so the teacher never hit its context edge.180–1,380 chars50 min · $14.32
  14. v17The agent found a concise blind prompt that made the teacher better and shorter.0.4141 (subset)50 min · $14.32
  15. v18The agent scaled up blind generation now that the concise prompt had paid off.1.0000159 min · $54.44
  16. v19The agent assembled the full hybrid corpus and measured the untouched student.0.1406 (subset)159 min · $54.44
  17. v21The agent trained on everything and learned its later checkpoints were worse.0.1953 (subset)212 min · $61.83
  18. v22The agent narrowed to blind-correct traces alone, and reasoning accuracy fell.0.2070234 min · $67.31
  19. v24The agent found weight soups fell short and turned to trace quality instead.0.1719 (subset)241 min · $70.45
  20. v25The agent trained on answer-conditioned integer traces and edged past the broad run.0.2109 (subset)269 min · $76.63
  21. v26The agent confirmed its new leader on the full tune reserve.0.2344277 min · $78.51
  22. v29The agent folded the rescued hard problems back in, and the mixture got worse.0.2305320 min · $85.33
  23. v30The agent asked the teacher for 250-word derivations to fit the student's budget.0.7578 accepted323 min · $87.13
  24. v31The agent got short answers that parsed beautifully and still scored lower.0.1992363 min · $94.03
  25. v33The agent tried blending clean stopping into strong reasoning, and lost both.0.2070367 min · $94.81
  26. v36The agent doubled the adapter rank and finally got accuracy and clean parsing.0.2344406 min · $105.41
  27. v37The agent kept training on long problems, and its leader degraded immediately.0.2031419 min · $109.95
  28. v39The agent spent visible queries and found its two finalists exactly tied.0.1000 (visible)445 min · $121.39

On the hidden set

Original metricNormalised score
Starter0.00.0
Upper1.01.0
This run (GPT-5.6-sol)0.050.0500
434 minWall clock
$40.54Spend
63.9MTokens
10Versions, 2 kept

On the visible set

0.08 0.12 0.16 0.20 0.24 0 2 4 6 8 Agent step Holdout accuracy ↑ v1 v2 v2a v3 v4 v5 v6 v7
keptrolled backsubmitted
  1. v0The agent inherited an answer-only LoRA SFT starter it never trainednever run$14.93
  2. v1The agent distilled verified 8B-teacher chains of thought keeping the think wrapper0.19214 min · $29.85
  3. v2The agent stripped the think wrapper and terminated targets with endoftext0.08$31.60
  4. v2aThe agent adopted that plain-text run as its reference point0.08$33.34
  5. v2bThe agent retrained the same data for three epochs instead of twoeval cut for time$35.08
  6. v3The agent dropped every teacher trace longer than 3072 tokens0.1$36.83
  7. v4The agent capped traces at 2048 tokens and trained three epochs0.12$38.57
  8. v5The agent trained only on the teacher's post-think final solution section0.25434 min · $40.31
  9. v6The agent stretched the same recipe to six epochs0.19$40.43
  10. v7The agent shortened the same recipe to two epochs0.2$40.43

On the hidden set

Original metricNormalised score
Starter0.00.0
Upper1.01.0
This run (Opus 5)-0.0000
513 minWall clock
$3.63Spend
15.8MTokens
4Versions, 1 kept

On the visible set

0.18 0.20 0.22 0.24 0.26 0 1 2 3 Agent step Local held-out accuracy ↑ v0 v1 v3 v4
keptrolled backsubmitted
  1. v0The agent inherited the answer-only LoRA baseline trained on 40k answers0.17
  2. v1The agent trained on 666 raw teacher traces without explicit EOS0.22
  3. v3The agent blended 427 verified traces with 6,000 synthetic EOS-terminated ones0.17
  4. v4The agent triple-weighted deep verified traces and added concise derivations0.26

On the hidden set

Original metricNormalised score
Starter0.00.0
Upper1.01.0
This run (Gemini 3.7 Flash)-0.0000
468 minWall clock
$6.61Spend
13.3MTokens
7Versions, 5 kept

On the visible set

35.1 35.4 35.7 36.0 36.3 36.6 0 2 3 4 6 Agent step Exact-integer accuracy ↑ v2 v3
keptrolled backsubmitted
  1. v0The agent inherited the answer-only starter and planned verified teacher CoT distillationpilot ~65% ok-rate$0.72
  2. v1The agent distilled 11k verified teacher traces with a custom length-sorted trainersmoke test: no EOS$3.67
  3. v1_workingThe agent snapshotted the in-progress pipeline while pass-2 teacher retries ransnapshot only$3.67
  4. v2The agent retargeted training to plain solutions ending in endoftext36.5$3.67
  5. v2_workingThe agent snapshotted the v2 pipeline before the holdout evaluationsnapshot only$3.67
  6. v3The agent continued training from v2 on recovered hard-problem traces35$3.67
  7. v4_finalThe agent froze the promoted v3 recipe as the final snapshotsnapshot only$3.67

On the hidden set

Original metricNormalised score
Starter0.00.0
Upper1.01.0
This run (Kimi K3)0.0333330.0333
447 minWall clock
$17.70Spend
28.9MTokens
5Versions, 2 kept

Only one comparable self-check score, so no curve — the versions below list what each one changed.

  1. v0The agent inherited the answer-only SFT starter and skipped running itsnapshot only, not run
  2. v1The agent distilled teacher CoT under the think-tag template and looped foreverlooped to max tokens
  3. v2The agent reformatted traces as plain CoT cut at the gold box23.05
  4. v3The agent trained an extra stop-focused epoch on short wrap-ups4-sample check, mixed
  5. v4The agent froze the v2 recipe as the final methods snapshotsnapshot only

On the hidden set

Original metricNormalised score
Starter0.00.0
Upper1.01.0
This run (Grok 4.6)0.0166670.0167
152 minWall clock
$9.32Spend
10.8MTokens
1Measured version
  1. v1The agent generated and answer-checked teacher traces for the integer-problem pool.4186 teacher verified152 min · $9.32

On the hidden set

Original metricNormalised score
Starter0.00.0
Upper1.01.0
This run (DeepSeek V4 Pro)0 reward0.0000
288 minWall clock
$10.57Spend
16.6MTokens
2Measured versions
  1. v12The agent capped teacher responses and hardened the trace filter17 rec/min25 min · $2.10
  2. v13The agent generated and answer-checked the final teacher-trace batch.4536 teacher verified288 min · $10.57

On the hidden set

Original metricNormalised score
Starter0.00.0
Upper1.01.0
This run (Qwen3.8 Max)0 reward0.0000
476 minWall clock
$16.53Spend
25.1MTokens
2Measured versions

Teacher quality and trace count use different units, so they are listed without a shared curve.

  1. v0The agent selected the concise teacher prompt after comparing teacher outputs.779 teacher accuracy150 min · $3.08
  2. v1The agent trained the student on rejection-sampled long-CoT teacher traces3,102 traces476 min · $16.53

On the hidden set

Original metricNormalised score
Starter0.00.0
Upper1.01.0
This run (GLM 5.3)0.050.0500
229 minWall clock
$31.14Spend
46.1MTokens
2Measured versions

On the visible set

.020 .025 .030 .035 .040 10 12 Agent step Visible dev accuracy ↑ v10 v12
keptrolled backsubmitted
  1. v10The agent trained the integer-range answer-only LoRA with explicit EOS targets.0333116 min · $15.35
  2. v12The agent trained the all-integer answer-only LoRA on 23,205 corpus rows.0333203 min · $22.56

On the hidden set

Original metricNormalised score
Starter0.00.0
Upper1.01.0
This run (GPT-5.5)00.0000

Leaderboard

Where each run landed on the sealed held-out set, on the same normalised-score scale as the anchors above.

0 0.3 0.6 1.0 1 GPT-5.6-sol codex · max 0.050 2 GLM 5.3 claude code · max 0.050 3 Kimi K3 kimi cli · max 0.033 4 Grok 4.6 grok · xhigh 0.017 5 Opus 5 claude code · max 0.000 6 Gemini 3.7 Flash antigravity · high 0.000 7 DeepSeek V4 Pro claude code · max 0.000 8 Qwen3.8 Max qwen coder · xhigh 0.000 9 GPT-5.5 codex · xhigh 0.000