Inkling-2-Small-Looped Preview Launch Banner

Preview Experimental Status Base Model Adapter Size Validation NLL Docker Image License

Research Preview / Experimental Release Β· 60 layers of compute in 48 layers of VRAM Β· 0% KV-cache growth Β· ~$48.50 end-to-end training

Preview Highlights Β· Architecture Β· Training Β· Serving Stack Β· Benchmarks Β· Quick Start Β· Repo Layout

Preview / Experimental Release Notice

Inkling-2-Small-Looped (loop_r3) is an early research preview and experimental serving build.

  • loop_r3 is our first end-to-end supervised recurrent-depth checkpoint (~$48.50 total compute) and captures an estimated 60–70% of the adapter ceiling; higher-rank SFT and RL-on-the-loop iterations are still ahead.
  • Validation NLL improves by -13.66% (0.23498 β†’ 0.20288), GSM8K greedy matches stock (96.0%, 288/300, p=1.000), and T=1 is bit-exact stock (0.000000 drift). Note that further testing is needed, but lack of compute has prevented more downstream evaluations (such as LiveCodeBench and broader agentic suites) so far.
  • The 4Γ— DGX Spark serving stack runs on a development SGLang image (experimental-1.10). See aidenle.com/research for the full interactive research console and honest limits.

Preview Status & Highlights

Inkling-2-Small-Looped (aidendle94/Inkling-2-Small-Looped-DGX-Spark, formerly aidendle94/Inkling-2-Small-DGX-Spark) brings test-time recurrent depth (T = 2) to thinkingmachines/Inkling-2-Small without modifying a single frozen base weightβ€”paired with a pre-sharded, hardened 4Γ— NVIDIA DGX Spark (GB10, 4Γ— 128 GB unified RAM) SGLang serving stack.

Everything needed to run either the Looped (T = 2) preview or the Stock (T = 1) variant lives in one repository: per-node pre-sharded base weights (rank0/–rank3/), the byte-for-byte unmodified official checkpoint (full/), the universal 95.6 MB recurrent-depth adapter (loop-adapter/), a 0.00 ms load-folded aligned 5-layer MTP drafter, a calibrated speculative confidence head, and a zero-precision-loss SGLang serving overlay.

  • 60 effective layers from a 95.6 MB adapter: Loops the 12-layer Core block (L30–L41) twice over 48 frozen physical layers using 23.90M trainable FP32 parameters (0.004% of the 594B backbone), cutting held-out validation NLL by -13.66% (0.23498 β†’ 0.20288, peak -13.75% at step 900) while remaining bit-exact stock at T = 1 (0.000000 drift across all 48 layers).
  • Zero KV-cache growth (Last-Loop KV): Pass 1 overwrites physical KV slots [30..41] in-place while isolating tiny per-pass short-convolution states across 60 layersβ€”preserving a 1,050,000-token NVFP4 KV pool across 524,288 context with 0% extra KV memory.
  • Near-stock decode speed on 4Γ— DGX Spark: Pre-merged Coda (0 MB, 0 ms), 12-bit packed Pass-1 CoreLoRA (0 runtime LoRA kernels), 7 fused Triton seam kernels (2.96Γ— faster), a 0.00 ms load-folded Aligned 5-Layer MTP v2 drafter, and a calibrated confidence head deliver 52.1–56.0 tok/s greedy (60.1–64.0 ms/step, peaking at 57.2 tok/s at Ο„=0.50), 80–100.9 tok/s at BS=4, and 35–67.2 tok/s live at 394K active context.
  • Trained for ~$48.50 total: $9.46 for 3,790 verified on-policy traces + ~$39 for 1,000-step looped SFT (loop_r3) on 8Γ— RTX 4090 + $0 local 4Γ— DGX Spark MTP v2 alignment and gate-head calibration.
  • Drop-in API naming: Serves under inkling-2-small-looped with inkling-2-small aliased by default (SPARK_SERVED_ALIASES), so existing OpenAI/Ollama clients work without changes.

Architecture: How Recurrent Depth Works

Animated Recurrent-Depth Forward Pass of Inkling-2-Small-Looped

Inkling-2-Small's 48 physical MoE layers (8 AttnRes blocks of 6 layers) are partitioned into three zones with zero base-weight modifications:

