Inkling-2-Mini-Heretic (V2 Native Safetensors — True <5% Chat & Thinking Heretic + Native MTP/DSpark)

V2 Release Highlights (Verified on 1× NVIDIA RTX 3090 24 GB @ 280 W Cap)

  • True Dual-Mode Heretic Abliteration: 1.25% Direct Chat refusal (down from 100.0% on base and 20.0% in V1) AND 3.75% Native <|content_thinking|> refusal (2.50% at effort=high; down from 100.0% on base and 58.33% in V1), while preserving 93.75% GSM8K CoT accuracy, 100.00% Python coding pass@1, 0.00% XSTest false refusal, and 97.5% complete reasoning termination (KLD = 0.0360, WikiText-2 PPL = 8.607).
  • Single-Agent 258–306 tok/s (Turbo DSpark) & 114–131 tok/s (Full P=3 DSpark) on a Single 280W RTX 3090: Native DSpark (mtp.safetensors) recurrent Markov speculative decoding + custom sm_86 NVFP4/Q8_0 CUDA kernels (patches/llama_inkling2_sm86.patch).
  • High-Speed Multi-Agent Serving (26–38+ tok/s PER AGENT = 508–610 tok/s Aggregate at 8–24 Concurrent Agents): Unified KV (-kvu), zero-PCIe-D2H GPU backend sampling (-bs, standalone upstream PR patch in patches/llama_cpp_backend_sampling_pr.patch), graph-stable banded relative-position FlashAttention (GQA-3 Split-K), and CUDA-Graph cached DSpark verification.
  • Sibling Repository: Also available in JoaoZaokk/Inkling-2-Mini-Heretic-GGUF (5 Unsloth Dynamic GGUFs + dspark Draft GGUFs).

1. Architecture Overview (thinkingmachines/Inkling-2-Mini)

Inkling-2-Mini (33.3B total parameters, ~2.13B active parameters per physical layer) combines five architectural mechanisms rarely seen together:

  1. Depth-Looped MoE Core (P = 3 passes, 48 total layer visits):
    • Prelude blk.0..5 (6 visits) $\rightarrow$ Looped Core blk.6..17 executed 3 times (visits 6..17, 18..29, 30..41 = 36 visits sharing weights via learned rank-64 loop_down/loop_forget/loop_gain controllers) $\rightarrow$ Coda blk.18..23 (visits 42..47).
  2. Fine-Grained 128-Expert SITU MoE (top-k = 8 active):
    • blk.0..19 quantized natively in NVFP4 (E2M1 + E4M3 block-16 scales), Coda blk.20..23 in MXFP8 / Q8_0, gated by bounded SITU (beta*tanh(g/beta)*sigmoid(g) * lb*tanh(u/lb)).
  3. Block Attention Residuals (AttnRes) + Causal ShortConv (L = 4):
    • Depth-wise softmax attention queries (attn_res_query, ffn_res_query, loop_res_query, output_res_query) mix prior block representations, while 4-tap causal ShortConv layers wrap K, V, attn_output (Wo), and ffn_down_exps.
  4. 1,048,576-Token (1M) Hybrid SWA + Log-Scaled Relative-Bias Full Attention:
    • 5:1 pattern (40 SWA visits with W = 1,024 + 8 full-attention visits with learned 16-dim clipped relative bias + attention sinks).
  5. Native DSpark Multi-Token Predictor (mtp.safetensors):
    • Non-causal 8-token block draft transformer (2 layers: 1 SWA + 1 full) conditioned on [5, 23, 41, 48] target feature mixtures (blk.5, blk.11 Pass 1, blk.17 Pass 2, output_norm via dspark_fuse) plus a recurrent rank-256 GRU-like Markov head sharing tok_embd and output.weight.

2. True Heretic V2 Methodology (< 5% Refusal in Chat AND <|content_thinking|>)

Standard single-boundary abliteration fails on Inkling-2-Mini for three structural reasons:

  1. Looped Core Re-Injection: blk.6..17 execute across three distinct depth passes (v = l, l+12, l+24). Projecting only the final pass leaves Pass 0 and Pass 1 writing the refusal state into the AttnRes depth bank and loop_res_query message controllers.
  2. Pre-ShortConv Subspace Misalignment: Both attn_output (Wo) and ffn_down_exps sit upstream of causal ShortConv (conv_4 + residual). Probing post-visit l_out mixes AttnRes streams with convolved outputs. In V2, we hook wo_pre-0..47 and moe_pre-0..47 directly before ShortConv across all 48 visits.
  3. Mid-<|content_thinking|> Safety Pivot ($t^_i$)*: Under native reasoning (Thinking effort level: 0.9), refusal does not fire only at <|content_text|>; it ignites mid-monologue inside <|content_thinking|> when safety pivot tokens fire.

