AidenLab Research · Research preview

More compute.
Same weights.

A 95.6 MB loop adapter gives Inkling-2-Small, a frozen 594B-parameter MoE, 60 layers of compute in 48 layers of memory. Switched off, it is bit-exact stock. Switched on, it decodes 10–12% slower, and validation loss is 13.66% lower after fine-tuning.

Research experiment, not a production model. Memory, speed and bit-exactness are measured. Whether the loop itself improves quality is not: the matched control and broader evals still need to run, and I haven’t had the compute for them yet. No regression so far: it matched stock on GSM8K, and my own private testing hasn’t found one.
Hardware 4× DGX Spark · 8× 4090Cloud cost ≈ $48, final runStatus Experimental previewWeights Hugging Face ↗
INKLING-2 // LOOP DECK
ParamsFrozen
594B
AdapterTrained
23.9M
Val NLL · T=2▼ 13.66%
0.20288
Decode · BS=1τ = 0.50
57.2tok/s
KV pool · loop_r3 runno growth per token
1,409,000tokens
Inference loadCH 01–26
01 — Depth on demand

Turn the depth up. The weights stay put.

One 95.6 MB adapter lets Inkling-2-Small run its 12-layer core once, twice or three times per token. Compute grows with every pass; memory doesn’t move. Pick a depth to see what changes.

Looped twice

The 12-layer core runs a second pass, steered by the adapter. This is the released configuration. Most of the lower loss comes from fine-tuning; how much the second pass adds is still untested.

Layers of compute
60
Layers in memory
48
Validation NLL
0.20288
vs stock, after fine-tuning
-13.66%
KV memory per token
same as stock
Decode, batch 1
56.0 tok/s
02 — How it works

Three moves. Zero backbone changes.

The 594B backbone is never touched. Small trained modules sit at the seams between passes, and they are initialised to do nothing, so training starts from the exact stock model.

01 / FREEZE

Freeze the backbone

All 594B parameters stay frozen and quantized: NVFP4 on L0–41, MXFP8 on L42–47. At T=1 the model is bit-exact stock, verified to 0.000000 drift on every layer.

02 / LOOP

Loop the core

The 12-layer core (L30–41) runs T times with pass-conditioned LoRA slots, a WorkspaceEntry and a CrossPassMixer at L36: 60 layers of compute in 48 layers of VRAM.

03 / CACHE

Keep the KV cache

Last-loop KV caching shares the core’s KV slots across passes, so KV memory per token stays at stock’s; training was aligned to the serving path to a 0.00010 NLL gap.

FIG. 1 — THE WHOLE MODEL, LOOPED
The stack · 48 layers
EMBED · token → h₀
B0L0–5
B1L6–11
B2L12–17
B3L18–23
B4L24–29
B5L30–35LOOP
B6L36–41LOOP
B7L42–47
LM HEAD · logits
global attn SWA-1024
The core, zoomed · per pass
T = 2 · 2 passes
WorkspaceEntry
re-anchor to prelude · rank 256 · gates gs, gm
Core L30–35 + CoreLoRA
rank 32 · α 32 · slot-conditioned
CrossPassMixer @ L36
blends sprev into the pass · rank 128
Core L36–41 + CoreLoRA
rank 32 · α 32 · slot-conditioned
LoopCD-Hidden
hR vs h₁ · ω = 0.3 · RMS-preserved
last-loop KV · no extra memory per token
Live readout
Layer—
Pass—
Layers run60
KV pool1.409M
Adapter23.9M
awaiting run · weights frozen · T=2
READY — PRESS RUN
03 — Training

13.66% lower loss. Next: isolating the loop.

Validation NLL ends 13.66% below stock. The earliest signal came from the loop alone: at step 30, with only the loop gates trained, it was already 5.9% lower. Measuring how much of the final gain the loop earns needs a matched control, more seeds and wider evals, which limited compute has held back so far.

0.200.210.220.23step 02004006008001,000Stock model, 0.23498Loop gates only, LoRAs still frozen: −5.9%Peak: 0.20263 on the served KV path
Held-out validation NLL, loop_r3 on 8× RTX 4090, 74 rows, one seed. Lower is better. The gap between the orange line and the grey “gates closed” line is what the loop itself adds: 0.0006 by step 1,000. Hover or drag to read each checkpoint.
±0.0003the largest gap between the cheaper served cache and the per-pass ideal, at any checkpoint
Last-loop KV minus per-pass KV, in NLL, by training step; below the line, the served path scored lower. The sign flips 6 times in 11: on 74 validation rows these gaps are noise, so read this as “the same”, not “better”. Training half the rows on the serving attention pattern is what kept them this close.
04 — Serving

From 36 to 57 tokens a second. Still behind stock.

The first looped server was slow, mostly from integration bugs. Seven rounds of optimisation in SGLang, each measured on the same four DGX Sparks, brought it to 10–12% below the stock model’s last measurement.

+58%from the first, bug-limited loop build to today
9.6%below stock at the best 4-prompt run (11.5% on 8 prompts). Stock hasn’t been re-measured with the newer drafter.
  1. First loop bootUnfused Python LoRAs; the forward override bypassed three fast paths
    36.1489.63 ms/step
  2. LoRA fused into weightsCoda folded in place, pass-1 core pre-merged: zero LoRA kernels
    34.4484.54 ms/step
  3. Megakernel glue58 of 60 layers on fused post-attention and post-MoE glue
    39.7584.82 ms/step
  4. TurboDraft-verify masking and live RoCE restored: −19.5 ms per step
    48.6365.28 ms/step
  5. Triton seamsloop_r3 weights plus three fused seam kernels
    50.0667.15 ms/step
  6. Gate τ = 0.45Speculative accept length 3.44 → 3.75
    54.6268.56 ms/step
  7. Gate τ = 0.50Accept length 4.04: longer steps, more tokens per step
    57.2070.59 ms/step