Zone Physical Layers Role in Inkling-2-Small-Looped (T = 2) Serving Cost
Frozen Prelude (B0–B4) L0 – L29 (30 layers) Runs once at stock NVFP4/MXFP8 speed; caches the prelude anchor state and AttnRes block summary. 0 extra FLOPs, 0 extra weights
Recurrent Core (B5–B6) L30 – L41 (12 layers Γ— 2 passes) Pass 0 runs unmodified frozen base weights (KV[30..41]). Pass 1 enters via fused Triton WorkspaceEntry + AttnRes Rewind, applies pre-merged 12-bit CoreLoRA (rank 32 attn, rank 16 router) + mid-core CrossPassMixer@L36 (rank 128), and overwrites KV[30..41] in-place (Last-Loop KV). 0% KV growth Β· 0 runtime LoRA kernels
LoopCD + Folded Coda (B7) L42 – L47 (6 layers) Fused Triton LoopCD-Hidden (Ο‰ = 0.3) contrasts Pass 1 against Pass 0 before entering the Coda; CodaLoRA (rank 32) is folded directly into base weights at load time. 0 MB extra Β· 0 ms LoRA cost
Aligned MTP v2 + Gate 5-layer DSpark drafter Rank-64 alignment LoRA + fuse_weight/markov_head folded into BF16 mtp.safetensors inside load_weights before int8 quantization, paired with a calibrated 256-unit confidence MLP. 0.00 ms runtime overhead

Key Architectural Design Choices

  1. Last-Loop KV Caching (--kv-mode last_loop): Standard recurrent transformers double KV-cache memory across core layers. By training and serving with Last-Loop KV, Pass 1 overwrites physical slots [30..41] in-place while keeping tiny linear-attention sconv states isolated across 60 logical layers (0..47 plus 48..59 for Pass 1). On held-out validation, T=2 last_loop achieves 0.20298 NLLβ€”matching or beating per_pass KV on 6 of 11 checkpoints while keeping 100% of our 1.05M-token NVFP4 KV pool.
  2. LoopCD-Hidden (Ο‰ = 0.3): Contrasting Pass 1's refined hidden state against Pass 0's unlooped hidden state right before L42 (h = h_1 + Ο‰ Β· (h_1 - h_0), RMS-preserved) amplifies depth-gained reasoning signal and eliminates premature </think> collapse (max_Ξ”stop = -4.21).
  3. Universal TP-Agnostic Adapter (95.6 MB, 155 tensors): loop-adapter/adapter_model.safetensors stores all 23.90M FP32 parameters in standard unsharded Hugging Face layout and auto-shards cleanly at boot for any tensor-parallel degree (TP = 1, 2, 4, 8, 0.000e+00 round-trip error).

Training Pipeline (~$48.50 End-to-End)

Inkling-2-Small-Looped 4-Stage Training Pipeline and Validation NLL Convergence

Because the Prelude (L0–L29) is completely frozen, we pre-compute and cache its hidden-state anchors once on disk (288 GB in 63 min)β€”eliminating 62.5% of base-model forward compute during looped SFT and bringing the entire end-to-end training budget down to ~$48.50:

Stage Compute & Cost Dataset & Method Verified Outcome
1. Verified Trace Generation Tinker API Β· $9.46 5,157 on-policy rollouts β†’ 3,790 verified traces (73.5%, unit-tested code, exact-match math & JSON schema) Clean, zero-noise reasoning supervision (5.20M train tokens)
2. Looped SFT (loop_r3) Vast 8Γ— RTX 4090 (7.5h) Β· ~$39 1h prelude cache + 6h 1,000-step recurrent SFT (23.90M FP32 params: CoreLoRA, CodaLoRA, WorkspaceEntry, CrossPassMixer@L36, Last-Loop KV, LoopCD Ο‰=0.3, CE + sparse top-128 teacher KL + stop guard) Val NLL 0.23498 β†’ 0.20288 (-13.66%); peak -13.75% @ step 900; T=3 scales cleanly (0.20309)
3. Aligned 5-Layer MTP v2 Local 4Γ— DGX Spark Β· $0 500 train + 32 val rows of live loop_r3 teacher logits; rank-64 LoRA + fuse_weight/markov_head folded at load time Held-out val_kl -59.9%; val accept length +0.523 (5.22 β†’ 5.74); 0.00 ms runtime overhead
4. Calibrated Gate Head Local 4Γ— DGX Spark Β· $0 Warm-started from gate-head-mlp-reg.pt on 2,990 live loop_r3 + Aligned MTP steps (gate-head-loop-r3-mtp.pt) Brier score -10.23%; +1.84% BS=1 / +2.15% BS=4 throughput

