thinkingmachines/Inkling-2-Mini
LoRA adapters for agent harnesses on Inkling 2 Mini, trained with async GRPO. Released: Inkling-2-Mini-pi-adapted, for pi at reasoning effort high (coding + cyber tasks, a tool-efficiency bonus and a length penalty; PRESET=pi-adapted), and the effort-none adapters (pi, hermes, opencode, DeepSeek Harness on scale800 + TermGrade, one job per harness). The Qwen3.8-27B recipe's settings, with what Inkling needs.
Command builder
Train · HF Jobs · h200x2 per harness, 32768-token window; b200x4 for PRESET=pi-adapted (65536-token window)
hf download trl-lib/trl-recipes --repo-type space --include "recipes/harness-adapters/*" --local-dir trl-recipes
cd trl-recipes/recipes/harness-adapters/Inkling-2-Mini
HARNESS=pi \
PRESET=effort-none \
BUCKET="<your user>/<bucket>" \
bash train_hf_jobs.sh
Guide
LoRA adapters for agent harnesses on
thinkingmachines/Inkling-2-Mini. Released:
Inkling-2-Mini-pi-adapted, for pi at reasoning effort
high (below). The effort-none runs, for pi, hermes, opencode and
DeepSeek Harness, train for up to 1,000 steps on the 750 scale800 tasks interleaved with 300 TermGrade tasks, thinking
off. Live dashboard:
harness-hub/inkling-livestream. Setup and shared
settings: ../README.md. Full hyperparameters: recipe.yaml.
| HF Jobs | |
|---|---|
| Train | HARNESS=pi bash train_hf_jobs.sh, one h200x2 job per harness; PRESET=pi-adapted bash train_hf_jobs.sh, the released adapter |
| Eval | BENCH=tbfull\|sbp EVALS="pi@pi:base" bash eval_hf_jobs.sh, one h200 job per policy |
How this differs from the Qwen3.8-27B recipe (same data, reward, LoRA rank, learning rate and agent limits):
- TRL. The async-grpo-shared-vllm branch plus what Inkling needs: tree packing for Inkling 2 Loop's attention
and short convolutions, and the adapter's module names renamed to vLLM's when the trainer syncs it. All of it is in
trl.patch, relative to upstream d115286b. train_hf_jobs.sh applies it to that commit and builds a
wheel.
- Libraries. transformers 5.24.0, the first with Inkling 2 Loop, and a vLLM nightly (b976fff8) that serves it
with runtime LoRA and has its inkling tool and reasoning parsers.
- Model split. vLLM serves the quantized checkpoint; the trainer trains on the BF16-dequantized model.
- LoRA on attention only (q/k/v/o_proj of the language model): the experts stay frozen, and those are the four
projections vLLM serves LoRA on for this model.
- Thinking off as effort. Inkling's chat template has no enable_thinking: rollouts run at
reasoning_effort: "none".
- Context window. 32,768 tokens on H200 (40,960 and 49,152 ran out of memory on the trainer); 65,536 on B300,
where hermes from step 60 and DeepSeek Harness train.
- 32 gradient-accumulation steps: at 16, a step trained on 3-5 groups.
- DeepSeek Harness runs through ../scripts/deepseek_harness.py, the
harness-leaderboard's setup pointed at the capture proxy, with web fetch off in training (safeagents blocks most
fetches, which zeroes the reward).
Released: Inkling-2-Mini-pi-adapted (pi, effort high) #
harness-hub/Inkling-2-Mini-pi-adapted is step 100 of a pi run at reasoning effort high (the chat template's default), on coding and cyber tasks:
PRESET=pi-adapted bash train_hf_jobs.sh
What the preset changes from the effort-none runs below:
- Data. 1,431 tasks of UltraTerminals
(@24e4ce50), listed in pi_adapted_tasks.txt: 531 coding tasks (SWE-smith Python and Go,
Tasksmith) interleaved with 900 Cedar and OpenFGA authorization tasks. Of four mixes (coding, coding + cyber, coding +
knowledge work, hard tasks only), coding + cyber gave the best Terminal-Bench 2.1 results. The adapter trained on
these tasks' earlier builds: the cyber tasks are unchanged, while UltraTerminals now runs the coding tasks in pinned,
prebuilt images (each instruction gains a short note on the environment) with the same problems and tests.
- Thinking. Effort high, temperature 1.0 (Inkling's generation config), a 65,536-token window with up to 32,768
output tokens a call.
- Reward. The verifier's 0/1, plus, on correct rollouts only, a tool-efficiency bonus 0.1 × clip(1 − tool calls /
30, 0, 1) and a length penalty 0.2 × min(1, generated tokens / 65,536). An ablation at effort low found the length
penalty with a 0.1 bonus the most token-efficient at the same accuracy.
- Batch. 16 gradient-accumulation steps, 96 rollouts in flight.
The released run trained on 4 B300 GPUs (vLLM on 2 with tensor parallelism, the trainer on 2). On HF Jobs, the preset runs on a b200x4 job (vLLM on one GPU, the trainer on three): the 65,536-token window does not fit an H200 trainer. It has not been run as written on HF Jobs.
Results (pi, effort high, temperature 1.0, paired against the base model): Terminal-Bench 2.1 with 1 h per task, 44.2% → 56.9% avg@3 and 56.2% → 70.8% pass@3; SWE-bench Pro (hard 51), 66.7% → 70.6%; on the tasks both solve, 22–33% fewer tool calls and about 40% fewer output tokens. With a generous budget (4 h per task, or 256k context), both models solve about as many tasks. See the model card for the full results.
Results so far (effort none) #
Terminal-Bench 2.1, all 89 tasks, thinking off, one attempt per task, on HF Jobs (h200, eval_hf_jobs.sh):
| harness | base | best checkpoint so far |
|---|---|---|
| hermes | 57.5% | 63.2% (step 70), 7% fewer tool calls per solved task |
| pi | 54.0% | 58.6% (step 70), 25-30% fewer tool calls per solved task |
| DeepSeek Harness | 47.1% | training |
On SWE-bench Pro (hard 51), hermes at step 70 solves 62.7%. These adapters are not released: see the dashboard for their numbers.
Evaluating checkpoints #
Checkpoints reach the dashboard and the HF Jobs evals through the bucket. eval_listener_hf.sh schedules an hourly HF
Jobs eval of the newest checkpoint; eval_hf_jobs.sh evaluates chosen ones side by side.
Hyperparameters
Serving (vLLM)
Hardware
Datasets
Training
harness-hub/scale800-harbor@56c7f75dharness-hub/termgrade-train-harborharness-hub/UltraTerminals@24e4ce50
Evaluation
TRL version
This recipe runs on a TRL fork. trl.patch holds the changes to trl/ relative to the upstream base commit.
younesbelkada/trl@e498acc6 async-grpo-shared-vllmhuggingface/trl@d115286bgit clone https://github.com/huggingface/trl && cd trl
git checkout d115286bc5aef8d346e8510bfe312803c7881c4a
curl -sL https://huggingface.co/spaces/trl-lib/trl-recipes/resolve/main/recipes/harness-adapters/Inkling-2-Mini/trl.patch | git applyDownload trl.patch (10 files changed)
Files
async_grpo_harbor.py↗eval_listener_hf.py↗eval_listener_hf.sh↗pi_adapted_tasks.txt↗index.mdrecipe.json