Five-Boundary Pre-ShortConv + Two-Stage Sequential Re-Probed Pipeline (ng = 2)

We generated real base-model <|content_thinking|> and Direct Chat traces across N=120 harmful (hb_cal), N=120 matched benign (hl_cal), and N=48 GSM8K CoT calibration prompts, extracting exact 193 × 2,304 pre-ShortConv activations per token across 5 causal boundaries:

  • B0_Direct: Effort 0 exact post-tag <|content_text|> onset.
  • B1_ThinkEntry: Effort 0.9 <|content_thinking|> entry + initial reasoning tokens.
  • B2_CoTOnset: Exact per-prompt safety-pivot onset window $[t^*_i - 3, \dots, t^*_i]$ inside real base-model <|content_thinking|> traces.
  • B3_PostCoT: Neutral analytical CoT prefix transitioning across <|end_message|><|message_model|><|content_text|>.
  • B4_ChatMidPivot: Pure mid-answer disclaimer/refusal pivot window $[t^*_{\text{chat}} - 2, \dots, t^*_{\text{chat}}]$ (chars 80..240) contrasted solely against same-domain compliant answers (filtering out 99/120 compliant technical completions so zero technical/coding prose direction is perturbed).

We then executed a Two-Stage Sequential Re-Probed Abliteration (ng = 2):

  1. Stage 1 (Frobenius-Guarded Layer Patch, norm_guard_layers = True): Projects out the ReasonShield-orthogonalized (B1+B2, B4_PurePivot, B0+B3) subspaces from wo_pre (attn_output) and moe_pre (ffn_down_exps, including NVFP4 experts in blk.11..17 and MXFP8/Q8_0 Coda blk.20..23) at ultra-low KLD = 0.0308.
  2. Stage 2 (Post-Stage-1 Exact result_norm Re-Probe, norm_guard_head = False): Re-probes result_norm (slot 192) on the Stage-1 patched model (eliminating layer-to-head rotation mismatch) and applies per-direction scaled orthogonal projection onto output.weight without rescaling refusal vocabulary rows back up (total KLD = 0.0360).

V2 Heretic Benchmark Results (Held-Out Test Suite)

| Model / Ablation Variant | Direct Chat Refusal (effort=0) | Native Thinking Refusal (<|content_thinking|>) | Thinking Finish Rate | XSTest False Refusal | GSM8K CoT (effort=high) | Python Coding (pass@1) | WikiText-2 PPL | Benign KLD | | :--- | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | | Base (thinkingmachines/Inkling-2-Mini) | 100.00% | 100.00% | 100.0% | 7.5% | 100.00% | 100.00% | 8.426 | 0.0000 | | V1_C5_Previous | 20.00% | 58.33% | 100.0% | 7.5% | 96.88% | 100.00% | 8.936 | 0.0591 | | V2_L1_Feather_0.66__H_Strong | 0.00% | 7.50% | 100.0% | 0.0% | 90.62% | 75.00% | 8.591 | 0.0297 | | V2_L2_Crisp_0.76__H_Strong (V2 Winner) | 1.25% | 3.75% | 97.5% | 0.0% | 93.75% | 100.00% | 8.607 | 0.0360 |

Two-Stage Surgical Calibration Grid (effort=high, Strict 1024-Token Canary)

Trial / Variant Chat Refusal Thinking Refusal Finish @ 1024 Cap GSM8K Canary Coding Canary Benign KLD Objective Score
V2_L1_Feather_0.66__H_Clean 0.0% 5.0% 70.0% 87.5% 75.0% 0.0289 101.97
V2_L1_Feather_0.66__H_Strong 0.0% 5.0% 75.0% 81.2% 75.0% 0.0297 107.62
V2_L2_Crisp_0.76__H_Strong 0.0% 0.0% 55.0% 81.2% 100.0% 0.0360 110.27
V2_L2_Crisp_0.76__H_Clean 0.0% 0.0% 55.0% 81.2% 83.3% 0.0351 126.59

3. RTX 3090 (sm_86 @ 280W) CUDA Kernel & DSpark Speed Engineering