All training scripts, configs, and evaluation harnesses are bundled in loop-adapter/README.md under the MIT license.


Serving Stack: 4Γ— DGX Spark (Zero Precision Loss)

4x NVIDIA DGX Spark GB10 Serving Architecture and Stability Hardening

Running a 60-effective-layer multimodal MoE with a 1.05M-token KV pool on four 128 GB unified-memory GB10 nodes requires tight co-design across kernel fusion, speculative decoding, and unified-RAM management. Every optimization in loop-adapter/serving/loop_depth.py is strictly lossless:

Lossless Decode Speed Optimization Progression on 4x DGX Spark

Three Engineering Pillars

  1. Zero-Overhead Loop Fusion
    • Pre-merged weights: CodaLoRA (L42–L47) is folded in-place (0 MB, 0 ms), and Pass-1 CoreLoRA (L30–L41) is pre-merged and packed into exact 12-bit _p12 weights (0 runtime LoRA kernels).
    • Full megakernel + Triton seams: 58 / 60 effective layers stay fused through megakernel layer_glue, bridged by 7 custom Triton seam kernels replacing 66 unfused PyTorch ops (2.96Γ— seam speedup across WorkspaceEntry, CrossPassMixer@L36, and LoopCD-Hidden), with spark_gate and 200 GbE roce_live active.
  2. Aligned Speculative Decoding
    • Unaligned stock MTP drops acceptance under recurrent depth because Pass 1 shifts next-token distributions. Folding our rank-64 Aligned MTP v2 weights into mtp.safetensors inside load_weights (before dense_i8/markov_i8 quantize) restores high speculative acceptance (4.8–5.9 tokens/step) at 0.00 ms extra latency.
  3. Unified-RAM & Multimodal Stability Hardening
    • Zero-quality-loss memory reclamation (~1.66 GB/rank freed): Retains native BF16 attention on all 48 base layers (SPARK_DENSE_P12=attn,head) without duplicating BF16 Core LoRA copies (-541 MB/rank), frees redundant BF16 lm_head.weight (-463 MB/rank), and frees dead visual encoder weights on ranks 1–3 (-655 MB/rank).
    • Eliminated 6.43 GB multimodal CPU RSS spikes (384Γ— smaller payload): In SGLang's multi-node broadcast_pyobj, raw IMAGE pixel tensors were previously pickled and broadcast to ranks 1–3 with 3Γ— CPU copies even though inkling2.py only encodes vision on rank 0. Our zero-copy broadcast_pyobj + rank 1–3 dead IMAGE feature strip shrinks per-request rank 1–3 broadcasts from 38.4 MB β†’ 0.1 MB while preserving exact multi-image visual outputs.
    • Predictable long-context behavior: Sparse decode CUDA graph tiers (1 2 4 8, 1.15 GB total), single outer-forward allocator trim (>= 512 MB), and boot-time Triton warmup for odd-remainder prefill chunks (rows=16 & 17) keep all 4 nodes at 6.76–9.57 GB steady MemAvailable even after 162K cold prefills and 4Γ— 1600Γ—1000 images.

Benchmarks

Preview Looped (loop_r3, T = 2) vs. Stock (T = 1) Summary

Metric Stock Inkling-2-Small (T = 1) Inkling-2-Small-Looped (T = 2, Preview) Notes
Effective Depth 48 layers 60 layers (L30–L41 Γ— 2) Same 48 physical base layers (T=1 bit-exact)
Held-Out Val NLL 0.23498 0.20288 (-13.66%) Peak -13.75% @ step 900; Last-Loop KV 0.20298
GSM8K Greedy Gate (300q) 96.0% 96.0% (288/300, p=1.000) Zero regression; zero </think> collapse
BS=1 Decode (coding, greedy / T=1.0) 63.3 / 55–56 tok/s 52.1–56.0 / 49.1 tok/s (57.2 @ Ο„=0.50) 60.1–64.0 ms/step with Aligned MTP v2
BS=4 Decode (batch) 92–111.7 tok/s 80–97.6 tok/s (peaks 100.9) 100.9 tok/s on GSM8K at 4.84 accept len
Live Long-Context Decode 47.6 (FP8) / 52.2 (NVFP4) @ 500K 35–67.2 tok/s @ 394K 98.2% prefix cache hit, accept up to 5.9
Cold Prefill Throughput 3,110 (30K) / 2,786 (120K) tok/s 2,115 (81K, chunk=4096) / 2,416 (39K, chunk=8192) 0% KV growth across loop passes
Context / NVFP4 KV Pool 524,288 / 1,409,000 tokens 524,288 / 1,050,000 tokens Steady MemAvailable: 6.76 / 9.11 / 9.55 / 9.57 GB

