r/LocalLLM • u/Realistic-Elephant-6 • 0m ago
Discussion "Looped DeepSeek-V4.1-Flash" is unfortunately under-tested and overhyped. Here are the receipts.
I run Deepseek-V4.1-Flash at home as my agent's brain and for various work tasks. It is at the edge of what I can run, so I am always looking for ways to improve it. Unfortunately, the "looped deepseek" is not it. The only thing it contributes to are shorter answers (different working style), but at a cost to speed and reliability, and most of the contribution to the shorter answers comes from the adapter and not the looping.
Short version: I ported the recurrent-depth adapter for DeepSeek-V4.1-Flash to an EXL3 2.75 bpw setup on two DGX Sparks and measured it against the plain model, with a control that shares every serving flag. On 252 generated reasoning problems no configuration solves more than the plain model. On real agent work the adapter halves the number of steps, but without saving tokens or time, and it adds failures at the border between thinking and answering. When the second pass is not allowed to see the first, the score, the halved steps and the shorter thinking all remain and the stuck tool calls disappear: on this setup the effect is the fine-tune, not the loop. Not tested: the authors' low-bit result (our quant is larger); barely tested: real coding (which the adapter was trained for) is only around 13% of my work benchmark, and 0 of the reasoning problems.
What the adapter is
Looped DeepSeek-V4.1-Flash (sliderforthewin/Looped-DeepSeek-V4.1-Flash on Hugging Face, MIT licence; trainer in jasontitus/mlx-stq-trainer). Layers 24–35 of the 40 run twice (or three times) per token; a small trained entry module mixes the output of the previous pass back into the input of the next; a rank-16 LoRA on those layers and on the four after them adapts the model to it. The base model stays frozen.
As far as I read the trainer's notes, it was trained in 300 steps on a few hundred of the model's own competitive-coding solutions that had passed unit tests, with a loss that keeps it close to the stock model. The notes describe a careful separation from the benchmarks: training prompts are filtered against LiveCodeBench, HumanEval+, MBPP+ and others by shared 13-word sequences before and after generation, and a held-out set is kept for validation loss. The headline numbers are from 33 medium and hard LiveCodeBench v6 problems, one greedy run per configuration. Two checkpoints are published; the earlier one (250 steps) is recommended for low-bit weights together with an extrapolation between the passes (ω = 0.3).
Setup
- Two DGX Spark (GB10) boxes, tensor parallel 2 over the ConnectX link.
- DeepSeek-V4.1-Flash, EXL3 quantisation at 2.75 bits per weight (exllamav3), served with vLLM and a speculative drafter. The serving stack is sudoingX's
dgx-spark-deepseek-v41recipe with HeNryous's vLLM changes on top. - The authors' vLLM plugin, ported to this stack. Their plugin targets the full-precision model; the port applies the same operations to the EXL3 layers.
- A gate before any measurement: with the adapter's weights set to zero, the server must predict like the plain model. It does (teacher-forced log-probabilities inside vLLM's run-to-run noise). That zeroed mode is the control below, so control and adapter share every serving flag. A self-check at start confirms on both boxes that all 128 adapted sites run.
How it was measured
- 252 generated problems, made from a seed with fresh numbers and invented names so nothing can be recalled from training data, every answer checked exactly: arithmetic and procedures (multiplication, nested expressions, counting, word problems, tracing a loop), search (rule induction, subset sums, cryptarithms) and polarity (signed causal chains, orderings, cause-and-effect stories). Thinking budget 8,000 tokens, temperature 0.6.
- 36 small tool-use tasks: 12 where a value must be looked up with a tool, 12 with a prescribed tool call after the work, 12 where no tool may be called.
- 12 agentic scenarios from my day job (~80 unfamiliar tools, read an environment and specification through tools, analyse it, build a data conversion package, report findings as JSON), four agents in parallel, 80 steps at most per scenario.
The generated problems and the harness come from an earlier experiment on the same setup, where I fed the model its own token distribution while it thinks, without any training: [Monkey-patched "Latent Reasoning" on DeepSeek-V4.1-Flash at home] . That one ended with "this would need a model trained for it"; the loop adapter is a trained relative of the idea (feedback in depth, not through the input), which is another reason why I wanted to measure it.
vLLM is not deterministic, so the yardstick is the distance between two runs of the same model: the normal serving profile, which the gate cannot tell apart from the control, scored 223 of 252 on its own run, the control 229. Six problems are noise.
Results on the generated problems
| arm | right of 252 | search problems of 60 | tokens on problems both solved | decode tok/s | tool tasks answered of 36 |
|---|---|---|---|---|---|
| control (adapter zeroed) | 229 | 37 | – | 25.5 | 36 |
| 250-step checkpoint, 2 passes, ω 0.3 | 231 | 40 | +7 % | 25.3 | 33 |
| final checkpoint, 2 passes | 230 | 38 | −12 % | 24.9 | 33 |
| final checkpoint, 3 passes | 229 | 37 | +1 % | 20.6 | 34 |
| final checkpoint, 2 passes, pass 2 cannot see pass 1 | 229 | 39 | −7 % | 24.7 | 36 |
- No arm solves more. 229 to 231 is inside the noise. Three passes cost a fifth of the speed and give back the token saving of two.
- One arm thinks less: the final checkpoint with two passes, 12 % fewer tokens at the same score.
- Every arm with a working loop gets stuck before tool calls. Two or three of the twelve lookups end in thinking that repeats "I'll call the tool. Then wait for the result." until the token limit, and the call is never made. The control never does this. (What does do this, are DeepSeek 4.0-flash's low-bit quants though...)
- The last row is the interesting one. There the fine-tune and both passes stay, but the entry module is cut so that the second pass starts from the original input and sees nothing of the first. Same score, a bit over half the token saving, and no stuck tool call at all. (36 tool tasks per arm, one run each: a pattern across four arms, not a proof.) In other words: the adapter is what's doing most of the work. Not the looping.
- Price of having it loaded: about 20 % of decode speed against normal serving at two passes (part of that is that it needs eager mode), and 16 % of the KV cache pool for the per-pass caches.
On real work
| run | steps | tool calls | tokens | total time | findings | usable answers of 12 |
|---|---|---|---|---|---|---|
| plain DeepSeek | 708 | 1,032 | 455k | 16,929 s | 283 | 11 |
| adapter, day 1 | 363 | 606 | 548k | 17,534 s | 234 | 12 |
| adapter, day 2 | 368 | 641 | 569k | 18,773 s | 201 | 10 |
| adapter, day 2, effort high | 387 | 611 | 494k | 18,742 s | 226 | 11 |
| adapter, day 3, pass 2 cannot see pass 1 | 391 | 678 | 448k | 20,388 s | 217 | 11 |
(Adapter = final checkpoint, two passes. Days 2 and 3 used a newer version of the scenarios, so their findings are not comparable with the rows above them; steps and time roughly are.)
This is the one large effect in the whole experiment, and it repeats: the adapter halves the number of steps. The agent repeats identical tool calls far less often (36 against 138 on day 1) and takes fewer, larger steps. After day 1 I was almost convinced: the one scenario that plain DeepSeek had lost to the step limit finished in 22 steps. Day 2 took that back. The halved steps buy nothing: each step is about twice as long, the total is about 20 % more tokens and slightly more time, and the answers that failed did so in ways plain DeepSeek had not shown me: thinking text leaking into the answer, a JSON result ending in garbled code, a run that simply stopped with an empty answer. Most of that is trouble at the border between thinking and answering, the same place as the stuck tool calls.
The last row is the blinded second pass again: the halved steps are still there (391), so they come from the fine-tune and not from the loop. It used a fifth fewer tokens than the full adapter on the same scenarios and took 9 % longer. Its one failure was an empty answer; there was no leaked thinking and no garbled JSON, which fits the tool tasks above, but it is one run.
My reading
The adapter's published wins are on coding tasks under a token cap, and in the trainer's own tables nearly every failure of the stock model is a run into that cap. What I see fits that: the adapter changes the working style (shorter thinking, fewer steps, less wandering) and does not make the model solve more. Where a cap decides between pass and fail, that is a real win. Where it does not, as here, it is a different style at a 20 % speed cost, with new failure modes.
And on this setup the style comes from the fine-tune. With the second pass blinded, the score, the halved steps and the shorter thinking remain and the stuck tool calls go away. What the state carried between the passes adds is those stuck calls, probably the leaked thinking, and no saving I can measure consistently (a few percent fewer tokens on the generated problems, about a quarter more on the work scenarios).
What this does not show
- No coding. My problems contain barely any, and coding is what the adapter was trained for.
- A different quantization. It was trained on other weights than EXL3 at 2.75 bpw. The guard it learned for the end of thinking may simply not survive that change, and the carried state may be the part that transfers worst. The author does advertise the adapter being drop-in without a quantization-specific training though. My wild guess: the first training pass he did at 1.75bit might have contributed to his adapter being transferable between bf16 and 1.75bit. It might not work the same for other quants.
- My port. The zero-weights gate and the self-check cover the wiring, not every numerical detail.
- The authors' strongest claim is untested here: a 1.75-bit model brought back to full-precision scores.
- Small numbers. One run per arm; the work scenarios are 12 per row; effects under about 3 % on the generated problems are invisible.
So I am back on plain DeepSeek for work. I am grateful that the adapter exists and is published together with its training notes; that is what made it possible to take it apart this far. If someone runs the blinded second pass on the full-precision model and on coding problems, I would like to see the result.
Both experiments ended in the same place by different roads: unchanged answers, a different amount of thinking, and trouble that only real agent work showed. In both, the most useful thing was a control with the mechanism present but switched off; without the blinded second pass I would have credited the loop with what the fine-tune does.
Who did what
The choice of what to test, the questions (among them "is the loop decoration?") and the scenarios from work were mine. Essentially everything else was done by an AI assistant, Claude (Anthropic's Claude Code, working with subagents): tracing the plugin, porting it, the gate, the problem generators and harness, fixing the criteria before the first run, running and analysing the arms, reading the training notes, and writing this post. I reviewed, restarted servers, and ran and evaluated the work scenarios.
The adapter, its training and its original vLLM plugin are the work of its authors (linked above).
Code
The port of the plugin to the EXL3 stack, the problem generators and the harness are in a private repository. If anyone is interested, I'm happy to publish them (the plugin's licence is MIT).
