eltokh7/inkling-2-mini-decision)Inkling-2-Mini Decision v5.1 is an adaptive-depth decision model built on thinkingmachines/Inkling-2-Mini (26.4B total parameters, 3.4B–5.4B active MoE).
The model reads a state and one or more typed questions (choice, noul yes/no, or score) in one forward pass. It outputs calibrated probabilities and generates zero output tokens.
The middle 12 layers run in a loop between 1 and 5 times (24 to 72 logical layers). Simple questions stop after 1 pass. Hard multi-step questions loop deeper before the model answers. After Loop 5, a calibrated escalation head estimates whether to route the question to a slower System 2 model.
v5.1 combines two disjoint multi-teacher training epochs (Super-Epoch 1 + Super-Epoch 2) with zero-overhead Weight Space Programming (Astra Stage 8A/8B WSP) and ships with the production System15Engine (modeling.py).
v5.1 delivers major gains in adaptive halting speed, conformal safety, calibration, escalation ranking (AUROC = 0.8102), and held-out hard dev/numeric/judge accuracy. The table below compares every generation transparently, including the exact v5.0 vs. v5.1 tradeoffs.
| Benchmark / Metric | v1 (3L) | v3 (5L) | v4 (5L) | v5.0 (Ep 1) | v5.1 (Ep 2 + Astra WSP) | Reference baselines |
|---|---|---|---|---|---|---|
decision-v7/test ($n=1{,}440$) |
85.56% | 86.67% | 86.94% | 87.15% (L5) | 86.67% (L3) / 86.25% (L5) | Kev-27B (27B dense): 86.3% |
hard-v1/test ($n=1{,}088$, OOD) |
66.82% | 71.42% (L3) | 72.79% (L5) | 73.53% (L5) | 72.98% (L5, strictly monotonic) | Kev-9B v1 (9B dense): 58.4% |
hard-v1/dev ($n=1{,}083$, OOD) |
66.67% | 69.16% (L3) | 68.33% (L5) | 69.44% (L5) | 70.45% (L5 — new high) | Kev-9B v1: 58.2% · Jev: 78% |
v7/test Conformal balanced |
— | 86.39% @ 2.41L | — | 86.81% @ 2.13L | 86.11% @ 1.75L (0.42% fixable) | 65% loop savings vs. L5 |
hard-v1/test Conformal balanced |
— | 69.03% @ 3.62L | — | 72.15% @ 3.48L | 72.52% @ 3.10L (0.83% fixable) | Nearly 2× fewer fixable errors |
v7/test Escalation AUROC / Top-20% |
— | — | — | 0.7505 / 91.49% | 0.8102 / 92.88% (Oracle S2: 94.31%) | +0.060 AUROC via Astra WSP |
hard-v1/test Escalation AUROC / Top-20% |
— | — | — | 0.7437 / 80.11% | 0.7545 / 79.89% (Oracle S2: 83.92%) | Calibrated p_esc (26.3% vs 27.0% err) |
v5.1 Improves Over v5.0 (and Tradeoffs)decision-v7/test, balanced mode drops average depth from 2.13 to 1.75 loops with only 6 / 1,440 (0.42%) fixable early errors. On hard-v1/test, balanced mode rises from 72.15% @ 3.48L (16 fixable errors) to 72.52% @ 3.10L (9 / 1,088 = 0.83% fixable errors), and strict mode reaches 72.70% @ 3.18L with only 7 fixable errors (0.64%).decision-v7/test escalation AUROC from 0.7505 to 0.8102 (92.88% autonomous accuracy at 20% escalation; 94.31% with an oracle System 2) and aligns predicted escalate_prob with actual error rates (14.5% vs. 13.8% on v7/test; 26.3% vs. 27.0% on hard-v1/test).hard-v1/dev (70.45%), hard_temporal_numeric (51.3%), and hard_judge (76.6%): hard-v1/test Loop 1 rises to 52.67% and climbs monotonically to 72.98% at Loop 5 (ECE drops from 0.0944 to 0.0765).v5.0: Raw Loop-5 accuracy on v7/test (86.25% vs. 87.15%, peaking at 86.67% on L3) and hard-v1/test (72.98% vs. 73.53%) is ~0.5–0.9 pp below v5.0, while v5.1 wins clearly on adaptive hard-v1/test accuracy, halting speed, calibration, hard-v1/dev, and escalation AUROC.Input (state + question + options)
└─▶ Prelude: Layers 0–5 (run ONCE; cached across questions on the same state)
└─▶ Looped Core: Layers 6–17 (run 1 to 5 times)
• Parallel 170M LoopedSharedExpert with AdaLN-Zero(k) loop conditioning
• Learned message_gate controllers pass previous-loop state into pass k
• Layer-17 DynamicHaltingHead (~0.05 ms) decides: Halt now or Loop again
└─▶ Exit: Layers 18–23 (run ONCE at the chosen loop)
• CrossLoopTrajectoryMixer attends across loops 1..k
• FullContextEvidencePooler pools 100% of state tokens into <= 64 chunks
• JointSchemaHead outputs calibrated option probabilities
• EscalationHead predicts calibrated p_escalate for System 2 handoff
LoopedSharedExpert + AdaLN-Zero(k)): A 170M-parameter dense SwiGLU expert runs in parallel with the frozen MoE experts across layers 6–17. AdaLN-Zero(k) modulation (scale_k, shift_k, gate_k) gives each loop pass k = 1..5 a distinct role.FullContextEvidencePooler): Pools 100% of state tokens into up to 64 contiguous mean-pooled chunks with a residual projection before JointSchemaHead cross-attention.CrossLoopTrajectoryMixer): Causal attention across loops 1..k lets later passes combine earlier findings instead of overwriting them.test splits): baked 0.85 JointSchemaHead logit calibration, 22-DOF counterfactual first-hit DynamicHaltingHead optimization, and 19-DOF within-domain pairwise-ranking + OOF Platt calibration for EscalationHead. All edits are baked directly into standard heads.pt tensors with zero inference overhead.message_gate, moe_router, block_attn_res, message_input, final_norm) and 120 LoRA tensors are merged into standalone BF16 safetensors (v3-base preserved as an immutable git tag).Install the requirements:
pip install "transformers>=5.24.0" torch huggingface_hub
Load System15Engine from modeling.py. It supports single queries, shared-state multi-question prefix caching, batched active-set compaction, and deadline-bounded anytime streaming:
from modeling import System15Engine
engine = System15Engine.from_pretrained("eltokh7/inkling-2-mini-decision")
state = (
"Customer email: 'My card was charged twice for order #4821 yesterday. "
"I have a Pro plan. Please refund the duplicate charge.'"
)
questions = {
"route": {
"type": "choice",
"instructions": "Which team should handle this ticket?",
"criteria": {
"billing": "Duplicate charges, refunds, invoices",
"tech": "Bugs, login issues, crashes",
"sales": "Pricing, upgrades, quotes",
},
},
"urgent": {
"type": "noul",
"instructions": "Does this require immediate escalation?",
},
}
# 1. Shared-state multi-question execution (runs prelude layers 0..5 on `state` once)
out = engine.decide_multi(state, questions, mode="balanced", max_loops=5)
print(out["route"])
# Returns: answer, confidence, probabilities, loops_used, halt_score,
# escalate_prob, state_drift, flipped_from_L1, latency_ms
# 2. Batched active-set compaction across independent (state, question) pairs
batch_out = engine.decide_batch(
[(state, questions["route"]), ("Simple ping check.", questions["urgent"])],
mode="balanced",
)
# 3. Anytime streaming with a strict latency budget (yields Pass 1..5 refinements)
for step in engine.decide_anytime(state, questions["route"], deadline_ms=160.0):
if step["is_final"]:
print(step["answer"], step["loops_used"], step["readout"], step["escalate_prob"])
All accuracy, conformal, and escalation numbers come from the one-shot frozen evaluation (v5_final_champion_report.json). All GPU timing numbers come from real NVIDIA RTX PRO 6000 Blackwell 96 GB measurements (bench_v5_results.json).
v5.1)| Split | $n$ | Loop 1 (24L) | Loop 2 (36L) | Loop 3 (48L) | Loop 4 (60L) | Loop 5 (72L) | Δ vs. L1 |
|---|---|---|---|---|---|---|---|
decision-v7/dev |
1,468 | 81.54% | 84.47% | 84.88% | 84.81% | 84.88% | +3.34 pp |
decision-v7/test |
1,440 | 84.44% | 86.04% | 86.67% | 86.25% | 86.25% | +2.23 pp (L3) |
hard-v1/dev (OOD) |
1,083 | 48.01% | 65.74% | 70.45% | 70.45% | 70.45% | +22.44 pp |
hard-v1/test (OOD) |
1,088 | 52.67% | 67.74% | 72.33% | 72.89% | 72.98% | +20.31 pp |
hard-v1/test Subcategory Breakdown ($n=1{,}088$, v5.1)| Subcategory | $n$ | Loop 1 | Loop 3 | Loop 5 | Gain (L1 → L5) |
|---|---|---|---|---|---|
hard_tradeoff |
200 | 76.5% | 95.0% | 95.5% | +19.0 pp |
hard_probability |
158 | 59.5% | 77.2% | 77.2% | +17.7 pp |
hard_judge |
188 | 61.7% | 73.9% | 76.6% | +14.9 pp |
hard_ambiguous |
100 | 52.0% | 72.0% | 72.0% | +20.0 pp |
hard_multi_hop |
125 | 36.8% | 63.2% | 63.2% | +26.4 pp |
hard_long_policy |
200 | 31.5% | 63.5% | 63.0% | +31.5 pp |
hard_temporal_numeric |
117 | 41.9% | 49.6% | 51.3% | +9.4 pp |
Thresholds are frozen before reading calibration labels and certified once on decision-v7/calibration ($n=1{,}148$) with simultaneous Bonferroni correction ($\alpha = 0.05 / 3$).
| Split & Mode | Threshold | Cal Bonf 95% UCB | Acc | Avg Loops | L1 Exit | L5 Exit | Fixable Early Errors | Lucky Exits |
|---|---|---|---|---|---|---|---|---|
v7/test — fast |
0.923 |
1.19% | 85.97% | 1.52 | 61.0% | 0.4% | 15 / 1,440 (1.04%) | 11 |
v7/test — balanced |
0.969 |
0.67% | 86.11% | 1.75 | 51.4% | 3.1% | 6 / 1,440 (0.42%) | 4 |
v7/test — strict |
0.974 |
0.67% | 86.18% | 1.82 | 48.1% | 4.2% | 5 / 1,440 (0.35%) | 4 |
hard-v1/test — fast |
0.923 |
1.19% | 71.78% | 2.69 | 10.1% | 9.1% | 21 / 1,088 (1.93%) | 8 |
hard-v1/test — balanced |
0.969 |
0.67% | 72.52% | 3.10 | 4.3% | 22.1% | 9 / 1,088 (0.83%) | 4 |
hard-v1/test — strict |
0.974 |
0.67% | 72.70% | 3.18 | 3.0% | 24.4% | 7 / 1,088 (0.64%) | 4 |
Ranking questions by EscalationHead (escalate_prob) routes the highest-risk slice to a System 2 model while answering the rest autonomously.
| Split (Base L5 / AUROC) | Escalation Rate | Coverage | Autonomous Acc | 95% LCB | Error Recall | Oracle S2 Combined Acc |
|---|---|---|---|---|---|---|
v7/test (86.25% / AUROC 0.8102) |
5% | 95.0% | 88.16% | 86.62% | 18.2% | 88.75% |
v7/test (86.25% / AUROC 0.8102) |
10% | 90.0% | 89.74% | 88.24% | 32.8% | 90.76% |
v7/test (86.25% / AUROC 0.8102) |
15% | 85.0% | 91.26% | 89.81% | 46.0% | 92.57% |
v7/test (86.25% / AUROC 0.8102) |
20% | 80.0% | 92.88% | 91.51% | 58.6% | 94.31% |
hard-v1/test (72.98% / AUROC 0.7545) |
5% | 95.0% | 74.56% | 72.24% | 10.5% | 75.83% |
hard-v1/test (72.98% / AUROC 0.7545) |
10% | 90.0% | 76.71% | 74.38% | 22.4% | 79.04% |
hard-v1/test (72.98% / AUROC 0.7545) |
15% | 85.0% | 78.16% | 75.81% | 31.3% | 81.43% |
hard-v1/test (72.98% / AUROC 0.7545) |
20% | 80.0% | 79.89% | 77.52% | 40.5% | 83.92% |
System15Engine on RTX PRO 6000 Blackwell 96 GB, Eager BF16)Measured directly on v5.1 (bench_v5_results.json, mixed test.jsonl + hard_test.jsonl prompts, warmup + torch.cuda.synchronize(), eager BF16 without torch.compile):
Single-Query Latency & Adaptive Early Exit:
| Mode | Median (p50) | p90 | Avg Loops | Speedup vs. L5 |
|---|---|---|---|---|
| Fixed Loop 1 (24L) | 122.5 ms | 136.6 ms | 1.00 | 3.33× |
| Fixed Loop 2 (36L) | 191.3 ms | 214.9 ms | 2.00 | 2.13× |
| Fixed Loop 3 (48L) | 266.9 ms | 298.1 ms | 3.00 | 1.53× |
| Fixed Loop 4 (60L) | 335.9 ms | 373.7 ms | 4.00 | 1.21× |
| Fixed Loop 5 (72L) | 408.0 ms | 452.1 ms | 5.00 | 1.00× |
Adaptive fast |
212.8 ms | 243.1 ms | 2.38 | 1.92× |
Adaptive balanced |
217.4 ms | 301.5 ms | 2.75 | 1.88× |
Shared-State Prefix Caching (decide_multi) & Batched Active-Set Compaction (decide_batch):
| Capability & Workload | Engine Time | Baseline Time | Measured Speedup | Notes |
|---|---|---|---|---|
decide_multi (Q = 2 on shared long policy) |
284.9 ms | 516.8 ms (seq) | 1.81× | Prelude runs once on shared state |
decide_multi (Q = 4 on shared long policy) |
554.5 ms | 1,316.8 ms (seq) | 2.38× | Prelude runs once on shared state |
decide_multi (Q = 8 on shared long policy) |
838.4 ms | 2,633.5 ms (seq) | 3.14× | 104.8 ms/question effective |
decide_batch (B = 4, mixed easy+hard) |
979.8 ms | 1,364.2 ms (full L5) | 1.39× | Active set: [4, 4, 3, 1, 1] |
decide_batch (B = 8, mixed easy+hard) |
1,580.1 ms | 2,721.0 ms (full L5) | 1.72× | Active set: [8, 8, 5] (1.25× vs seq) |
decide_batch (B = 16, mixed easy+hard) |
3,355.9 ms | 5,605.0 ms (full L5) | 1.67× | Active set: [16, 16, 10, 1, 1] |
Anytime Deadline Streaming (decide_anytime, mixed prompts):
deadline_ms = 80 ms → 1.0L (62.5% acc) · 120 ms → 2.0L (75.0%) · 160 ms → 2.0L (75.0%) · 220 ms → 3.0L (87.5%).
hard_temporal_numeric improved to 51.3% on hard-v1/test (+4.3 pp over v5.0), yet exact date subtraction and multi-step billing math still benefit from external code execution or System 2 escalation.bench_v5_results.json GPU numbers above use eager PyTorch BF16 (~122 ms L1 / ~217 ms balanced on RTX PRO 6000). Adding torch.compile and causal_conv1d reduces per-pass latency further (the compiled v1/v3 runner measured 65.6 ms L1 / 136.8 ms L3).mode="balanced" (0.83% fixable errors on hard-v1/test) or mode="strict" (0.64% fixable errors) together with escalate_prob routing.Apache 2.0 (inherited from thinkingmachines/Inkling-2-Mini).
model-00007-of-00013.safetensors 4.2 GBmodel-00009-of-00013.safetensors 4.2 GBmodel-00006-of-00013.safetensors 4.2 GBmodel-00008-of-00013.safetensors 4.2 GBmodel-00005-of-00013.safetensors 4.2 GBmodel-00004-of-00013.safetensors 4.2 GBmodel-00010-of-00013.safetensors 4.2 GBmodel-00012-of-00013.safetensors 4.2 GBmodel-00003-of-00013.safetensors 4.2 GBmodel-00011-of-00013.safetensors 4.2 GBmodel-00002-of-00013.safetensors 4.2 GBmodel-00001-of-00013.safetensors 3.7 GBmodel-00013-of-00013.safetensors 1.4 GBscratchpad.pt 361 MBheads.pt 48 MBthinkingmachines/Inkling-2-Mini