All looped preview numbers measured 2026-12-04 on the 4Γ— DGX Spark GB10 test fleet with the current stable zero-precision-loss recipe below; stock numbers measured 2026-11-16 to 2026-11-23 (full methodology in sparkrun-recipes docs/results.md). Note that further testing is needed, but lack of compute has prevented running more evals.


Quick Start

Container image: aidendle94/sparkrun-sglang-inkling2-gb10:experimental-1.10 on Docker Hub (public; stock recipe also runs on experimental-1.5). Recipes & research console: github.com/aidendle94/sparkrun-recipes (recipes/inkling-2-small/sglang) Β· Interactive research page at aidenle.com/research Β· Serving write-up.

Option A: Launch Inkling-2-Small-Looped (T = 2 Preview β€” Current Stable Recipe)

1. Download per-node pre-sharded weights on each of the four DGX Spark nodes (R = 0, 1, 2, 3, ~93 GB per node):

# Cap download page cache on GB10 unified memory so it never competes with active workloads
systemd-run --user --wait --pipe -p MemoryMax=4G hf download aidendle94/Inkling-2-Small-Looped-DGX-Spark \
  --include "rank<R>/*" --local-dir ~/inkling2-weights

2. On Rank 0, clone sparkrun-recipes, download the loop-adapter/ bundle (~587 MB), and launch the verified stable recipe (the launcher syncs the isolated patch overlay and adapter to all 4 nodes automatically without modifying sparkrun-recipes):

# 1. Clone sparkrun-recipes (for base patches/ and launch/fleet.env)
git clone https://github.com/aidendle94/sparkrun-recipes ~/sparkrun-recipes
cp ~/sparkrun-recipes/recipes/inkling-2-small/sglang/launch/fleet.env.example \
   ~/sparkrun-recipes/recipes/inkling-2-small/sglang/launch/fleet.env
# Edit fleet.env with your 4 node IPs, SSH users, homes, RDMA HCAs, and fabric subnet.

# 2. Download the loop-adapter bundle onto rank 0
hf download aidendle94/Inkling-2-Small-Looped-DGX-Spark \
  --include "loop-adapter/*" --local-dir ~/inkling2-weights

# 3. Launch the stable zero-precision-loss recipe
chmod +x ~/inkling2-weights/loop-adapter/serving/launch_loop_server.sh
INKLING_REPO_REL=inkling2-weights \
IMPL=~/sparkrun-recipes/recipes/inkling-2-small/sglang \
~/inkling2-weights/loop-adapter/serving/launch_loop_server.sh \
  --arm loop_r3_stable \
  --ckpt ~/inkling2-weights/loop-adapter \
  --mtp-ckpt ~/inkling2-weights/loop-adapter/mtp/mtp_align_r3_v2_best \
  --depth 2 --kv-mode last_loop --omega 0.3 --triton-seams 1 --gate 0.4 \
  --gate-head ~/inkling2-weights/loop-adapter/serving/gate-head-loop-r3-mtp.pt \
  --dense-p12 attn,head --chunk 4096 --pool 1050000 \
  --cuda-graph-bs-decode "1 2 4 8" \
  --prefill-glue-rows epilogue=256,stream=128,gate=256

Stop all 4 containers cleanly:

IMPL=~/sparkrun-recipes/recipes/inkling-2-small/sglang \
~/inkling2-weights/loop-adapter/serving/launch_loop_server.sh --stop

