Run this model with HF Jobs
Run rdsm/inkling_hermes_tune-inkling-2-mini-rl-lora on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/rdsm/inkling_hermes_tune-inkling-2-mini-rl-lora. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/rdsm/inkling_hermes_tune-inkling-2-mini-rl-lora on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Evaluate on a benchmark
Use HF Jobs to evaluate https://huggingface.co/rdsm/inkling_hermes_tune-inkling-2-mini-rl-lora. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.
Quantize for lower memory use
Use HF Jobs to create a 4-bit version of https://huggingface.co/rdsm/inkling_hermes_tune-inkling-2-mini-rl-lora. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.
Instructions to use rdsm/inkling_hermes_tune-inkling-2-mini-rl-lora with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use rdsm/inkling_hermes_tune-inkling-2-mini-rl-lora with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("unsloth/Inkling-2-Mini-unsloth-bnb-4bit") model = PeftModel.from_pretrained(base_model, "rdsm/inkling_hermes_tune-inkling-2-mini-rl-lora") - Notebooks
- Google Colab
- Kaggle
Inkling-2-Mini — Hermes Agent Pure-RL Champion (BF16 LoRA)
TL;DR: A fully autonomously trained, pure Reinforcement Learning (RL-only, zero SFT, zero LLM judges) attention-only LoRA (
r=32, alpha=64,17.50Mtrainable parameters — 0.066% of 26.4B total / 0.51% of 3.4B active weights,33.41 MiBBF16) that turnsthinkingmachines/Inkling-2-Miniinto a fast, disciplined, parallel native tool user for Nous Research's Hermes Agent.
- Standalone Merged Native Weights (
20.19 GB, for vLLM / custom quants):rdsm/inkling_hermes_tune-inkling-2-mini-rl-merged - Ready-to-Run Apple Silicon MLX (
oQ4e-mtp) Build:rdsm/inkling_hermes_tune-inkling-2-mini-rl-oQ4e-mlx - Base Model:
thinkingmachines/Inkling-2-Mini(26.4B total / 3.4B active Looped MoE) - Checkpoint Provenance:
stage4b_eff/checkpoint-10(adapter SHA-256:8ea736f102765050c9fc7e67573ce150bd40a142c4f109267759882def63ebb5)
1. Plain-English Overview: What Changed?
Out of the box, Inkling-2-Mini is a strong coding model, but when wired into Hermes Agent it defaults to brittle "bash-everything" habits:
- Instead of calling Hermes's structured file and editing tools (
read_file,search_files,patch,write_file), the base model shells out toterminal(cat,sed,grep,python -c, heredocs) on >80% of file operations. - It inspects files sequentially one turn at a time rather than batching independent reads and searches in parallel.
- It occasionally emits malformed tool arguments (e.g., missing
pathfields inpatchcalls) or burns tokens repeating failed shell commands.
Using 100% pure online multi-turn RL inside isolated Docker sandboxes with strictly verifiable rewards, we trained only the model's attention layers (0.066% of total parameters) to:
- Use Hermes's native tools by default (
read_file,search_files,patch,write_file), savingterminalfor running tests, builds, git, and commands that genuinely require a shell. - Batch independent tool calls in parallel, cutting round-trips and wall-clock latency by 21–50%.
- Recover cleanly from test and tool errors instead of looping or hallucinating fixes.
- Stay concise on solved tasks, cutting output tokens by 25–56% across both multi-file suites and real-world GitHub repositories.
Fully Autonomous End-to-End Training
This entire model was designed, trained, debugged, audited, and benchmarked autonomously by a coordinated multi-agent swarm — including procedural Docker environment design, multi-stage curriculum evolution, reward shaping, 8 rounds of independent adversarial code/eval reviews, controlled 1-variable ablations (DAPO vs GSPO, learning rate, Python/JS upweighting, per-turn token budget, and pass-gated efficiency polish), checkpoint selection, and external Harbor benchmarking — with zero human-written SFT demonstrations and zero external LLM judges.
2. Mechanisms (How It Works)
Pure-RL Attention-Only LoRA (0.066% Trainable Parameters)
- LoRA Scope: PEFT LoRA (
r=32, alpha=64, BF16) targeting only the120attention projections across all 24 layers (q_proj.linear,k_proj.linear,v_proj.linear,o_proj.linear, ando_proj.gate_proj=17,498,112trainable parameters,0.066%of 26.4B total /0.51%of 3.4B active,33.41 MiB). - Frozen MoE Experts & Router: Zero of the 128 routed MoE experts and zero router or MTP weights were modified. Restricting RL updates to attention acts as a strong structural regularizer — reshaping how the model plans and invokes tools while preserving underlying coding knowledge and native NVFP4 precision.
Online Multi-Turn GSPO Loop
- Policy Optimization: GSPO (Group Sequence Policy Optimization, sequence-level importance clipping
eps_low=0.004, eps_high=0.006) decisively outperformed token-level DAPO in controlled ablations (75%vs26%native discipline on held-out checks). - Strict Tool-Observation Masking: Loss and KL gradients are computed strictly on assistant tokens; all sandbox tool outputs are masked out.
- Zero-Extra-VRAM Reference KL: Computed via
peft.disable_adapter()(beta=0.001–0.0025) with dynamic zero-std filtering (min_reward_std=0.025–0.05). - Single-GPU Sleep/Wake Hot-Swap: A colocated vLLM server wakes up, hot-loads the updated
33 MiBLoRA in<1sto generate 64 multi-turn Docker rollouts (max_turns=10,896tokens/turn), sleeps to free VRAM while PyTorch applies the GSPO step, and repeats.
Five Verifiable Reward Components (Zero LLM Judges)
- Verifiable Test Execution: Air-gapped Docker test suites with post-rollout SHA-256 anti-tamper verification of immutable test files and baseline-gated partial credit (zero bonus for non-improving edits).
- Native Hermes Tool Discipline: Rewards structured
read_file/search_files/patch/write_fileusage and penalizes rawterminalshell antipatterns (cat,sed,grep, heredocs). - Schema & Format Validity: Per-call penalties for malformed JSON tool arguments (e.g., missing
patch.path). - Error Recovery: Credits trajectories that diagnose and recover cleanly from failing tool calls or tests.
- Pass-Gated Efficiency Polish (Stage 4B): Rewards concise turn counts and token budgets strictly gated on clean passing execution, preventing reward hacking via premature stops.
3. Compute Used & Training Lineage
- Cloud GPU Hardware: Single-GPU cloud NVIDIA RTX PRO 6000 Blackwell Server Edition (96 GB VRAM) instances (up to 2 parallel instances during controlled 2-arm ablations).
- Direct Reproducible Champion Path (
100cumulative GSPO steps,6,400online multi-turn rollouts):- Stage 2B — Core Hermes tool discipline (
20steps):~4.1GPU-hours - Stage 3B — Polyglot hard multi-file engineering & recovery (
40steps):~9.4GPU-hours - Stage 4A (
lr=6e-6,max_turns=10, JS/Python upweight,15steps):~3.4GPU-hours - Stage 4A (
py3xbranch,3×Python /2×JS,896tok/turn unlock,15steps):~3.5GPU-hours - Stage 4B — Pass-gated efficiency polish (
75/25replay,10steps):~2.4GPU-hours - Direct Champion Path Total:
~23 GPU-hourson 1× NVIDIA RTX PRO 6000 Blackwell (96 GB).
- Stage 2B — Core Hermes tool discipline (
- Full Autonomous R&D Training Campaign (including Stage 1 baseline + controlled DAPO/GSPO, LR, and efficiency-polish ablations):
~67.9 GPU-hours(~38hwall-clock across up to 2 parallel GPUs). - Total End-to-End Cloud GPU Compute (full training campaign + all external Harbor
420-trial & multi-seed400-rollout evaluations):~91.2 GPU-hours.
4. Results — What It Improves
A. External Real-World Code Editing: SWE-bench Pro V2 Hard-51 (51 × 3 = 153 Trials, 100% Coverage)
Evaluated end-to-end via Harbor (scaleapi/SWE-bench_Pro-os) with Hermes Agent in air-gapped Docker (131K context, effort=none, temp=0.8, top_p=1.0, 1800s cap, 0 infra exceptions) on 16-bit vLLM against Stage 0 Base and Hugging Face's B300-trained harness-hub inkling-hermes (checkpoint-80):
Model (16-bit vLLM, effort=none, 30m cap) |
Pass@1 (51/51) |
Hermes Discipline | Anti / Task | Parallel | Terminal Share | Avg Calls (Solved) | Avg Output Tok (Solved) | Avg Wall Time |
|---|---|---|---|---|---|---|---|---|
Stage 0 Base (Inkling-2-Mini) |
45.1% (23/51) |
21.1% |
23.53 |
1.4% |
82.9% |
49.0 |
21,446 |
638.1s |
HF harness-hub ckpt-80 (B300) |
49.0% (25/51) |
19.2% |
24.35 |
1.5% |
84.2% |
43.0 |
20,161 |
660.6s |
Our Champion (stage4b-eff-10) |
52.9% (27/51) |
92.3% |
2.43 |
6.0% |
21.3% |
38.5 |
10,256 |
502.0s |
- Paired outcomes (
n = 51common graded set):- vs Base:
+7.8 pp(9wins /5losses /18both-pass, 95% CI[-5.9, +21.6] pp, McNemarp=0.424),+71.2 ppHermes discipline,10×fewer shell antipatterns,-28.8%tool calls &-55.6%output tokens on jointly-solved tasks (n=18), and-21.3%faster wall time. - vs HF B300
ckpt-80:+3.9 pp(6wins /4losses /21both-pass, 95% CI[-7.8, +15.7] pp, McNemarp=0.754),+73.1 ppHermes discipline,10×fewer antipatterns,-17.9%tool calls &-54.0%output tokens on jointly-solved tasks (n=21), and-24.0%faster wall time.
- vs Base:
- (Methodology note: absolute pass rates here differ from
harness-hub/Inkling-2-Mini-pi-adapted's66.7% → 70.6%because that evaluation used thepiharness at reasoning efforthighwith a2-hourper-task cap, whereas this 3-way run used Hermes Agent ateffort=nonewith a30-minutecap — compare models only within matched harness and budget.)
B. Multi-Seed High-Power Hermes Suites (--k 4 @ temp=0.6, 400 Rollouts, 16-bit vLLM, Default Effort)
| Suite & Model | mean_pass@1 |
pass@4 |
pass^4 (4/4) |
Discipline | Anti / Rollout | Parallel | Recovery | Avg Latency | Joint-Pass Output Tok |
|---|---|---|---|---|---|---|---|---|---|
frontier_20 — Base (80 rollouts) |
82.5% (66/80) |
90.0% |
70.0% |
41.1% |
4.450 |
10.7% |
61.4% |
68.6s |
252,120 (n=62) |
frontier_20 — Champion |
88.8% (71/80) (+6.3 pp) |
95.0% |
80.0% (+10 pp) |
95.4% (+54.4 pp) |
0.638 (-85.7%) |
35.5% (3.3×) |
85.1% (+23.8 pp) |
49.2s (-28.3%) |
175,972 (-30.2%) |
Held-Out blind_30 — Base (120 rollouts, agg) |
98.3% (118/120) |
100.0% |
93.3% |
28.1% |
1.942 |
4.5% |
96.1% |
14.9s |
72,757 (n=115) |
Held-Out blind_30 — Champion (agg) |
97.5% (117/120) (tied, p=1.0) |
100.0% |
93.3% |
97.0% (+68.9 pp) |
0.125 (-93.6%) |
21.0% (4.7×) |
94.7% |
14.1s |
54,772 (-24.7%) |
C. Single-Seed & Out-of-Distribution Hermes Suites
| Benchmark Suite | Runtime | Stage 0 Base | HF ckpt-80 (B300) |
Our Champion (stage4b-eff-10) |
Key Gain vs Base |
|---|---|---|---|---|---|
frontier_20 (seed 42, default effort) |
16-bit vLLM | 70.0% (14/20) |
75.0% (15/20) |
90.0% (18/20) |
+20.0 pp pass · 96.4% disc · 36.3% parallel · 94.7% recovery |
hard_dev_16 (Hermes discipline & patch) |
16-bit vLLM | 100.0% (16/16) |
100.0% (16/16) |
100.0% (16/16) |
99.0% disc (100.0% at effort=none, 0 anti) · 100.0% valid |
OOD sec_audit_12 (12 unseen defensive code-audit repos) |
4-bit MLX oQ4e-mtp |
75.0% (9/12) |
75.0% (9/12) |
83.3% (10/12) |
+8.3 pp pass · 100.0% disc (0 anti!) · 44.0% parallel (7.6× HF) · -37.9% wall |
Held-Out blind_30 (aggregate-only) |
4-bit MLX oQ4e-mtp |
96.7% (29/30) |
96.7% (29/30) |
100.0% (30/30) |
Only 100% sweep · 99.1% disc (+79.9 pp) · -25% output tok vs HF · -50% wall vs Base |
5. What Got Worse & Known Tradeoffs
- Open-Ended Linux/Sysadmin CLI Benchmarks at
effort=none(Terminal-Bench 2.1):- On Terminal-Bench 2.1 (
89 × 3 = 267trials,effort=none,temp=0.8,1200scap, 16-bit vLLM):- Stage 0 Base:
47.2%(42/89) (22timeouts,11.0%discipline,531.0savg wall) - HF
ckpt-80(B300):46.6%(41/88) (16timeouts,9.7%discipline,469.0savg wall,1verifier timeout) - Our Champion:
39.3%(35/89) (-7.9 ppvs Base, 95% CI[-15.7, +0.0] pp, paired McNemarp=0.092, n.s. atp<0.05)
- Stage 0 Base:
- Why it got worse: We explicitly trained the model away from bash-first shell strategies in favor of structured Hermes file/patch tools, and our RL curriculum used non-zero reasoning effort (
0%effort=nonecoverage), makingeffort=noneplans overly terse on exploratory non-coding CLI puzzles. - Efficiency tradeoff on TB 2.1: Even where pass rate dropped, timeouts fell
-45%(22 → 12), jointly-solved output tokens fell-41.3%vs Base (-22.3%vs HF), average wall time fell-21.8%, and Hermes discipline jumped+58.2 pp(11.0% → 69.2%).
- On Terminal-Bench 2.1 (
- Reasoning Effort Setting:
- Tool discipline stays at
92–100%ateffort=none(and it still winsSWE-bench Pro V2 Hard-51), but complex open-ended tasks perform best with default reasoning effort enabled.
- Tool discipline stays at
- Best-Fit Scope:
- Purpose-built for Hermes Agent software engineering, multi-file editing, debugging, and code auditing. For pure free-form Linux/bash administration without Hermes file/patch tools, use the unmodified base model (or serve both simultaneously via vLLM multi-LoRA and select per request).
6. Usage (PEFT & vLLM Multi-LoRA)
Loading with PEFT
from peft import PeftModel
from transformers import AutoModelForCausalLM, AutoTokenizer
base_id = "thinkingmachines/Inkling-2-Mini"
adapter_id = "rdsm/inkling_hermes_tune-inkling-2-mini-rl-lora"
tokenizer = AutoTokenizer.from_pretrained(adapter_id)
model = AutoModelForCausalLM.from_pretrained(base_id, dtype="auto", device_map="auto")
model = PeftModel.from_pretrained(model, adapter_id)
Serving Alongside Base in vLLM (--enable-lora)
Note on
Inkling-2-MiniLoRA key names in vLLM: HF PEFT saves attention keys undermodel.language_model.layers.*.self_attn.{q,k,v,o}_proj.linearando_proj.gate_proj, whereas vLLM's nativeInkling-2-Miniimplementation expectsmodel.llm.layers.*.attn.{wq_du,wk_dv,wv_dv,wo_ud,gate_attn}(withtarget_modulesset to["gate_attn", "wk_dv", "wo_ud", "wq_du", "wv_dv"]). After remapping those key names inadapter_model.safetensors:
python -m vllm.entrypoints.openai.api_server \
--model thinkingmachines/Inkling-2-Mini \
--max-model-len 131072 \
--kv-cache-dtype fp8 \
--enable-prefix-caching \
--reasoning-parser inkling \
--tool-call-parser inkling \
--enable-auto-tool-choice \
--enable-lora \
--max-lora-rank 32 \
--lora-modules hermes-rl=./remapped-adapter-dir
Then select "model": "hermes-rl" or "model": "thinkingmachines/Inkling-2-Mini" per OpenAI /v1/chat/completions request on the same GPU.
Repository Contents
Clean release containing only the final crowned Champion BF16 LoRA (stage4b_eff/checkpoint-10, 33.41 MiB):
adapter_model.safetensors&adapter_config.json— PEFT BF16 attention-only LoRA (r=32, alpha=64)tokenizer.json,tokenizer_config.json,chat_template.jinja,processor_config.json— Tokenizer & chat templatechampion_manifest.json&SHA256SUMS.txt— Provenance & cryptographic checksums
- Downloads last month
- 37
Model tree for rdsm/inkling_hermes_tune-inkling-2-mini-rl-lora
Base model
thinkingmachines/Inkling-2-Mini