Looped Models: Fewer Tokens, More Passes

Qwen3.8, DeepSeek V4.1 and their adapters: how looped layers change reasoning, why they save output tokens and what they cost.

A looped model does not add weights. It takes the middle of a transformer and runs it several times per token. On paper it looks like a cheap way to make a model “deeper”, but the saving appears somewhere else: the model finishes an answer with fewer output tokens.

That is why loop adapters have started appearing not only in new models, but as overlays on frozen Qwen3.8 and DeepSeek V4.1. Here is how it works, what the numbers show, and where the cost begins.

What a loop is

A normal transformer passes through every layer once. A looped variant picks a middle block — say layers 24–35 — and runs it T times before handing the result to the tail of the model. The block’s weights are shared: T=2 does not create a second copy of the layers, it makes a second pass through the same matrices.

Diagram of a looped block: encoder, repeated core and coda

A simplified diagram: encoder and coda stay frozen, the middle core runs T times. For DeepSeek V4.1 the original uses T=2 or 3; for Qwen3.8-27B, up to 4.

There are two different meanings:

  • More output tokens — ordinary chain-of-thought: the model writes more steps and spends context.
  • More latent iterations — looped passes: the model “thinks” inside its hidden state without printing intermediate reasoning.

The second is called recurrent depth. It does not need more context, but it needs more compute per token. If the model then writes half as many thinking tokens, total work can still fall.

Qwen3.8-Flash-Next

The official Flash-Next architecture: 125B parameters, 6B active per token, 48 layers, a 51B-parameter n-gram table and multimodal input. Attention is hybrid: three Gated DeltaNet layers compress history into a fixed-size state, and every fourth layer uses Qwen Sparse Attention to pick relevant context blocks.

Diagram of Qwen Sparse Attention

QSA: a lightweight indexer scores context blocks and keeps only the selected ones. Source: Qwen.

The loop adapter for Flash-Next is 70.2 million parameters, 268 MB, wrapping layers 16–31 and adding coda LoRA on 32–39. The base stays frozen, and T is switchable at runtime. At T=2 the effective depth is 64 layers instead of 48.

On 731 tasks (vLLM, FP8, H200, 64K cap):

  • LiveCodeBench v6: 77.71% → 85.71% (+8 points), −33.5% tokens;
  • GPQA Diamond: 91.41% → 91.41%, −37.3% tokens;
  • AIME 2025: 96.67% → 93.33% (−3.34 points), −32.9% tokens;
  • across five suites: +0.96 points, −34.2% tokens, but only −2.1% wall-clock.

The last line matters. There are fewer tokens, but each token is more expensive: at T=2 the model runs 64 layers instead of 48. On one RTX 3090 decode falls from 132.6 to 90.5–92.1 tok/s, while prefill drops from 1743 to 1205 tok/s. Saving output tokens does not turn into a free speedup.

Under a hard 24K budget the picture changes: stock hits the limit and loses quality, while the looped version has room to finish. LiveCodeBench: 57.5% → 77.5% (+20 points) with −30.7% tokens. The tighter the cap, the more useful the loop; short tasks without long reasoning may see no gain at all.

Qwen3.8-27B

The 27B has a different geometry: 64 layers, 16 full attention layers and 48 Gated DeltaNet layers. The loop adapter — 62.85 million parameters (240 MB) — wraps layers 24–39 and supports T=1…4. T=1 is bit-identical to stock; T=2 and T=3 give an effective depth of 80 and 96 layers.

Results at the official 80K and tighter caps:

  • LiveCodeBench v6, 175 tasks, 80K: 72.6% → 78.9%, about half the thinking tokens;
  • LiveCodeBench v6, 60 tasks, 64K: 73.3% → 85.0% in the best configuration;
  • AIME 2025 at 24K: 73.3% → 90.0% — stock at 80K also reached 90%, but spent twice as many tokens;
  • MMLU-Pro at 24K: 82.2% → 89.3% with −68% tokens;
  • HumanEvalFix: 98.8% → 97.0% — a small regression.

Per-token speed is almost unchanged: 36.7 versus 37.1 tok/s on an M5 Max. Answers get faster because the model finishes them with fewer tokens, not because tok/s rose. In a batch run of 2,321 tasks this cut 233 minutes to 62, but only because stock kept hitting the 80K wall.

DeepSeek V4.1 Flash 1017

The most interesting test is not a small model but a 552B MoE. DeepSeek V4.1 Flash uses a Causal Encoder-Decoder layout: 40 layers split into 20 encoder and 20 consumer layers. The loop adapter is even smaller: 35.4 million parameters (135 MB FP32 / 71 MB BF16, 0.006% of 552B) over layers 24–35, with coda LoRA on 36–39 and separate pass caches.

On 33 LiveCodeBench v6 tasks (32K cap, full precision):

  • accuracy: 75.8% → 84.8% (+9.1 points);
  • the 13 hardest tasks: 61.5% → 84.6% (+23.1 points);
  • thinking tokens: 16,979 → 12,436 (−26.8%);
  • layer passes per token: 40 → 52 (+30%);
  • total layer passes per answer: 647K versus 679K (−5%);
  • KV cache: −27%.

So the loop does not speed up every token. It makes the answer short enough that total work falls slightly. If the answer does not shrink, the loop is just +30% compute.

The 1.75-bit story

This is where the loop looks most interesting for local inference. A 552B model is compressed on a Mac into an STQ pack at 1.75 bits — about 111 GB of routed experts. On an M5 Max with 128 GB it runs, but quality drops: 57.6% on LiveCodeBench versus 75.8% at full precision, and long 20K+ token proofs simply hit the limit.

The same 35M adapter plus LoopCD (contrastive decoding along the difference between passes) lifts the 1.75-bit build to 75.8% — parity with full precision on this set. This is not “the loop fixes any quant”: the result covers 33 tasks, the adapter was trained on cloud weights rather than the noise of this particular quant, and independent reproduction is limited. But as a direction it is strong evidence that some of the loss from extreme quantisation can be recovered with compute rather than memory.

What we pay

  • Compute per token. T=2 over 12 layers is +30% layer passes; over 16 of 64 layers it adds 25% to effective depth.
  • Prefill and decode. On a 3090, Flash-Next prefill drops 31% and decode 30%; short prompts notice.
  • KV and the engine. You need a loop adapter, T support and often a separate cache per pass; llama.cpp and older builds do not have it. The adapter is tied to a specific model and quant.
  • MTP. The loop shifts hidden states, so the stock MTP head loses acceptance and has to be calibrated separately.
  • Regressions. GPQA at 80K for looped Qwen3.8-27B fell 4.6 points; HumanEvalFix fell 1.8. Saving tokens does not guarantee quality.
  • Narrow benchmarks. The main numbers are LiveCodeBench and a few reasoning sets, not proof of general superiority; the DeepSeek adapter authors themselves note that a control SFT without looping is still needed.

What it means for 16 GB

On a 16 GB V100 the adapter itself costs almost nothing in memory: 35–70 million parameters is tens of megabytes. But the extra passes add compute, and our decode is already limited by memory and the engine. Until Strata or llama.cpp support looping and MTP calibration, there is little practical value. Start with a quantised model and a normal profile; add the loop when the engine learns it and when the bottleneck is answer length.

The main conclusion: looped models win not on “speed” in general, but on output-token reduction. If the task needs a short answer, there is nothing to pay +30% compute for. If the model writes 20,000 reasoning tokens and still hits the cap, the loop can be cheaper than one more pass over the context.

Sources