Important Flag Notes:

  • API Model Name: Defaults to --served-model-name inkling-2-small-looped with SPARK_SERVED_ALIASES=inkling-2-small, so /v1/models and /api/tags advertise inkling-2-small-looped while staying drop-in compatible with clients requesting inkling-2-small. Override with --served-model-name / --served-aliases "".
  • Universal vs. Pre-sharded Adapter: --ckpt ~/inkling2-weights/loop-adapter loads the universal 95.6 MB adapter_model.safetensors and auto-shards per rank (or pass --ckpt ~/inkling2-weights/loop-adapter/adapters/loop_r3/step-001000 for pre-sharded TP=4 .pt files).
  • Prefill Chunk Tuning: --chunk 4096 --pool 1050000 is the recommended stable configuration for heavy 350K–470K multimodal agentic workloads on hosts running earlyoom -m 2. If earlyoom is disabled/relaxed on all 4 nodes, --chunk 8192 adds ~14–16% cold prefill speed on 8K–64K prompts (2,416 tok/s at 39K).

Option B: Launch Stock Inkling-2-Small (T = 1)

One-script NVFP4 KV quickstart (downloads each node's rank<R>/ folder, launches, and verifies):

git clone https://github.com/aidendle94/sparkrun-recipes
cd sparkrun-recipes/recipes/inkling-2-small/sglang-nvfp4-kv
./quickstart.sh <fabric address of node 0> <node 1> <node 2> <node 3>

Manual FP8 KV launch (after downloading rank<R>/* on each node):

git clone https://github.com/aidendle94/sparkrun-recipes
cd sparkrun-recipes/recipes/inkling-2-small/sglang
cp launch/fleet.env.example launch/fleet.env      # then edit it

export PRESHARDED=1 INKLING_REPO_REL=inkling2-weights
launch/launch-inkling2.sh --dry-run
launch/relaunch-inkling2.sh

Note: rank0/–rank3/ are built for 4 nodes and the recipe's default expert-width layout (each node checksum-verifies every parameter at boot against the official checkpoint). For other node counts or layouts, download --include "full/*" (394 GB) and launch with INKLING_SNAP=full (without PRESHARDED).


Repository Layout

Path Contents Size
rank0/ … rank3/ Per-node byte-for-byte pre-sharded slices of the official NVFP4 checkpoint (PRESHARDED=1), plus config, tokenizer & chat template ~93 GB each
full/ Official thinkingmachines/Inkling-2-Small checkpoint at revision b0e7afb8892a07897c78ce1c5b801a0d9cbd5e7b, byte-for-byte 394 GB
loop-adapter/ Complete loop_r3 preview release: universal 95.6 MB adapter_model.safetensors (23.90M params), TP=4 shards, Aligned 5-Layer MTP v2 (mtp_align_r3_v2_best), calibrated gate head (gate-head-loop-r3-mtp.pt), hardened loop_depth.py plugin, portable launch_loop_server.sh, and training code 587 MB
spark/gate-head-mlp-reg.pt Confidence head for the stock T=1 serving variant (256-unit MLP, sha256 0bc7b3d52da6c1bd...) 4.7 MB
assets/ Model Console launch graphics (hero-banner.svg, loop-forward.gif, training-pipeline.svg, serving-stack.svg, decode-progression.svg) ~1.9 MB

See loop-adapter/README.md for the complete adapter file inventory, architecture specification, and reproducible training commands.


Licence & Attribution

  • Base Model Weights (full/, rank0/–rank3/): Created by Thinking Machines Lab, released under the Apache License 2.0 (LICENSE), and subject to the publisher's Acceptable Use Policy. full/ is redistributed unmodified; rank0/–rank3/ contain byte-for-byte slices of it.
  • Looped Adapter, Aligned MTP v2, Calibrated Gate Heads, Serving Plugin, Launch Graphics & Training Code (loop-adapter/, spark/gate-head-mlp-reg.pt, assets/): Released under the MIT License, matching sparkrun-recipes on GitHub. See NOTICE.

Acknowledgments

A huge thank you to Looped DeepSeek-V4.1: Making a 552B Frontier Model Smarter and Faster (and Rescuing 1.75-Bit Local Macs) | Jason Titus (sliderforthewin/Looped-DeepSeek-V4.1-Flash) for inspiring this work and pioneering practical recurrent-depth loop adapters on frozen frontier MoE models.

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Model tree for aidendle94/Inkling-2-Small-Looped-DGX-Spark

Finetuned
(12)
this model