Tokens per second at batch size 1, greedy decoding on 4× DGX Spark (tensor parallel 4). The dashed line is the stock model at 63.30 tok/s, which runs 48 layers instead of 60.
7fused Triton kernels at the loop seams
WorkspaceEntry3 kernels
CrossPassMixer3 kernels
LoopCD-Hidden1 kernel
Batch
Unfused, FP32
722.2 µs
Fused Triton
244.4 µs
2.96×
Seam latency per decode step on an RTX 4090. Outputs match the unfused path to a cosine similarity of 0.99999 or better, and CUDA graph capture at batch 8 reproduces them with zero error.
05 — Memory

Extra passes. No extra cache.

Every pass through the core would normally need its own key/value cache. Instead the final pass writes over the first, so a 2- or 3-pass model needs no more KV memory per token than stock.

One cache per pass60 KV layers, +25% memory per token
L0pass 1pass 2coda
Last-loop cache (served)48 KV layers; the final pass overwrites the first
L0corecoda
Tokens in the same memory
1,127,200 1,409,000
KV growth at T=2 or T=3
0%
Per-pass short-conv state
~12 MB, kept separate
Each square is one layer’s key/value entry for one token. 1,409,000 is the pool loop_r3 was measured with; the per-pass figure is 48/60 of it. The current stable launch recipe uses a smaller 1,050,000-token pool to leave memory headroom on the Sparks.
06 — Data

Trained on its own checked answers.

All training data was sampled from Inkling-2-Small itself and kept only when a unit test, exact-match math check or JSON-schema validator passed it.

  1. 5,157prompts sampled from the model itself
  2. 3,790answers that passed a deterministic check
  3. 3,679training rows (74 held out for validation)
  4. 5.20Mtraining tokens
Verified answers by source3,790 of 5,157 passed (73.5%)
  • Math (MATH L3–5)1,668
  • Coding, medium968
  • Retention (GSM8K train)525
  • Coding, hard361
  • Coding, stdin152
  • Tool calls (JSON schema)116
Every LiveCodeBench v5 and v6 problem (421 IDs, 409 titles) and every internal eval split was excluded before sampling. Generating the data cost $9.46.
07 — Model card

What’s frozen, what’s trained.

The adapter is 0.004% of the model’s size and ships as one file that loads at any tensor-parallel width.

Base model frozen

Model
Inkling-2-Small
Parameters
594B, all frozen
Layers
48, as 8 AttnRes blocks of 6
Hidden size
4,608
Attention
48 query heads, 8 KV heads (GQA 6:1)
Attention span
Sliding 1,024 on 40 layers, global on 8
Experts
384 routed, top-8
Precision
NVFP4 on L0–41, MXFP8 on L42–47
Vocabulary
201,024

Loop adapter trained

Trainable
23.90M parameters (0.004% of the model)
WorkspaceEntry
Rank 256, 3.58M: re-anchors each pass to the prelude
CrossPassMixer
Rank 128, 1.79M: blends the previous pass in at L36
CoreLoRA
L30–41, rank 32 on attention, rank 16 on the router
CodaLoRA
L42–47, rank 32, active only when T ≥ 2
LoopCD-Hidden
ω = 0.3, RMS-preserving contrast against pass 0
File
95.6 MB safetensors, 155 tensors
Tensor parallel
TP 1, 2, 4 or 8 from one file, 0.000e+00 round-trip error
08 — Run it

Three commands to serve it.

Base weights and the adapter bundle are public on Hugging Face, pre-sharded for four DGX Sparks. This is the current stable recipe.

rank 0 · 4× DGX Spark
# Rank-sharded base weights, on each node R = 0..3 (~93 GB per node)
hf download aidendle94/Inkling-2-Small-Looped-DGX-Spark \
  --include "rank<R>/*" --local-dir ~/inkling2-weights

# The loop adapter bundle, on rank 0 (~587 MB)
hf download aidendle94/Inkling-2-Small-Looped-DGX-Spark \
  --include "loop-adapter/*" --local-dir ~/inkling2-weights

# Serve: depth 2, last-loop KV, fused seams, aligned MTP drafter
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
09 — Roadmap

Shipped, and next.

loop_r3 captures an estimated 60–70% of what a supervised adapter can reach. The next steps go after the rest.

  1. Fused Triton seamsShipped

    66 PyTorch ops become 7 kernels; seams run 2.96× faster.

  2. Gate threshold sweepShipped

    τ = 0.50 reached 57.2 tok/s at batch 1, on a 4-prompt sweep.

  3. Prefill boostersShipped

    Bit-exact: +37.7% at 195 tokens, 2,527 tok/s at 16K.

  4. Aligned MTP drafterShipped

    Draft KL −59.9%; accepted length 5.22 → 5.74 tokens.

  5. Matched control and wider evalsNext

    A same-size non-looped LoRA on the same data and split, several seeds, LiveCodeBench and agentic suites. This decides whether the loop earns its keep. Limited compute has held it back.

  6. Pro SFTNext

    Rank 64 LoRAs, a small dense MLP per core layer, 15–20K hard traces. Target: ~85% of the adapter ceiling.

  7. RL on the loopNext

    Best-of-8 rollouts on the Sparks, GRPO updates on rented GPUs, KL-anchored to stock. Target: 92–95%.

  8. Sparse first passNext

    Top-4 experts on pass 0, top-8 on pass 1: an expected 4–5 ms off every step.