Skip to main content
MindStudio
Pricing
BlogAbout
My Workspace
Looped Qwen4 vs Qwen4looped transformer benchmarkQwen4 35B A3B comparison

Looped Qwen4-35B-A3B vs Original: Is Extra Thinking Worth It?

A hands-on test of looped Qwen4-35B-A3B against the stock model on debugging and coding tasks shows extra compute doesn't guarantee better output.

Edited by Luis Chavez-Mattos, Director of Product RSS
Looped Qwen4-35B-A3B vs Original: Is Extra Thinking Worth It?

What is looped Qwen4-35B-A3B?

Looped Qwen4-35B-A3B is a community project that takes the original Qwen4 mixture-of-experts model and changes how it processes a prompt, without touching its trained weights. Qwen4 has 40 layers, and in a normal forward pass each layer runs once per token, like one step of thinking. The looped version keeps the first 12 layers and the last 12 layers running once, but forces the middle 16 layers to run three times each, with each pass building on the output of the last. The idea is to spend more compute reworking the hardest part of the problem before the model commits to an answer, rather than making the model bigger or retraining it. The loop logic ships as a small add-on with code published openly on GitHub, and it slots into an existing vLLM serving setup rather than replacing the model itself.

TL;DR

  • Looped Qwen4 reruns the middle 16 of 40 layers three times each, while the first and last 12 layers run once, aiming to give the model more “thinking” per token without growing its parameter count.
  • No speed gains showed up in testing. The looped model was consistently slower than the original Qwen4-35B-A3B because of the repeated passes through the middle layers.
  • Debugging quality held up well: on a real-world bug-hunting task (a relief-routing app with a stale-data race condition), the looped model correctly diagnosed and fixed the issue.
  • Coding output was not clearly better on a more complex agentic test (building and testing an animated HTML simulation), despite the model spending roughly 9.5 of 13 minutes on an upfront planning block.
  • Serving metrics stayed healthy, with the model holding around 87 tokens per second on a single request and prefix cache hit rate climbing from 45% to 66% during the run.
  • Published benchmark charts show no outright losses for the looped variant versus stock Qwen4, with the biggest gains on hard coding problems and smaller gains on math and tool calling, but many other tasks come out roughly even.
  • The original Qwen4-35B-A3B remains the safer default for general use, with looping framed as a promising but unproven technique rather than a clear upgrade.
New request

Workers wait for instructions. Contractors deliver the outcome.

Access control and audit trail passed

Describe what you need. Remy builds it, secures it and hands it over running.

How does looping actually work?

Looping is a way to give a transformer more computation per answer without adding more parameters. In a standard pass, a prompt moves through each of the model’s layers exactly once, and the final layer’s output becomes the response. In the looped setup, the architecture is split into three zones: an initial block of layers, a middle block, and a final block. The initial and final blocks behave normally, running once. The middle block, in this case 16 layers of Qwen4-35B-A3B, runs multiple times in a row, feeding its own output back into itself before passing results forward. In the version tested here, that middle block ran three times, controlled by a “passes” setting on the add-on.

Conceptually, this mimics rereading a hard paragraph a few times before writing a response, rather than reading it once and committing immediately. It’s a different mechanism from chain-of-thought prompting, where the model writes out visible reasoning steps in text. Looping happens inside the network’s layers, invisible in the output, though it does show up as a longer internal “thinking” phase before the model starts producing tokens.

Is looped Qwen4 faster or slower than the original?

Slower, and by a meaningful margin. Running the middle layers three times instead of once means more compute per token, so the looped model takes noticeably longer to produce a response than the stock Qwen4-35B-A3B on the same hardware. In one coding task, the looped model spent around 9.5 minutes out of a roughly 13-minute total response time in a single extended “thinking” phase before writing any code. Looping is explicitly not a speed optimization. It’s an attempt to trade latency for potentially better reasoning, and in practice it costs real time.

