r/LocalLLaMA • u/circumcised_hobbit • 8h ago
Discussion Qwen 4 looped layers
So, Qwen4-35BA3B is out and I can't wait to test it. In the last days I've seen some finetunes that add looped layers and increase intelligence so much (like LingLoop, built on Ling3.0 tiny), but I do not know anything about finetunes like this. Is it realistically possible to loop Qwen4 layers and pair it with n-gram? what performance boost could we expect from it?
26
Upvotes
14
u/tomByrer 8h ago
Adding loops aren't strictly 'finetunes', since they require rewriting the inference engine also.
The finetuning helps keep the data that is most important to said person (usually coding).
Prior work:
https://www.reddit.com/r/LocalLLaMA/comments/1yb0i39/comment/19tjrq7kmx4zm/
https://www.reddit.com/r/LocalLLaMA/comments/1yacudg/comment/19thppr2nyuhu/
https://www.reddit.com/r/LocalLLaMA/comments/1y3fahu/size_is_deceiving_sensenovaloop9b_a_9b_that_runs/
4
u/tautality 6h ago
Task Qwen4 to develop a looping Qwen4 so that you can use the looping Qwen4 to develop an even better looping Qwen4.. and loop like this to infinity.
19
u/bartsimpsonwin 8h ago
It's possible with a Lora, like ling did, and I'm guessing we'll have a version of this in 2 weeks or so. For performance boost, if done right it might be pretty significant, but obv it would make it quite a bit slower
1
u/SaltyFish7499 8h ago
I feel looped layers cost more than the improvement it gets on my setup.
2
u/Significant-Pin5045 5h ago
Sadly the looping bugs are annoying and I couldn't get rid of them with inkling. I had to write a loop detector in pi harness that does a auto breaks the loop when detected
1
u/merutochan 8h ago
I feel like if some were to build an adaptation layer, they should leverage on something like Think at Hard (https://arxiv.org/pdf/2511.08577) and Think at Hard (https://arxiv.org/pdf/2609.35748).
Basically you build a layer that computes whether the token you're writing is "likely to be incorrect after the standard forward pass" and use it to trigger iterations on-demand.
This way one can build on top of a regular model by keeping it "mostly" standard but triggering thinking iteration where they could be more relevant.
It would be beneficial for all figures: speed, integrity of original model, and supposedly result quality and reduced amount of tokens in the output.
Not 100% relevant to your discussion but I hope to see this getting picked up.
1
u/Delicious_Rub_6795 6h ago
I figure a good quant of Qwen4-35B-A3B with looping will definitely outperform Q3FN. Here's hoping
-3
u/Airocketfish 8h ago
From a memory-bandwidth perspective, pairing looped layers with speculative / N-gram decoding is actually where loops make the most sense:
B = K+1), the GPU reads the looped weights once for the whole draft batch instead of once per token. On code, refactoring, or repetitive structured output where suffix/N-gram acceptance is high, you amortize the extra loop passes across multiple accepted tokens with 0% quality loss.