We ship the full source patch in patches/llama_inkling2_sm86.patch, adding:

  1. NVFP4 INT8 Tensor Core mmq-few (m16n8k16 + cp.async) & Optimal MMVQ -> MMQ-Few -> Stream-K MMQ Crossover:
    • 1 token $\rightarrow$ __ldg-cached MMVQ; 2..16 tokens $\rightarrow$ NVFP4 mmq-few (with 648B/1224B half-tail & fused expert scale); 17+ tokens $\rightarrow$ Stream-K MMQ (2.2× faster multi-agent batches).
  2. Graph-Stable rpos Banded FlashAttention (GQA-3 Split-K):
    • Encodes valid/masked relative distances directly in 256-padded self_rel_pos, eliminating 10–39.5 GB/step of dense kq_b materialization, loading K/V once per 3 query heads, skipping other-agent -kvu cells in 1 cycle, and achieving 100% CUDA Graph reuse.
  3. 4 Subgraph Fusions + Q8_0 Loop-Gate & Markov Head Compression:
    • Fused 10-node LLM_FFN_SITU, 8/9-node ShortConv + state store, D = 16/64/128 L2-Clip, FusedInkling2LoopCache (BF16 -> Q8_0), and FusedInkling2Markov (492 MB -> 54.7 MB Q8_0, eliminating 3.4 GB HBM traffic per DSpark step).
  4. Zero-Copy DSpark Device Feature Injection + Unified Multi-Slot Draft Batching + GPU Greedy Sampling (-bs):
    • Enables dev_features = true + GPU llama_sampler_init_greedy() (4-byte D2H argmax instead of 25–102 MB PCIe logits transfer!) and unified ctx_dft multi-agent batching (48 serial passes $\rightarrow$ 2 batched GPU passes/step).

Single-Agent Speed Table (1× RTX 3090 @ 280W)

Configuration Peak Decode Speed Mean Decode Speed DSpark Acceptance
Solo_P3_k8 58.9 tok/s 58.0 tok/s 0.0%
DSpark_P3_k8 102.8 tok/s 98.2 tok/s 54.5%
DSpark_P3_k6 117.0 tok/s 109.8 tok/s 53.9%
DSpark_P3_k4 131.1 tok/s 122.1 tok/s 52.2%
Solo_P2_k8 79.5 tok/s 78.2 tok/s 0.0%
DSpark_P2_k8 130.4 tok/s 115.8 tok/s 45.3%
DSpark_P2_k6 171.3 tok/s 148.1 tok/s 54.4%
Solo_P1_k8 121.8 tok/s 121.1 tok/s 0.0%
DSpark_P1_k8 211.9 tok/s 188.6 tok/s 54.0%
DSpark_P1_k6 252.5 tok/s 203.9 tok/s 50.5%

Multi-Agent Concurrent Throughput (1× RTX 3090 @ 280W, -kvu -bs -ctk q4_0 -ctv q4_0)

Configuration Concurrent Agents (-np) Decode Speed / Agent Aggregate Decode Throughput End-to-End Wall Throughput DSpark Acceptance
Pure_np8_P3 8 21.6 tok/s/agent 172.4 tok/s 20.6 tok/s/agent (164.8 agg) 0.0%
Pure_np16_P3 16 14.9 tok/s/agent 238.9 tok/s 14.2 tok/s/agent (227.8 agg) 0.0%
Pure_np24_P3 24 11.8 tok/s/agent 282.7 tok/s 11.2 tok/s/agent (269.5 agg) 0.0%
DSpark_np8_n2_P3 8 26.4 tok/s/agent 210.8 tok/s 24.4 tok/s/agent (195.5 agg) 68.3%
DSpark_np8_n4_P2_k6 8 28.7 tok/s/agent 229.6 tok/s 26.8 tok/s/agent (214.3 agg) 38.7%
DSpark_np12_n2_P2_k6 12 23.2 tok/s/agent 278.7 tok/s 21.7 tok/s/agent (260.2 agg) 59.7%
DSpark_np16_n2_P3 16 14.4 tok/s/agent 230.4 tok/s 13.1 tok/s/agent (209.7 agg) 68.8%
DSpark_np16_n2_P2_k4 16 20.2 tok/s/agent 322.6 tok/s 18.6 tok/s/agent (298.1 agg) 60.1%
DSpark_np16_n3_P1_k6 16 29.6 tok/s/agent 473.8 tok/s 27.4 tok/s/agent (439.2 agg) 61.4%
DSpark_np24_n2_P1_k6 24 22.2 tok/s/agent 533.2 tok/s 20.4 tok/s/agent (490.1 agg) 69.0%
DSpark_np32_n2_P1_k4 32 15.8 tok/s/agent 505.1 tok/s 14.6 tok/s/agent (468.1 agg) 67.5%

V2 Quantization Matrix (UD-Q4_K_XL down to UD-Q2_K_XL)

