Learning to Post-Train

draft
rl
data
agents
Notes from training Inkling 2 Mini with RL to watch its own post-training runs on one B200, change data, prompts, and hyperparameters mid-run, and learn from side-by-side forks.
Published

December 1, 2026

Introduction

This is a running log of small-scale experiments to train a model that watches a live RL post-training run, spots what is going wrong, and changes the run so it ends with a higher held-out score than the same run left alone.

The model I am using is Inkling 2 Mini [1]. The runs it watches are also RL runs of Inkling 2 Mini, trained with LoRA in miles [2] on a single B200 GPU. So the model watches runs of itself, and only the supervisor’s weights carry across episodes; each inner LoRA is thrown away when its run ends.

The setup builds on AutoRL [3], where frozen API models (gpt-6.1-sol and glm-5.2) supervise RL runs without being updated. Existing papers that do train a post-training agent either use supervised fine-tuning on collected traces (RSI-Dojo [4]) or optimize one-shot job configs before a run starts. Here the outer supervisor is itself trained with RL on mid-run decisions, and tested on tasks it never supervised.

Figure 1. (a) Training. (i) Warm-up (ablation): RL on offline skill tasks (Predict, Read, Build) gives optional starting weights \(\theta_0\). (ii) Supervision: each episode starts a new inner RL run of Inkling 2 Mini with a fresh LoRA on dataset \(D\). At step \(t\) the supervisor \(\pi_\theta\) reads the run and may edit its data, harness, or training config/code, at most \(B\) times per run. The run forks into a branch with the edit and a twin without it. Both run \(H\) steps with shared random seeds and are scored on held-out tasks of \(D\); the reward is the difference, and only \(\theta\) persists across episodes. (b) Held-out evaluation. On a new dataset \(D'\), with \(\theta\) frozen, the same run is repeated with no supervisor, the untrained supervisor, and the trained one.

One change since the first sketch in Figure 1: instead of running the offline warm-up stage first, I now train on live supervision runs first (Figure 1, a-ii) and keep the offline warm-up (Figure 1, a-i) as an ablation. If supervision alone cannot move held-out performance on a single run family, offline warm-up will hide why.


Finding an inner run that fits a small budget

Cost sets almost every design choice here. Every time the supervisor acts at step \(t\), we run two copies of the inner training job for \(H\) steps—one with the change, one without—and evaluate both on held-out items. If one inner step costs $2.00, a single 5-step fork costs $20, and a hundred outer decisions cost $2,000.

For outer-loop RL to be affordable on one GPU, the inner task needs three properties at the same time:

  1. Cheap, fast steps (~$0.20 per step, no per-episode container build or spin-up delay).
  2. Headroom without broken graders: base Inkling 2 Mini has to start well below the ceiling (~30–65% against a 90% frontier score), and missed questions need to be real model mistakes rather than buggy unit tests.
  3. Fixable flaws in the default recipe that show up in the logs and rollout dumps.

Getting all three took several false starts.

What we measured across candidate inner tasks

All numbers below were measured in miles on our own B200 GPU (no external inference API):

Candidate inner set Base Mini start Cost of 1 step (4×4) Cost of 1 fork (\(H=5\) + eval) What happened
BIRD-Platinum (miles text_to_sql val, 398 items) 72.1% (8K, with hints)
76.6% (16K, hints withheld)
~$0.21 ~$2.10 Too easy as a held-out test; keep its 69-database training split as our training pool
R2E-Gym (tasks an external Qwen3-32B solved 1 of 4) 68% (41 / 60) ~$1.70–$2.50 ~$15–$22 Difficulty labels from other models did not carry over; Mini is stronger on Python repos
SWE-rebench V2.1 hard band (Qwen3-Coder-480B \(\le 0.5\)) 82% (49 / 60) ~$1.70–$2.50 ~$15–$22 Still far above the target band
R2E-Gym multi-file screen \(\to\) 30 tasks Mini failed 46% (36 / 78) screen
19% (11 / 59) confirm
~$2.40 ~$18–$22 Half of the 30 failed tasks (15 / 30) had broken hidden tests; ~10× too costly per fork
BIRD mini-dev 2026 (SQLite, 500 items, 11 dev DBs) [5] 60.0–64.0% on 200-item reward split (41.9% on 4 hardest DBs in Gate 1 dump) ~$0.21 (~82.5 s) ~$1.65 (~11 min) Chosen inner benchmark: 90.0% frontier ceiling, 0 broken tests, $0 sandbox cost, 0 DB overlap with train

Two lessons stood out from the software-engineering (R2E-Gym and SWE-rebench) runs:

  • Other models’ failure rates are a poor difficulty filter. Subsets picked because Qwen3-32B or Qwen3-Coder-480B struggled on them landed at 68–82% for base Inkling 2 Mini.
  • Filtering by your own model’s failures selects for broken tests. When we screened 78 multi-file R2E-Gym tasks and took 30 that Mini failed, reading all 49 failed trajectories showed that 15 of the 30 tasks were unsolvable from the prompt: hidden tests asserted exact unstated error strings, required undocumented flags, or contradicted the issue text (on one numpy task, the prompt said an example call must run “without any errors” while the hidden test asserted ValueError). On the 15 fair tasks, Mini solved 11 / 29 (38%). Combined with $0.11–$0.16 per containerized attempt, SWE tasks were the wrong inner loop for tight-budget outer RL.

Three engineering traps in the SQL inner loop

Returning to multi-turn SQLite (examples/text_to_sql in miles, where the model runs exploratory SELECT queries against real databases before submitting a final <solution> query) kept episodes in-process on the GPU box at $0 sandbox cost. Before the inner loop could actually learn or fork, we had to fix three concrete bugs:

  1. bfloat16 weight merging rounded away 93% of LoRA updates. Our first 20-step SQL run barely moved (72.1% → 73.1%). Forensics on the weight sync showed why: miles synced LoRA to SGLang by merging lr = 5e-5 updates (~1e-5 in size) into bfloat16 base weights, whose spacing near typical weight magnitudes (|W| ≈ 0.02) is ~1.2e-4. At the second sync, 93.3% of merged elements rounded back to the exact base weight. Switching to native LoRA adapter serving in SGLang (PR #53710) on top of the NVFP4 base model fixed this: only the 434 adapter tensors copy over CUDA IPC each step (~0.5–1.1 s, checked by SHA-256), peak memory on one B200 sits at 113–134 GiB (leaving 45–66 GiB free), and fixing an expert-weight naming mismatch (w1/w2/w3 vs. gate_proj/up_proj/down_proj) lets saved LoRA checkpoints reload cleanly for branching.
  2. Unbounded SQLite joins hung worker threads. During a 1,000-question pass-rate screen, throughput collapsed from 1.3 s per episode to 17.5 s per episode at 73% completion as background threads got stuck inside accidental Cartesian joins until the 75-minute job timeout killed the run ($10.52 wasted, nothing saved). Adding a 3-second thread-local sqlite3 progress-handler deadline aborts runaway model tool queries without affecting reference grading. A 200-question multi-turn evaluation now finishes in 3.9 minutes with zero hangs.
  3. Why the naive 20-step baseline still stalled (64.0% → 55.0% → 59.5%)—and why that helps supervision. We filtered BIRD-Platinum (hints withheld, ≤ 4,096 prompt tokens) to 702 multi-join + subquery/CTE training questions and ran a clean 20-step 4×4 baseline (45.3 min, ~$7 on one B200, saving checkpoints at steps 5, 10, 15, 20). Accuracy stayed flat for four reasons that are plain to read in the rollout dumps:
    • Zero-gradient steps (12 / 20 steps had grad_norm = 0.0000): at 4 prompts × 4 samples, 60% of steps landed on four 4/4 or 0/4 groups simultaneously, leaving only 8 real updates in the whole run.
    • Full-parameter learning rate on LoRA: the recipe’s 5e-5 cosine schedule (decaying to 5e-6, sized for 300-step full-weight runs) starved rank-16 LoRA updates by roughly 10×; 5 of the 8 non-zero updates fired after LR had already decayed below 1.3e-5.
    • Per-turn token cap and premature stops (40% of missed evals): across the 89 missed questions in our Gate 1 post-step-0 eval dump (111 / 200 solved), 53 opened <solution> (50 complete queries with genuine SQL mistakes such as LEFT JOIN vs. INNER JOIN, missing CAST(col AS REAL) on text columns, or COUNT(DISTINCT CASE ...), plus 3 cut mid-SQL at 2,048 tokens), while 36 never opened a <solution> tag at all—either hitting the 2,048-token per-turn cap inside <|content_thinking|> / verification text or stopping on Turn 1 after writing "I'll inspect the relevant tables..." with zero tool calls (which the episode runner immediately grades as -1.0).
    • Few-shot prompt bleed: the shipped prompt uses a Qwen XML worked example about farm animals, causing Mini to open answers on Magic: The Gathering card databases with "Verification of external knowledge (\"pig is represented by species = 'pig'.\"): not applicable...".

Fixing the obvious LoRA LR (3e-4 constant), turn budget (5 tool turns, 3,072 tokens/turn, 16K context), and batch size (8×4) gets the baseline moving, while leaving data filtering, prompt cleanup, reasoning effort, and reward shaping for the supervisor to adjust mid-run.


How supervision works

Three-way held-out split

To keep the outer loop honest, the 500 SQLite questions in BIRD mini-dev 2026 (none of whose 11 databases appear in the 69 BIRD-Platinum training databases) are split once with a fixed seed, stratified by database and difficulty:

Split Questions Role
reward.jsonl 200 Scores the branch and the twin to compute the supervisor’s counterfactual reward
selection.jsonl 100 Picks supervisor checkpoints and hyperparameters
test.jsonl 200 Untouched until the final three-arm comparison

What the supervisor reads and changes

At a step boundary—right after a weight sync and before the next rollout batch—the inner run pauses at a saved checkpoint \(m_t\). The supervisor inspects the run state and picks an action (including "do nothing"):

Interface Details
Reads Per-step training metrics (reward, zero-gradient share, grad_norm, KL, entropy, truncation rate, step time); sampled rollout trajectories and tool errors; held-out scores at earlier checkpoints; current run config and prompt; its own past actions in this run and remaining action budget \(B\)
Changes training config / code Learning rate and schedule, batch/group size, clipping, KL/process penalties, loss/advantage settings in miles
Changes episode harness System and few-shot prompt, tool formatting, reasoning_effort, per-turn token cap, max SQL tool turns
Changes training data Filtering or reweighting the prompt pool (for example, dropping 4/4 solved schemas or prioritizing multi-join failures)

Shared-seed counterfactual rewards

Comparing an edited branch against an independent run is noisy because rollout sampling, prompt order, and GPU scheduling add luck on top of the action’s real effect. Following Look Back [6], we pair random numbers across both runs: the edited branch and the "do nothing" twin resume from the same checkpoint \(m_t\) with the exact same rollout seeds, batch order, and evaluation seeds:

luck   = [+0.06, -0.04, +0.01]          # batch/rollout luck across 3 seeds
twin   = [0.60 + l for l in luck]       # "do nothing" twin
branch = [0.63 + l for l in luck]       # true improvement = +0.03
[b - t for b, t in zip(branch, twin)]   # shared seeds -> [+0.03, +0.03, +0.03]
branch[1] - twin[0]                     # independent seeds -> -0.07 (wrong sign!)

Even with shared seeds, FP4 kernel scheduling and divergent token paths after a weight edit leave residual noise (we measured ~2–3 points of jitter across repeated 200-item greedy evals). Before training the supervisor, we run an A/A fork test (two identical copies from \(m_t\)) to measure that noise floor directly and pick \(H\). On a fraction of "do nothing" steps, we still fork a second branch using an edit sampled from the supervisor’s own policy, so "do nothing" gets a paired reward too [6].

Three levels of transfer testing

Once trained on SQL supervision episodes, the supervisor’s weights are frozen and tested at three distances from training, each comparing no supervisor, untrained supervisor, and trained supervisor:

Level Inner run Question answered
1. Same task, new seeds Text-to-SQL in miles, scored on untouched test.jsonl (200 items) Did outer RL improve supervision on the training environment at all?
2. New task, same library Math with Python tool (examples/retool_v2 in miles) and procedural SQL (ledger) Does supervision carry to a task and grader it never saw? (Main result)
3. New task, new library Multi-file RL in TRL from FrontierRSI [7], plus long runs (PostTrainBench [8], Olmo-3-7B RL [9]) Does the skill carry outside miles and to multi-hour runs?

Offline warm-up (ablation): Predict, Read, Build

Can offline tasks teach a model the sub-skills of supervising RL runs—forecasting curves, diagnosing faults, and editing training code—for pennies before it ever touches a live GPU run? To test that cleanly as an ablation, we built a verified offline pool (126 Harbor tasks in configs/pool_v1.jsonl, plus Tea Leaves and RFT-FaultBench) organized around three skills:

Skill The question What the model hands in How the grader checks it Datasets
Predict Where is this training run headed? A curve forecast, final score, or pairwise winner Against the recorded run log (CPU, 1 model call) Tea Leaves [10]
Read What broke in this RL run, and how do you fix it? A structured diagnosis, or one patch to the run Against the known root cause, or by rerunning training AutoRLBench [11], RFT-FaultBench [12]
Build Can you write code that improves training? A loss, estimator, or ML-library patch Hidden unit tests, or training on held-out tasks HF_ML_Tasksmith [13], AutoResearchExam [14], DiscoGen [15]

Each dataset in the pool was timed on a sample of tasks with Inkling 2 Mini under a 128-turn cap so slow verifiers do not bottleneck RL:

Dataset Pool tasks (train / sel / test) Median Mini attempt time Time limit
RFT-FaultBench 146 (unsplit) 3.3 min 30 min
AutoRLBench, diagnosis 50 (35 / 5 / 10) 4.4 min 30 min
AutoRLBench, repair (CPU) 3 (3 / 0 / 0, +5 GPU prepared for test) 7.0 min 30 min
HF_ML_Tasksmith 36 (25 / 4 / 7) 7.3 min 30 min
DiscoGen (A10G GPU) 20 (14 / 3 / 3) 18.3 min 30 min
AutoResearchExam (CPU) 17 (12 / 2 / 3) 29.2 min (at 30m cap) 60 min

Benchmarks with multi-hour budgets—Scale RSI Bench [16] (1.5–12 h), AgenticRL-Bench [17] (shipped 8 h; Mini spent a median of 17 min across 9 attempts and scored 0 on all 9), and PostTrainBench (10 h on an H100)—stay evaluation-only.

Three offline tasks up close

Predict, from Tea Leaves (paper, data, 918 train / 682 test runs including 150 RL runs). Given the first 20% of a training curve along with its config and code, predict the rest of the trajectory. As the Tea Leaves authors put it, understanding a training change has three levels: describing it, implementing it, and anticipating what it will do to a run. Supervision leans heavily on the third.

Read, from RFT-FaultBench (paper, data). Given per-step logs (reward, KL, entropy, response length, and sampled generations) from either a healthy RL run or one with an injected bug, return a structured diagnosis:

{"status": "anomalous", "fault_family": "credit_assignment", "fault_type": "advantage_instability",
 "evidence": "what in the logs shows it"}

Build, from DiscoGen (paper, repo). Given a working PPO trainer where only loss.py is editable, run short training experiments on two environments, then hand in loss.py to be graded on two unseen environments (82–96% of wall time is spent inside training commands).

How untrained Inkling 2 Mini did on the offline tasks

Running base Inkling 2 Mini across samples of the offline pool showed clear room to learn:

  • False alarms on healthy runs: on RFT-FaultBench it flagged all four healthy runs as broken (mean score 0.42).
  • Diagnosis is much easier than repair: on AutoRLBench diagnosis (20 attempts on 5 tasks) rewards spanned 0.09 to 1.0, whereas on AutoRLBench repair it fixed only 1 run in 12 tries.
  • Module edits rarely cleared noise: on DiscoGen (6 attempts across 3 loss/optimizer tasks), 3 of 6 attempts degraded the baseline and only 1 cleared the 1-sigma margin above it (reward 0.066 under the clipped scale; 5 of 6 scored 0).
  • Easy library PRs saturate quickly: on HF_ML_Tasksmith, 15 of 20 sampled attempts hit 1.0.

Current status and next steps

Piece Status
miles + SGLang NVFP4 LoRA adapter serving & checkpoint reload on 1× B200 Done (434 / 434 tensors SHA-256 verified in ~0.5–1.1 s syncs; ckpt/ saves every 5 steps)
Inner dataset & 3-way split (BIRD-Platinum hard train \(\to\) BIRD mini-dev 2026 200 / 100 / 200) Done (0 DB overlap, 3 s SQLite timeout, 3.9 min per 200-item eval)
First 20-step baseline (lr = 5e-5 cosine, 4×4, 2,048 tok/turn) Done (45.3 min, ~$7; exposed zero-grad steps, under-scaled LoRA LR, and 2,048 turn-cap cutoffs)
Updated 20-step inner baseline (lr = 3e-4 constant, 8×4, 5 turns, 3,072 tok/turn, 16K ctx) Running now on 1× B200
Step-boundary fork plumbing + shared-seed A/A noise test (PLAN.md Steps 2–3) Next
Untrained vs. RL-trained supervisor on SQL, then transfer to retool_v2 / ledger Upcoming

Appendix: every dataset we screened

We reviewed roughly 180 datasets and benchmarks—many from papers and dataset cards, and the serious candidates file by file.

Used for inner RL or transfer tests

  • BIRD mini-dev 2026 (3-way held-out SQL benchmark), BIRD-Platinum / ReViSQL (miles text_to_sql training pool), miles retool_v2 (math with Python tool), procedural ledger SQL tasks, UltraTerminals (candidate Harbor transfer slices after per-task license/canary filtering)

Kept for the offline warm-up ablation

Evaluation only: owner do-not-train markers or canaries

Evaluation only: multi-hour runs

Outside our domain

Score can be forged, or answers leak into the workspace

Incomplete or broken task definitions

Too slow or costly per attempt for outer-loop RL

Too heavy to download or hand-build environments for

Duplicates, supervised-only, or general SWE/terminal pools

References

[1]
Thinking Machines Lab, “Inkling 2 mini.” 2026. Available: https://thinkingmachines.ai/news/inkling-2-mini/
[2]
RadixArk, “Miles v0.1: Production-level post-training,” arXiv preprint arXiv:2609.08368, 2026, Available: https://arxiv.org/abs/2609.08368
[3]
S. Tang et al., “AutoRL: A multi-agent system towards autonomous reinforcement learning,” arXiv preprint arXiv:2611.17790, 2026, Available: https://arxiv.org/abs/2611.17790
[4]
S. Gao et al., “Training LLM agents to automate LLM post-training with RSI-Dojo,” arXiv preprint arXiv:2611.03698, 2026, Available: https://arxiv.org/abs/2611.03698
[5]
J. Li, B. Hui, et al., “BIRD Mini-Dev (2026 update).” Hugging Face dataset birdsql/bird_mini_dev, 2026. Available: https://huggingface.co/datasets/birdsql/bird_mini_dev
[6]
D. Kim, N. Abbasov, et al., “Look back: Reinforcement learning with counterfactual world models,” arXiv preprint arXiv:2611.29259, 2026, Available: https://arxiv.org/abs/2611.29259
[7]
Abundant AI, “FrontierRSI: Open-ended AI research tasks.” GitHub repository, 2026. Available: https://github.com/abundant-ai/frontier-rsi
[8]
B. Rank et al., “PostTrainBench: Can LLM agents automate LLM post-training?” arXiv preprint arXiv:2603.08640, 2026, Available: https://arxiv.org/abs/2603.08640
[9]
Harbor Hub, “Rsi-post-training.” Harbor Hub dataset ale/rsi-post-training. Available: https://hub.harborframework.com/datasets/ale/rsi-post-training
[10]
X. Zhao, X. Li, T. Chen, J. Tian, Z. Yu, and T. Wu, “Reading the tea leaves, again: Can large language models predict language model training runs?” arXiv preprint arXiv:2611.30141, 2026, Available: https://arxiv.org/abs/2611.30141
[11]
Thinking-Space, “AutoRLBench: A benchmark and open call for valuable, reproducible RL runs.” GitHub repository, 2026. Available: https://github.com/Thinking-Space/AutoRLBench
[12]
L. Zhang et al., “Towards robust LLM post-training: Automatic failure management for reinforcement fine-tuning,” arXiv preprint arXiv:2605.04431, 2026, Available: https://arxiv.org/abs/2605.04431
[13]
A. S. Kolavi, “FineEnvs: Open source RL environments for LLM agents.” 2026. Available: https://github.com/adithya-s-k/FineEnvs
[14]
A. Ramesh et al., “AutoResearchExam.” 2026. Available: https://benchmarks.bespokelabs.ai/autoresearchexam/
[15]
A. D. Goldie et al., “Procedural generation of algorithm discovery tasks in machine learning,” arXiv preprint arXiv:2603.17863, 2026, Available: https://arxiv.org/abs/2603.17863
[16]
Scale AI, “RSI Bench.” GitHub repository, 2026. Available: https://github.com/scaleapi/rsi-benchmark
[17]
Eigent AI, “AgenticRL-Bench: Testing agents on real agentic-RL work, from debugging to training.” GitHub repository, 2026. Available: https://github.com/eigent-ai/agenticrl-bench