Despite the slower overall pace, the serving setup still performed reasonably at the infrastructure level: throughput held around 87 tokens per second on a single request, KV cache usage stayed low (around 3%), and the prefix cache hit rate rose from 45% to 66% over the course of the session, meaning more of each new prompt was being reused rather than recomputed from scratch.

Does looping improve answer quality?

The results were mixed, which matches what the project’s own benchmark charts suggest: no clear losses from looping, but gains that depend heavily on the task.

On a debugging task involving a relief-coordination app with a subtle race condition (stale network messages overwriting newer, correct data), the looped model correctly diagnosed the bug and fixed it. Given only a high-level instruction to “find the bug and fix it,” with no description of what was wrong, it identified that old messages arriving late were overwriting newer status updates and resolved the issue so that the correct state persisted. That’s a solid result and shows the extra compute didn’t hurt structured debugging reasoning.

Everyone else built a construction worker.
We built the contractor.

🦺
CODING AGENT
Types the code you tell it to.
One file at a time.
🧠
CONTRACTOR · REMY
Runs the entire build.
UI, API, database, deploy.

On a more demanding agentic coding task, generating and testing an animated HTML simulation with multiple interactive elements, the picture was less clear-cut. The looped model was methodical: it planned extensively before writing code, checked its own syntax, opened the result in a browser, and even verified pixel-level output since it had no vision capability to view screenshots directly, a limitation it reported honestly rather than silently failing. The visual output came out slightly cleaner than the original model’s version. But functionally, some interactive behaviors didn’t work as intended, for example, a size-reduction effect simulating something being consumed over time failed to actually change the visual over time. The original, un-looped Qwen4 produced a result that was, by the reviewer’s own assessment, at least as functional, if not more so.

Should you use looped Qwen4 over the stock model?

Based on hands-on testing, no, not as a default choice. The original Qwen4-35B-A3B is faster and produced comparable or better functional results in the coding test, while matching the looped version’s debugging accuracy. The looped variant’s own published benchmark data backs this up: gains show up mainly in hard coding problems and, to a lesser extent, math and tool-calling tasks, but many other categories land close to even between the two versions. There’s no outright regression from looping, but there’s also no consistent win large enough to justify the slower response times for general-purpose use.

That said, the technique itself is worth watching. Spending extra compute on a subset of layers, without retraining or growing the model, is a cheap way to experiment with reasoning depth, and it’s notable that an open, community-built add-on can be dropped onto an existing Qwen4 deployment via vLLM without modifying the base checkpoint. Future iterations of the loop add-on, or similar looped variants of other models, could narrow the gap or find task categories where the extra passes pay off more reliably.

Frequently Asked Questions

What is the difference between looped Qwen4 and the original Qwen4-35B-A3B?

The original model runs each of its 40 layers exactly once per forward pass. The looped version keeps the first and last 12 layers running once but forces the middle 16 layers to run three times in sequence, giving the model more internal computation on the same architecture and weights.

Does looping require retraining the model?

No. Looping is implemented as an add-on that controls how many times certain layers execute during inference. The underlying Qwen4-35B-A3B weights are unchanged; only the forward-pass behavior is modified.

Is looped Qwen4 slower than the stock model?

Yes. Because the middle layers run multiple times, looped Qwen4 takes longer to generate a response than the original model on identical hardware and prompts.

Does looping improve coding and debugging performance?

Results vary by task. It handled a debugging scenario correctly and matched the original model’s accuracy there, but on a more complex coding and animation task, its functional output wasn’t clearly better than the stock model’s, despite spending extra time in internal planning.

What hardware is needed to run looped Qwen4-35B-A3B locally?

It was tested on an H100 GPU with 80GB of VRAM, using vLLM with FP8 and CPU offload settings to manage memory, consuming roughly 76GB of VRAM at a large context length. Reducing the context length can lower VRAM requirements.

Editorial standards

Presented by MindStudio

No spam. Unsubscribe anytime.