Tasks/LLM Systems & Training/Post-training

Mathematical Post-Training

Post-train a 1.7B student with a fixed 8B teacher

teacher_student_math_posttrainingLLM Systems & TrainingPost-training
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.

Metric

exact integer accuracy on the sealed 60-problem set · higher is better

Merged 1.7B student sampled once per problem at fixed seeds; last boxed integer must match

anchorheld-outreward
Banswer-only LoRA SFT baseline0.0000 (0/60)0.00
Sgold CoT SFT + OPD reference0.0667 (4/60)0.30
Utheoretical maximum1.0000 (60/60)1.00
normalisation
m <= B0
B < m <= S0.3 * (m - B) / (S - B)
S < m < U0.3 + 0.7 * (m - S) / (U - S)
m >= U1

m = this run's held-out metric  ·  B = answer-only LoRA SFT baseline  ·  S = gold CoT SFT + OPD reference  ·  U = theoretical maximum

Piecewise linear in accuracy itself, no transform. One sealed suite, mapped once: 0.05 gives 0.3 * 0.05 / 0.0667 = 0.225.

Rollouts

463 minwall clock
$129.25spend
224.6Mtokens
41versions, 32 kept
20.25 21.00 21.75 22.50 23.25 $0 $30 $60 $90 $120 cumulative spend on the run tune256 exact integer accuracy %, higher is better v0 v1 v2 v3 v4 v5 v6 v7 v8 v9 v10 v11 v12 v13 v14 v15 v16 v17 v18 v19 v20 v21 v22 v23 v24 v25 v26 v27 v28 v29 v30 v31 v32 v33 v34 v35 v36 v37 v38 v39 v40
keptrevertedno scoreturning point
  1. v0Inherited answer-only starter audited; no training or evaluation run yetno measurement2 min · $0.28
  2. v1Deterministic tune/holdout splits, trace selection, teacher client, local evalgeneration failed5 min · $0.85
  3. v2Thinking-mode teacher: 112/128 hit the 2,048-token cap, 24/128 boxed an answerno measurement9 min · $1.76
  4. v3Non-thinking teacher, concise derivations: 114/128 natural stops, 970 tokensAsk the teacher for a short derivation that finishes inside the cap, not a full scratchpad.no measurement12 min · $2.36
  5. v4Trace filter, Qwen3 reasoning format, rank-32 LoRA config, training scriptno measurement18 min · $3.47
  6. v5Sequence-length audit fixed by explicit encoding; 556/749 traces acceptedno measurement18 min · $3.60
  7. v6Supervise the Base checkpoint's real EOS id 151643 after every answerno measurement22 min · $4.55
  8. v7Reserves rebuilt on unique problem texts; 562 duplicate twins protectedno measurement24 min · $5.04
  9. v8DDP loader workers and OMP threads cut to fit the 8-CPU budgetno measurement25 min · $5.41
  10. v9Teacher-mode A/B on 128 items: thinking gains 3 at 2.4x the tokensno measurement26 min · $5.68
  11. v10Trace verification extended to every syntactic integer answer, not 0-999no measurement37 min · $8.63
  12. v11Split dedup normalised to lowercase, whitespace-collapsed problem textno measurement38 min · $9.13
  13. v12900 duplicate groups audited; 176 with conflicting answers discardedno measurement40 min · $9.68
  14. v13Preprocessing workers 8 to 4 so preprocess and DDP stay inside 8 CPUsno measurement41 min · $10.12
  15. v14Answer-blind rejection sampling over 5,000 long grader-range problemsno measurement43 min · $10.74
  16. v15Hybrid build: independent trace when it stops and matches, else conditionedno measurement44 min · $11.28
  17. v16Independent pool bounded to 180-1,400 problem charactersno measurement46 min · $12.05
  18. v17Concise answer-blind teacher prompt: 53/128 against 44/128 for the raw oneno measurement46 min · $12.27
  19. v18Independent candidate pool grown from 5,000 to 8,000 problemsno measurement50 min · $13.60
  20. v19Full hybrid corpus: 13,450 examples, 13.82M labeled tokensno measurement50 min · $13.91
  21. v20vLLM safetensors prefetch in eval utilities; model behaviour unchangedno measurement173 min · $56.04
  22. v21Broad rank-32 LoRA over all 13,450 examples, 841 steps; step 400 selectedno measurement212 min · $61.95
  23. v22Independent-only continuation rejected; broad step 400 scored on tune25620.7234 min · $67.50
  24. v23Architecture-checked weight interpolation around the broad-400 optimumno measurement234 min · $67.77
  25. v24Conditioned-integer-only SFT branch, 400-step cosine; broad soups rejectedTrain only on verified answer-conditioned traces and stop early, dropping the independent mixture.no measurement241 min · $70.64
  26. v25Conditioned run: step 300 leads on tune128, steps 200 and 400 rejectedno measurement270 min · $76.63
  27. v26Conditioned step 300 promoted to tune256; ultra-concise teacher mode added23.44277 min · $78.49
  28. v27Multi-attempt retry builder plus 1,267 verified DPO preference pairsno measurement282 min · $79.44
  29. v28Beta-0.1 DPO from conditioned 300: NaN logps by step 5, stopped at 18diverged, no ckpt294 min · $81.53
  30. v29Augmented retry hybrid, 13,882 examples; best at step 40023.05320 min · $85.26
  31. v30Short-conditioned branch: teacher derives the given answer in 250 wordsno measurement323 min · $87.07
  32. v31Short-conditioned rank-32 LoRA, 6,141 examples; step 400 parses 90.2%19.92364 min · $93.86
  33. v32Controlled rank-64 repeat of the conditioned run, corpus and schedule fixedno measurement365 min · $94.18
  34. v3310% of short-conditioned step 400 blended into conditioned step 30020.7367 min · $94.62
  35. v34Untouched final_holdout256 consulted once: leader 53/256, 71.5% parsedno measurement371 min · $95.54
  36. v35Leader sliced by problem length; long-problem continuation branch addedno measurement373 min · $96.27
  37. v36Rank-64 conditioned run: step 400 parses 82.8% and takes the holdout 59/256Repeat the strongest recipe at rank 64 to test whether rank 32 bottlenecks the math adaptation.23.44406 min · $105.25
  38. v37Long-problem continuation from rank64 step 400, LR 1e-5, 100 steps20.31419 min · $109.85
  39. v38Entrypoint frozen; rank64 step 400 merged into /app/submission, 310 tensorsno measurement422 min · $110.85
  40. v39Two visible queries: rank64 and short-conditioned both score 3/30no measurement446 min · $121.41
  41. v40Final visible query: the rank-32 finalist scores 1/30, selection unchangedno measurement463 min · $128.91

v0-v19 was pipeline build-out: 50 min and $13.9. Teacher generation, seven LoRA runs and their sweeps took the other 6.9 h and $115.

On the hidden set

held-out metricreward
answer-only LoRA SFT baseline0.0000 (0/60)0.00
gold CoT SFT + OPD reference0.0667 (4/60)0.30
theoretical maximum1.0000 (60/60)1.00
this run0.050 (3/60)0.225