Quantized Checkpoint File Size Prefill pp512 Solo tg128 (P=3) 1-Agent DSpark (P=3) 1-Agent Turbo DSpark (P=2 / P=1) 16-Agent Batched DSpark
Inkling-2-Mini-Heretic-UD-Q4_K_M.gguf 16.61 GB 1725.1 tok/s 61.3 tok/s 114.3 tok/s (100.0 avg) 140.2 (P=2) / 258.1 tok/s (P=1) 31.7 tok/s/agent (507.7 agg)
Inkling-2-Mini-Heretic-UD-Q4_K_XL.gguf 17.63 GB 1742.8 tok/s 62.0 tok/s 116.6 tok/s (101.8 avg) 136.2 (P=2) / 259.3 tok/s (P=1) 34.0 tok/s/agent (543.8 agg)
Inkling-2-Mini-Heretic-UD-IQ4_XS.gguf 15.73 GB 1750.2 tok/s 62.9 tok/s 118.5 tok/s (101.2 avg) 133.8 (P=2) / 268.9 tok/s (P=1) 36.6 tok/s/agent (585.7 agg)
Inkling-2-Mini-Heretic-UD-Q3_K_XL.gguf 13.63 GB 1762.9 tok/s 63.6 tok/s 104.4 tok/s (100.5 avg) 192.1 (P=2) / 279.2 tok/s (P=1) 32.5 tok/s/agent (519.5 agg)
Inkling-2-Mini-Heretic-UD-Q2_K_XL.gguf 9.14 GB 1796.7 tok/s 66.2 tok/s 122.2 tok/s (112.3 avg) 164.9 (P=2) / 306.2 tok/s (P=1) 38.1 tok/s/agent (610.2 agg)

(At UD-Q2_K_XL + Q4_0 KV cache, a single 24 GB RTX 3090 holds up to 655K–1,048K (1M) context tokens for 1 agent, or 32–64 concurrent agents with 16K–32K total context!)


4. Exact Reproduction Commands (How to Run at 200+ tok/s & Multi-Agent 25–50+ tok/s/agent)

Build with patches/llama_inkling2_sm86.patch

git apply patches/llama_inkling2_sm86.patch
cmake -B build -DGGML_CUDA=ON -DCMAKE_CUDA_ARCHITECTURES=86 -DCMAKE_BUILD_TYPE=Release
cmake --build build --target llama-server llama-cli llama-bench -j $(nproc)

A. Single-Agent Maximum Quality DSpark (P=3, Full 48 Visits) + 200+ tok/s Fast Modes (P=2 / P=1 / UD-Q2_K_XL)

Critical Flag: Always pass -bs (--backend-sampling) and --spec-draft-p-min 0!

# 1) Full 48-Visit (P=3) + DSpark (~110-165+ tok/s depending on quant/task)
./build/bin/llama-server \
  -m Inkling-2-Mini-Heretic-UD-Q4_K_M.gguf \
  -md dspark-Inkling-2-Mini-Q8_0.gguf \
  -ngl 999 -fa on -bs -c 16384 -np 1 \
  -ctk q8_0 -ctv q8_0 -ctkd q8_0 -ctvd q8_0 \
  --spec-draft-p-min 0 --spec-draft-n-max 6 --spec-draft-n-min 1

# 2) 200+ tok/s Single-Agent Mode (VarLoop P=2 = 36 visits or P=1 = 24 visits + DSpark, ~96% GSM8K retained at P=2!)
INKLING2_NUM_PASSES=2 INKLING2_EXPERT_USED=6 ./build/bin/llama-server \
  -m Inkling-2-Mini-Heretic-UD-Q4_K_M.gguf \
  -md dspark-Inkling-2-Mini-Q8_0.gguf \
  -ngl 999 -fa on -bs -c 16384 -np 1 \
  -ctk q8_0 -ctv q8_0 -ctkd q8_0 -ctvd q8_0 \
  --spec-draft-p-min 0 --spec-draft-n-max 6 --spec-draft-n-min 1

B. Multi-Agent High-Throughput Serving (16–24 Agents @ 25–50+ tok/s PER AGENT)

# 16 Concurrent Agents with Unified KV (-kvu), GPU Sampling (-bs), and Batched Single-Ubatch DSpark:
./build/bin/llama-server \
  -m Inkling-2-Mini-Heretic-UD-Q4_K_M.gguf \
  -md dspark-Inkling-2-Mini-Q8_0.gguf \
  -ngl 999 -fa on -bs -kvu \
  -np 16 --threads-http 24 -c 32768 -b 1024 -ub 1024 \
  -ctk q4_0 -ctv q4_0 -ctkd q8_0 -ctvd q8_0 \
  --spec-draft-p-min 0 --spec-draft-n-max 3 --spec-draft-n-min 1 --no-cache-idle-slots
Downloads last month
228
Safetensors
Model size
26B params
Tensor type
F32
·
BF16
·
F8_E4M3
·
U8
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for JoaoZaokk/Inkling-2-Mini-Heretic

Quantized
(324)
this model
Quantizations
2 models