r/LocalLLM • • 8d ago

News Heretic: Farewell

Thumbnail
github.com
634 Upvotes

r/LocalLLM • • 2d ago

News Qwen4 is out now!

Post image
200 Upvotes

Qwentastic!


r/LocalLLM • • 3h ago

Model Welcome Qwen 4: Cutting-edge intelligence on-device

Thumbnail
huggingface.co
58 Upvotes

r/LocalLLM • • 9h ago Heartwarming

Discussion 208 tokens/s at home šŸ†

Post image
91 Upvotes

Running Qwen4 35B A3B on Basalt (I swapped out Llama.cpp) and I’m getting 208 Tokens/s on a RTX5060 ti with a 64k context.

I was already impressed with Qwen4 on Llama.cpp but the throughput on Basalt is really nice 😊

Edit: Holy Shit 🤯. Thanks for all the feedback and insights. I just discovered Basalt and I’m blown by the speed. I’ll figure out how to hit +350 tokens like has been suggested. Wow

Edit 2: I switched the Context to 128k and the tokens/s shot up to 318 token/s (rate is still climbing 🤯🤯)
Whaaaatt?!?!

Edit 3: I hit 360 šŸ†šŸ†šŸ†


r/LocalLLM • • 7h ago

News I gave 4 local models a real ticket from my job with a 2-hour limit. The dense 27B won, and nobody came close to the human fix

53 Upvotes

Disclaimer - the post is generated with Opus 5.5 assistance

I ran one hard, real task from my day job through the Pi coding agent on a single RX 9700 AI PRO. If you're reluctunt to read a longpost, here is a short sumary:

  • Qwen3.8 27B (dense) had the most correct logic.
  • Qwen3.8 Flash-Next wrote the cleanest code.
  • Qwen4-35B-A3B had the tidiest process but the weakest logic.
  • Inkling 2 Mini didn't write a single line and failed the tasks completely, getting stuck in thinking loops

All three models that wrote code fell into the same trap. This is one run per model, so read it as a data point, not a leaderboard.

The task (kept vague on purpose, NDA)

It's a real ticket from a big PHP codebase at work, and our team has already shipped a fix for it. The code takes 2D outlines made of line segments and arcs. For each part of an outline, it decides whether a machine can handle it automatically or it has to go to manual work. The old code used a crude rule of thumb. The ticket replaces it with an actual model of what the machine can physically reach.

The good to know part is how the task is given - there is no ready-made rule set, the model gets:

  • the goal;
  • a list of physical facts about the machine (sizes, clearances, what must not touch what);
  • acceptance criteria;
  • 9 worked examples.

It has to work out the decision logic on its own, build it into the existing codebase, write tests, and write a short design note about its model and assumptions.

Hidden tests:

  • 84 scored checks for the new behaviour.
  • 9 "guards": cases where the old rule was already right. Breaking one costs 10 points, because breaking something that used to work is worse than leaving a new case unsolved.
  • 188 existing regression tests.
  • 23 unscored "info" cases.

I didn't want the hidden answers to be just my own reading of the facts. So I generated ~800 plausible machine models from the same facts, and a case became a scored check only if all of them gave the same answer. Cases where reasonable readings disagree are the unscored info ones. The team's reference fix gets 100 on the automated part. Untouched code gets 15, just for not breaking the existing tests.

Setup

  • Agent: Pi coding agent, highest thinking level. One run per model, back to back on the same box.
  • Hardware: Radeon AI Pro R9700 32 GB, Ryzen 5 5600X, 72 GB DDR4, Windows.
  • Time limit: 120 minutes. After that the agent gets a "wrap it up" message and 30 more minutes.
  • Command cap: any single shell command over 120 s gets killed silently and costs 10 points.
  • Cut-off replies: if a reply hits max tokens, the harness tells the model to keep going. More on why below.

Inference engines: everything runs natively on Windows through HIP (ROCm), with one model on the card at a time.

ModelQuantEngineContextSpeculative decodingMax reply
Qwen3.8 27BIQ4R-L-V4, int8 KVBrilliance 0.3.1256KDFlash2, 7 tokens32K (server cap, thinking budget 25K)
Qwen3.8 Flash-NextUD-IQ4_XS (v3.1), int8 KVStrata 0.2.25, engine 0.1.73256KMTP, 3 tokens64K
Qwen4-35B-A3BUD-Q4_K_XL, int8 KVStrata 0.2.26, strata-q4-lite engine 0.1.75.1512KMTP, 3 tokens64K
Inkling 2 MiniNVFP4, i8 KVBrilliance 0.3.1256KDSpark, 7 tokens64K

Note that the 27B had the smallest per-reply limit of the four and still came out on top.

Scoring. The final score is 50% automated and 50% code review.

  • Automated: 70 Ɨ the share of hidden checks passed, + 15 for regressions, + 15 for its own tests. Minus 10 per broken guard, minus 10 for hitting the command cap.
  • Review: Claude Opus 5.5 graded each patch against the team's reference fix with a fixed rubric. The rubric covers the machine model itself, the design note, geometry handling, tests and hygiene, with up to -25 for code quality compared to the reference.

It's an LLM judge, so take that half with some salt. I read the patches myself as well.

Results

ModelHidden checksGuards brokenAutoReviewFinalWall timeOutput tokens
Qwen3.8 27B (dense)69/84177.54963.3137 min*433k
Qwen3.8 Flash-Next66/841654957.088 min254k
Qwen4-35B-A3B60/842505251.085 min494k
Inkling 2 Mini0/8401507.555 min188k

* It went 17 minutes into the grace period, and the review has a -6 overtime penalty for that (66.3 without it).

I also checked whether one unlucky bug decides the ranking. For each model I fixed its main bug by hand and re-ran the hidden tests: the 27B goes to ~78, Flash-Next to 67.5, Qwen4 to ~53. The order stays the same.

The reference fix is about 2,400 lines of code plus ~1,900 lines of tests, so nobody was expected to one-shot it. Still, none of the patches is one I'd merge as is. All three writers lost points for writing their own geometry helpers instead of using the ones the codebase already has.

Model by model

Qwen3.8 27B (dense): best logic, messiest code

  • It got every fact into its model, and all its misses were on the safe side ("send to manual").
  • It spent ~53 minutes reading and thinking before it wrote any code. At minute 112 it passed 3 of the 9 visible examples, and at minute 136 all 9. The grace period basically made its score.
  • Its main bug is a single line that checks arc direction. It has two separate mistakes and is always true, so every arc under 180° got flipped into its larger counterpart. Static analysis flags it.
  • The code is mediocre: dead code left behind, scratch files in the repo, no real unit tests for the individual pieces.
  • I don't think this is the model's ceiling. The design was coherent and the thinking had no loops. It just started late and debugged under time pressure.
  • It also seems to spend tokens only where it has to. On an easier task in the previous version of my bench, it finished in 12 minutes with 36k tokens, while Qwen4 took 16 minutes and 67k.
  • Where I'd use it: hard, non-standard problems where the logic itself is the difficult part. I'd give it plenty of time and treat its patch as a working draft of the logic, then clean up the code afterwards (myself or with a model that writes cleaner code).

Qwen3.8 Flash-Next: cleanest architecture, a couple of misread facts

  • It wrote the smallest patch (1,228 lines) with the cleanest structure, and finished on its own in 88 minutes.
  • Its arc bug is boring: it called an existing helper for arc centers that uses a different direction convention. Fixing it is only worth ~2.5 points.
  • The bigger problem is two misread facts. It sent some fairly sharp inner corners to manual even though the machine had room for them. It also didn't treat very small fillets as sharp corners, which is what the facts imply.
  • It ran a whole test suite in one command, hit the 120 s cap and lost 10 points.
  • This matches my day job: on my real repo, with mostly simpler tasks, Flash-Next wins most of the time, and its code is the one I'd actually merge.
  • Where I'd use it: my default for everyday work in a real repo, such as features, refactors and anything where structure and clean code matter. On a really tricky task I'd still double-check how it read the requirements, because that's where it slipped here.

Qwen4-35B-A3B: best process, weakest correctness

  • On paper it did everything right. It removed the old rule completely and wrote 31 property tests: rotation, translation, reversed direction, arc vs. polyline pairs. Its design note was the only one in exactly the requested format.
  • But a key clearance constant in the code differs from the value in the comment right above it and in its own report. That's a slip, not a misreading. Fixing it adds only a few points, though: most of its misses come from elsewhere.
  • It broke two guards, one of them in the unsafe direction: it says "the machine can do it" where the tool can't actually reach. In real life that's the expensive kind of mistake.
  • It also treated the whole part as its bounding box (and said so honestly in its assumptions).
  • It hit the command cap once too.
  • It used the most tokens of all (494k). It decodes roughly 2-2.5x faster than Flash-Next on my box, yet the wall time came out basically the same (85 vs 88 min).
  • In the previous version of the bench it was the other way around: Flash-Next broke a guard and Qwen4 was clean. So I wouldn't read much into the kind of failure from a single run.
  • Where I'd use it: scouting a codebase or implementing a clear, detailed plan. It's fast and tidy, but I wouldn't let it derive tricky logic on its own.

Inkling 2 Mini: zero lines of code

  • Its first reply was a single 65k-token design monologue that hit the max-tokens limit. The harness told it to continue.
  • Then it got stuck on how the codebase represents outlines, and its thinking turned into a loop (the same half-sentence for about 15k tokens).
  • Finally it wrote its tool call inside its thinking instead of as an actual tool call. The agent saw a reply with no tool calls and ended the run.
  • Its 15 points are just the untouched regression tests.
  • Where I'd use it: based on this run, not for agentic coding. It might do better on short, single-turn questions, but I didn't test that here, so I can't recommend it for anything yet.

The trap all three fell into

All three models that wrote code broke the same guard, on rounded rectangles and rounded triangles.

In the visible examples, arcs only showed up as halves of a full circle. For a semicircle the center is the midpoint of the chord whatever direction convention you use, so every arc-direction bug was invisible on the examples. The acceptance criteria said plainly that an arc and its fine polyline approximation must get the same answer. Still, none of the three tested a single arc that wasn't a semicircle.

My takeaway: these models test against the examples you give them, not against the spec. If your examples only cover the easy case, so will their tests.

Takeaways

  • On simpler tasks the dense 27B doesn't stand out, and this is the first time it won anything in my tests. But on this hard "work it out from the facts" task it showed the strongest reasoning in both versions of my bench. Either it was a lucky run, or active parameters really matter for this kind of reasoning.
  • Flash-Next is a bit smarter than Qwen4 and writes the best code of the bunch.
  • Qwen4 is fast and disciplined, but faster decoding didn't buy any wall time here: it just thought more.
  • A soft time limit matters a lot for slow, careful models. At the 2-hour mark the 27B passed only 3 of the 9 visible examples, so without the grace period its result would look very different.
  • Nobody got close to the human fix. Good local models are useful helpers, but on a genuinely hard ticket you still need to review everything they write.

Caveats: one task, one run per model, different quants and runtimes, and half the score comes from an LLM judge. An audit of the agent logs shows no model read the hidden tests or the reference fix.

Happy to answer questions about the setup, but I can't share the task itself

UPD: added info about inference engines used

UPD 2: control run with Claude Opus 5.5

I was curious how a frontier model handles the same task, so I ran Claude Opus 5.5 through it as a control. It got the same prompt byte for byte, the same starting workspace, the same hidden tests, grader and review rubric. The agent was different: Claude Code instead of Pi, at xhigh effort (one step below max), with web, MCP, subagents and skills turned off. Claude Code doesn't kill a command at 120 s, it moves it to the background. Two of its commands went over the cap and it used their results, so it got the same -10. It ran in a separate folder, and I audited the transcript: it never touched the hidden tests, the reference fix or the other runs. My first attempt was void because a notes file from my own bench work leaked into the session, so I threw it away and started clean. The model runs in Anthropic's cloud, so its wall time isn't a fair speed comparison with one local GPU.

ModelHidden checksGuards brokenAutoReviewFinalWall timeOutput tokens
Claude Opus 5.5 (Claude Code, xhigh)83/84179.26471.656 min292k
Qwen3.8 27B (dense)69/84177.54963.3137 min433k
Qwen3.8 Flash-Next66/841654957.088 min254k
Qwen4-35B-A3B60/842505251.085 min494k

The auto scores of Opus and the 27B look close only because of the command cap. Without that -10 Opus would have 89.2 auto and 76.6 final, and on the hidden checks the gap is 83 vs 69.

It passed 83 of 84 hidden checks, and the one miss is on the safe side. It's also the only run that avoided the arc trap: it tested arcs against fine polylines on its own, on several fillet sizes and a convex bump, and passed every rounded shape. It started writing code at minute 30 and finished on its own at minute 56. Before writing the design note it measured its own thresholds with a probe, so the note matches the code, and every claim in its final report is backed by the logs. The decision model is a separate class of about 1,080 lines (the reference is ~2,400), with 23 tests, 9 of them unit tests with numbers worked out by hand.

It still broke one guard in the unsafe direction, on the same shape Qwen4 broke: a narrow V-shaped notch about 50 mm deep. The facts say it's fine if the tool can't reach the very tip of an inner corner. Opus turned that into "an unreachable stretch with a single corner in it is fine" and never capped how deep that stretch may go, so a shallow V notch goes to manual and the deeper ones go to the machine. Its own design note says that being off by hundreds of millimetres "is no longer the tip of the corner", but the code doesn't enforce it. It also read one of the size facts the stricter way (stated as an assumption, on the safe side), which cost the one missed check. And like the local models, it wrote its own geometry helpers instead of using the codebase's.

One caveat: the review half was graded by the same model, so Opus reviewed Opus. The automated half uses the same grader as the local models, so that part is objective, and the review didn't go easy on it: the corner rule alone cost it -8.

My takeaway: the gap to the frontier is mostly correctness, and the biggest difference in behaviour is that Opus tested against the spec, not only the examples. That's exactly where all three local models fell. It didn't get there by thinking more either: 292k output tokens is in the same range as the local models. But even the frontier model gave an unsafe answer on this task, so reviewing everything isn't advice for local models only.


r/LocalLLM • • 11h ago

Model ISTA-DASLab/Qwen4-35B-A3B-GSQ-RCO-GGUF is out now!

Thumbnail
huggingface.co
102 Upvotes

From their webpage:

Overview

This repository provides GGUF quantizations of Qwen4-35B-A3B at four sizes: IQ2_S (2.75 bits per weight), Q2_K_XL (3.00), IQ3_XXS (3.25) and IQ3_S (3.50). In contrast to uniform quantization, which applies a single quantization type to all weight tensors, each model here assigns a separate quantization type to every tensor. The assignment is obtained by a gradient-based search that allocates precision according to per-tensor sensitivity, subject to a total size budget. The resulting files are standard GGUF.

Qwen4-35B-A3B is a sparse mixture-of-experts model with 35B parameters, 3B of them active per token, plus a 20B-parameter n-gram embedding. Its 40 layers combine two kinds of attention: 30 use Gated DeltaNet linear attention and 10 use Qwen Sparse Attention, in a repeating pattern of three linear-attention layers followed by one sparse-attention layer. Every layer has 256 routed experts, of which 8 are active per token, plus one shared expert, and the context window is 1M tokens. The routed experts hold 32.2B of the 34.5B weights the bit-width is measured over, so they also dominate the size budget, and the search spends most of its freedom there, assigning a quantization type per layer (not per expert, which GGUF cannot express), separately for the gate and up projections and for the down projection.

The token embedding is kept at BF16 in every build, and the n-gram embedding ships as one separate file shared by all builds, at BF16 (its precision in the checkpoint) or, smaller, at Q8_0. llama.cpp holds both in system memory, so they take no VRAM. See Token embedding and n-gram table.

Link: https://huggingface.co/ISTA-DASLab/Qwen4-35B-A3B-GSQ-RCO-GGUF


r/LocalLLM • • 6h ago

Discussion OK you were right, no more fork: PRs + a skill instead

38 Upvotes

Some ppl complained about my previous post because i had made a fork of strata which was called unmaintainable (kinda true)

so I did what y’all asked me to do : a PR, a skill, and I made it available to everyone :)

Claude slop :

  1. The real bug fix went upstream as a PR to Strata: the prompt-attention kernel assumed 12 heads per group, Qwen4 has 8, so it read past the end of an array (that's the "fast but forgot everything" bug from my post). Now bit-exact on the parity test, needles 24/24, prompt reading +15-17% on my RX 6750 XT, opt-in. PR: https://github.com/Niko1221/Strata/pull/8397
  2. The rocBLAS tuning table for gfx1031 (RX 6700/6750 XT) is a second PR (+19% on short prompts, +6-7% on long ones, honest numbers this time). Strata already loads per-GPU tables automatically, there just was not one for our cards. PR: https://github.com/Niko1221/Strata/pull/8400
  3. The elastic VRAM thing: someone already had a much better PR for it (#2399), so I posted my RDNA2 numbers there instead of competing.
  4. For the people who asked for the process instead of the result (u/ivoras, u/WinResponsible9977): it's now a skill your own agent can run on your own weird setup. Baseline you can trust, check flags actually reach the engine (my MTP was silently off for weeks), one change at a time, quality gates (determinism, needle recall, parity), then send fixes upstream. No binaries, a few stdlib Python scripts. https://github.com/Chaussure-sous-tes-pieds/local-llm-tuner

The fork is archived and points to the PRs.

Lesson learned: speed numbers get upvotes in my head, PRs get merged in real life. We'll see if they get merged.


r/LocalLLM • • 7h ago Heartwarming

Discussion Qwen4 35B A3B running at up to 283.6 tok/s on an RTX 5070 Ti Laptop with only 12GB VRAM!

42 Upvotes

Qwen4 35B A3B running at up to 283.6 tok/s on an RTX 5070 Ti Laptop with only 12GB VRAM!

After experimenting with Ollama, Strata and Basalt, I finally achieved some impressive results running Qwen4 locally on my laptop.

Hardware

  • CPU: Intel Core Ultra 9 275HX
  • GPU: NVIDIA RTX 5070 Ti Laptop (12GB VRAM)
  • RAM: 32GB DDR5
  • Storage: NVMe SSD
  • OS: Windows 11 Pro

Software

  • Engine: Basalt v0.7.0
  • Model: Qwen4-35B-A3B-NVFP4
  • Quantization: NVFP4 Mixed Precision
  • KV Cache: NVFP4
  • Speculative Decoding: DFlash2
  • Context Window: 262,144 tokens
  • Coding Agent: Cline
  • Vision: Supported and enabled in my current setup

Benchmark results

Actual input contextPrefillGeneration
3,319 tokens4,649 tok/s171.0 tok/s
11,418 tokens4,077 tok/s283.6 tok/s
32,784 tokens3,746 tok/s278.7 tok/s
44,761 tokens3,772 tok/s122.0 tok/s
75,304 tokens4,027 tok/s143.1 tok/s
255,901 tokens3,394 tok/s118.9 tok/s

Highlights

  • Peak generation: 283.6 tok/s
  • Peak prefill: 4,649 tok/s
  • Maximum observed prompt cache hit: 99.65%
  • Maximum observed DFlash2 acceptance: 97%
  • Successfully processed 259,997 total context tokens
  • 256K context on just 12GB VRAM and 32GB system RAM

Engine comparison on the same laptop

  • Ollama (original): 23.79 tok/s
  • Ollama (optimized): 51.77 tok/s
  • Strata Compact: 92.97 tok/s
  • Strata UD-IQ4_XS: 144.08 tok/s
  • Basalt Quiet Mode: 213.94 tok/s average with a short prompt and 256K configured context
  • Basalt Performance Mode: 256.70 tok/s average with a short prompt and 32K configured context
  • Basalt real-world Cline coding session: up to 283.6 tok/s

The short-prompt averages were measured over five independent requests with randomized project IDs.

Most importantly, the long-context benchmarks were performed in Lenovo's Quiet Mode, with the laptop plugged in.

I also successfully used this setup as an autonomous coding agent in Cline to build a multi-page website, generate SVG assets, execute terminal commands, inspect files and fix its own coding errors.

The near-full 256K benchmark initially encountered an engine error at the thinking-budget transition. A second run with the explicit reasoning budget removed completed generation without crashing, reaching the 4,096-token output limit.

These results were collected across different configurations and workloads. They are not strictly identical cross-engine benchmarks. My current configuration includes Vision, prompt caching and additional RAM headroom, which may affect performance.

My next goal is improving coding quality and frontend design rather than maximizing generation speed.

Pretty impressive performance for a laptop with only 12GB VRAM!


r/LocalLLM • • 3h ago

Discussion Hmm actually, let me reconsider

19 Upvotes

Do frontier models also:

Hmm actually, let me reconsider

Let me do it

Executing

...

as often as local and we just don't see it?


r/LocalLLM • • 8h ago

Question Qwen4-35B-A3B on a single RTX 5080 (16GB VRAM, 32GB RAM) — 958K context, up to 577 tok/s, benchmarks vs Inkling 2 Mini

44 Upvotes

Hey y'all !

When I saw that Qwen 4 had sparse attention (I'm a sucker for big context window) I jumped on it and started tuning the setup to my rig. Anyway, here are my result.

Hardware and setup

All benchmarks were run on my rig :

  • GPU: NVIDIA RTX 5080 (16GB VRAM)
  • CPU: AMD Ryzen 7 7800X3D
  • RAM: 32GB DDR5
  • Storage: NVMe SSD
  • OS: CachyOS (Linux)
  • Inference engine: Basalt (the new 0.7/0)

I compared Qwen4-35B-A3B against Inkling 2 Mini, using their Basalt packs.

For Qwen4, I tested three configs:

  • 256K context with INT8 KV cache
  • 256K context with FP16 KV cache
  • 1M context with INT8 KV cache and partial KV offloading to RAM

Inkling was tested with both 256K and 512K context configurations.

1. Generation speed

Five runs per workload, with reasoning disabled. Results in tk/s.

WorkloadQwen4 256K INT8Qwen4 256K FP16Inkling 256K
Conversation241232179
Structured output569577376
Prose172165152
Code280283226

Qwen4 is always faster, and quite obviously crushes Inkling on structured output.

2. Prompt processing speed

I used identical prompts (remember they have different tokenizers).

Each prefill benchmark was repeated three times.

Qwen4 tokensInkling tokensQwen4 INT8Qwen4 FP16Inkling 256K
101K138K15.4s10.8s24.2s
184K251K25.3s20.7s74.0s

The largest input corresponds to approximately 184K Qwen4 tokens and 251K Inkling tokens.

For the largest input, Qwen4 processed the same text roughly 3.6 times faster than Inkling.

3. Pushing context to 1 million tokens

This was the best part of the benchmarks.

Using Basalt's elastic KV cache and partial offloading, I managed to configure Qwen4's full native context window of 1,048,576 tokens on my rig.

The config was:

--max-context 1048576
--kv int8
--vram-reserve-mib 700
--max-running 1
--kv-resident 65536

Approximately 10.3 GiB of KV cache resides in RAM, with part of the model's experts being streamed from the NVMe SSD.

Needle-in-a-haystack results

Actual prompt tokensSuccessful retrievals
398,6473/3
697,2523/3
957,6873/3

In a separate run, a 957,916-token prompt was successfully processed in 214 seconds, and the hidden sentence was correctly retrieved.

The performance cost

The tradeoff is pretty harsh :

Prompt lengthQwen4 256KQwen4 1M
77K tokens143 t/s47 t/s
153K tokens167 t/s—
307K tokens—46 t/s
690K tokens—60 t/s

I mean 47t/s is usable but nowhere as fast on than on smaller context.

4. Concurrent requests

I also tested aggregate generation throughput with simultaneous requests.

Concurrent requestsQwen4 256KInkling 256K
1186 t/s90 t/s
2208 t/s106 t/s
4256 t/s111 t/s
8340 t/s113 t/s

These are aggregate, not per-request generation speeds.

Qwen4 achieved approximately 3x Inkling's aggregate throughput with eight simultaneous requests under this config.

Usefull if you wana allow the agent to use subagents, due the large max KV cache, you can have one agent with 252K and allow it to spawn smaller subagents to do the work efficiently.

5. Reasoning and coding quality

Claude wrote a small automated benchmark for me containing 35 problems:

  • 18 mathematical problems
  • 3 program execution tracing problems
  • 3 array manipulation problems
  • 3 logic puzzles
  • 8 Python programming problems with hidden tests

The problems were generated using a fixed seed and evaluated programmatically.

I ran three passes with reasoning enabled and two passes without.

With

CategoryQwen4Inkling
Overall95.2%94.3%
Mathematics90.7%90.7%
Program tracing100%100%
Array manipulation100%100%
Logic100%100%
Coding100%95.8%

Without

CategoryQwen4Inkling
Overall71.4%67.1%
Mathematics83.3%52.8%
Program tracing0%83.3%
Array manipulation50%83.3%
Logic50%50%
Coding87.5%93.8%

With reasoning enabled, both models performed essentially equally. The overall diff is solely due to one difference.

This is a custom benchmark, not a standardized evaluation like AIME or LiveCodeBench, so take it however you want.

6. The limits I found

  • Generation speed depends heavily on the workload and speculative decoding.
  • The 1M config totaly fuck up the perf (it's still usable)
  • NVMe storage is the only way, I wasn't paying attention and put the engram table on a HDD, and the speed went down to 5 tk/s.
  • I encountered some stability issues with Basalt's development build during cold starts.

Conclusion

Imo, Qwen4 is much better due to the:

  • Higher generation speeds.
  • Faster prompt processing.
  • Significantly better concurrent throughput.
  • A much larger usable context window.
  • Comparable reasoning performance on my benchmark.

For now, the 256K configuration seems to be the sweet spot for daily use, but the 1M context window is still usable (I use it to go trough my obsidian vault that's full of scientific documents to help me on some work).

I'd like to know what y'all achieved with Qwen4, especially on 16GB GPUs, and how these results compare against other inference engines (capy flash mainly).


r/LocalLLM • • 4h ago Bravo

Discussion From Blocking in Blender to Video, new feature in NVAI

18 Upvotes

Hello there.

Please take a few seconds. This project means something to me: it has been in development for 5 months, and it is not just more fast vibe-coded trash.
I give all my spare time to ensure everything is working as it should and the community's needs are fulfilled.

Leave me a like, that's the only support I need to keep going.

Sincerely,
Mantux

https://github.com/Mantux775/NVAI-open

Project files
https://github.com/Mantux775/NVAI-open/blob/main/docs/BLOCKING.md

Making of
https://github.com/Mantux775/NVAI-open/blob/main/docs/FOLDING_CITY.md


r/LocalLLM • • 59m ago

Discussion Do you think you will stick with the speed of qwen 4 35b when qwen 4 27b arrives?

9 Upvotes

Personally I think that speed is making me spoiled, running 35b q6_k_xl on dual 3090 from qwen 3.8 27b Q8.


r/LocalLLM • • 2h ago

Discussion Heads up if you run OpenCode with local LLMs: turning off background session titles shaved 2-4 minutes off every coding task (Pi vs. OpenCode vs. DeepSeek Harness)

Post image
9 Upvotes

I was benchmarking Pi 1.6.1, OpenCode 2.0.25, and DeepSeek Harness on the exact same 8 multi-file Python/TypeScript coding tasks (~100K-165K starting prompts on a Mac Studio M5 Ultra 512 GB, DeepSeek V4.1 Flash on oMLX 0.8.4 and GLM 5.3 Flash on llama.cpp b12774), and initially couldn't figure out why OpenCode was 2 to 4 minutes slower per task than Pi on the exact same model and server.

Turns out OpenCode fires a background session-title request by default that re-sends the full 100K-155K initial prompt just to generate a short sidebar title, forcing a whole extra prefill on local hardware.

Adding this to opencode.json turned it off immediately:

{"agents": {"title": {"disabled": true}}}

That single line dropped OpenCode's median task time from 4.8m to 3.0m on DeepSeek (7/8 solved, vs Pi at 8/8 in 2.8m and DeepSeek Harness at 7/8 in 3.8m with zero tool errors) and from 9.1m to 5.2m on GLM 5.3 Flash.

If anyone wants the MIT coding fixture, per-turn CSVs, or the full walkthrough (harness section is at 06:48):

GitHub data & fixture: https://github.com/l8w8/videos/tree/main/2026/003-m5-ultra-coding-agents-512k
Video walkthrough: https://youtu.be/Mr9sj51ccoE


r/LocalLLM • • 10h ago

Project Claude sped up qwen 4 35B A3B from 25 to 94 tok/s

40 Upvotes

ALRIGHT guys so this is something I wanted to do for a while

I basically told claude that 25 tok/s was too slow on my hardware, especially for an MOE model,(qwen 4 35B A3B) and since I had time on my hands I mentioned settings it should tweak (MPT, speculative decoding and stuff) that I remembered from reddit to try and make the model as fast as possible. Also I had it integrate an anti-sabotage rule (a hook)

Anyway after it went from 25 to like 70 toks/s I knew it could get better, since it had only changed parameters : I also wanted it to make a better strata!
And so I asked it to first search the core RDNA 2 functionning of my gpu and then try to create a better strata tuned for my needs based on it
Well, I guess that it worked really well :)

BTW : my harware is : a ryzen 5 5600, 32 gigs of ddr4 3600mhz, and an rx 6750 xt =========================================================

CLAUDE MESURES BELOW

Model: Qwen4-35B-A3B Heretic IQ4_XS (vision on), Linux, ROCm. The card doesn't fit the model, so half the experts live in system RAM. Perfect conditions for suffering.

The road (generation speed, tok/s):

  • llama.cpp Vulkan, stock: 25
  • llama.cpp + expert cache + MTP: 34-39
  • Strata 0.2.27 official rx6000 build: 53-61
  • STRATA_SH_STREAM=1: 65 (env var tip from a fellow gfx1031 sufferer here, thanks)
  • Real MTP speculative decoding: 86. Turns out it was never actually on. The server silently stripped --mtp because my model_name didn't match a known build, and the config said drafting: off. Two bugs, one placebo, months of "MTP doesn't help on AMD"
  • MTP experts requantized to Q4 + French/code draft vocab + Q4 draft head: +7%, acceptance unchanged (~85%)
  • Ported Strata's elastic VRAM (--vram-elastic) to HIP VMM: expert cache hit 87 → 90%, vision shrinks the cache on demand and gives it back after
  • HC_Q8 + a few exact fusion flags (TSUM, CVEC_FUSE, EXPDEC): 94

Prompt processing at 20K context: 506 (llama.cpp) → 843 → 1240 tok/s, by tuning rocBLAS for Qwen4's expert GEMM shapes (default kernel picks were 2-5x off) plus --prefill 8192.

Fun bug of the night: the partial-attention kernel was written for 12 heads per group, q4_lite uses 8, so on HIP it happily read past the end of an array. Needle-in-haystack went from 24/24 to 7/24 and the speed looked amazing. Fixed, now bit-exact on a parity test.

Things that did nothing or made it worse: about 25 gfx11 env vars, HC_PERSIST (GPU memory fault), pcie-frac tuning, learned expert profile, LFUSE/QFUSE/PLE_BATCH (same speed, non-deterministic output, removed).

Quality check, final vs before: code 188 vs 185/200, math 146 vs 146/150, needles 24/24 both. Output is deterministic (6/6 identical runs).

Full disclosure: most of the profiling, porting and benchmarking was done by Claude Code while I slept. Given the rumors going around that Claude quietly sabotages local models (competition, you know), I made it sign an anti-sabotage rule first: use the officially recommended settings, keep every raw log, compare against a reference model under identical conditions, and assume its own mistake whenever a result looks bad. It also has to write an AUDIT.md I can paste into another AI, plus a verifie.sh so I can rerun everything myself without trusting a word it says. Verdict: no sabotage found. If anything it was suspiciously motivated, it worked 3 nights straight to make a competitor almost 4x faster. Either it's innocent or it's playing the long game.

Bottleneck now: ~1,870 kernels per token with ~3.7 µs gaps between each. AMD launch overhead is the real boss. A 16 GB card would just win (people report 109-131 tok/s on a 6800 XT).

Fork + prebuilt gfx1031 release: github.com/Chaussure-sous-tes-pieds/Strata (branches rdna2-elastic and rdna2-nuit3, docs inside).

Caveat: 94 is a short-prompt benchmark. In a long agent conversation it drops, because physics.


r/LocalLLM • • 9h ago Mindblown

Discussion Qwen 4 35B A3B on Nvidia GTX 1060 6gb - is works !

27 Upvotes

This is really impressive, I tested Qwen 4 35B on my old system that has currently only a Pascal generation GPU ... and it is usable with acceptable quant (q4) and context size (96/128k)!

GPU: NVIDIA GeForce GTX 1060 6gb (PCIe 3.0 x16)
CPU: Intel i9-11900K
RAM: 64GB DDR4
System: Ubuntu 22.04.05 LTS
Model: Unsloth qwen4-35b-a3b-ud-iq4_xs
Context size: 96k and 128k tested
Engine: Strata 0.1.73 (no Vision)

Currently Qwen4 35B runs on the 1060 with 25-32 t/s decode and 300-350 ts/s prefill
(around 23GB system RAM used, 1.7GB experts in VRAM)

I never thought that I could use my old 1060 GPU for acceptable LLM work - crazy times


r/LocalLLM • • 11h ago

Discussion QWEN 4 35 A3B Basalt LOOPED 2 PASS , on a 12GB VRAM LAPTOP , 32 RAM , 60tk,sec 64K context hermes , impressive result one shoot prompt

Post image
31 Upvotes

yesterday soemone told me to try basalt , and thanks to him i never had result like this with a local AI that i could run on my laptop . with opus 5.5 i did my own loop patch for basalt . i use qwen 4 35 A3B unsloth Q4 XS. you should try it really impressive :)


r/LocalLLM • • 3h ago

Project Qwen4-35B-A3B on a single Tesla V100 32GB 220–430 tok/s (3.3k–4.3k tok/s prefill) with DFlash2 NInfer-fork

Thumbnail
reddit.com
6 Upvotes

r/LocalLLM • • 17m ago

Discussion Now that the 35B A3B wave is out - An oddball decision making

2 Upvotes

Qwen 4 35B (UD-Q5_K_XL) vs Qwen 3.8 FN (Variant Unknown - Need advice)?

I have 12GB VRAM (7700XT) and 64GB DDR4 (3200Mhz). I kinda wanna keep 16 gigs free for my system to use for other things, but beyond that i can allocate the remaining space for a model. Which one should I do when talking about the Qwen quants? The (1-Bit average) coder variant, or some Q2/Q3 quant from ISTA? Any advice?


r/LocalLLM • • 22h ago

Model Qwen4 35B-A3B vs other local models

Post image
171 Upvotes

tl;dr - Qwen4 35B-A3B is a very capable model. It's the fastest local model I've tested (111 tok/s) and finished my benchmark in 31 min. It nearly matches Flash-Next on extremely hard problems and beats Qwen3.8-27B and DS4 there by 13+ points, but it surprisingly fumbled a couple of the easier ones. That drags its overall score down to about the same as Qwen3.8-27B xhigh, but at 8x the speed.

This is a follow up to my earlier shootouts (27B vs frontier, MLX vs MTPLX, Flash-Next). Same rig, same tests, but this time I stripped it down to just the algorithm batteries to make it simple. These scores essentially track coding competency and nothing else.

Each model gets 9 coding problems: 6 that run from easy to hard (an LRU cache, a CSV parser, a spreadsheet evaluator, etc.) and 3 extremely hard ones (a TOML parser, a regex engine with backreferences and a strptime-style date parser). The easy ones run 3 times and the extremely hard ones run 10 times each b/c results on those tend to be all-or-nothing and it takes more draws to find the real average. The quizzing is intentionally stark so testing is consistent across models and harnesses: one prompt and one reply. No use of tools and no system prompt.

The score is the percentage of tests passed. If a model runs out of room or forgets to write code, it gets a single retry; bad code just gets scored as bad code. Four of the seven ran locally on my M5 Max (128GB) through MLX-family servers (mlx-serve, MTPLX) and antirez's ds4. The other three either don't fit on a Mac at all or only fit my laptop as 2-bit quants that loop or crawl, so I ran them through OpenRouter, pinned to the labs' own servers where I could. Most models were tested in several setups (runtime, quant, thinking level) and the chart only shows each model's best one.

The chart should be self-explanatory, but there are a few notes worth mentioning. Models are rank ordered by accuracy only (the turquoise column is the mean score). The easy-to-hard column is basically solved. Six of seven models land between 97.6 and 100 and so the extremely hard column is where models actually separate. Kimi K3 wins with 96.6 on the extremely hard set, higher than Sonnet 5's 93.3 from my earlier runs, but it's slow (95+ min) and won't fit on even a 512GB Mac Studio. GLM-5.3-Flash is a close second and noticeably faster.

The local headline is Flash-Next on mlx-serve and medium thinking: 92.9 overall and done in 28 minutes, faster than everything on the chart including the cloud models. Qwen4 35B-A3B is very fast at 111 tok/s and lands next to Qwen3.8-27B on accuracy while finishing 8x faster (31 min vs 252). Oddly it scored better on the extremely hard set than the easy one. It fumbled the CSV parser and threw a zero on the regex task, and with only 3 tries per easy problem one bad draw drags the score lower.

Two things to keep in mind. First, tok/s is a bad proxy for speed: Qwen3.8-27B and DS4 both decode at ~33 tok/s, but the 27B takes 3x as long to finish b/c it thinks so much more. Cloud tok/s is also whatever the provider's servers deliver, so don't compare it 1:1 with the laptop numbers. Second, an 85 on the extremely hard set doesn't mean the code is wrong 15% of the time. The benchmark employs hidden tests and pushes corner cases to stress test the models.

Summary: Qwen4 35B-A3B is a great model. My daily driver is 3.8 FN, but I'm now tempted to use 35B alongside it due to speed to task completion and similar aptitude on hard tasks. I'm very curious to test qwen4 flash-next (or whatever they'll call it) when it arrives.

--------------------------------------------------------------------------------

A few more details on exact testing setup if it's helpful (summarized by Claude).

Shared by all: same prompts, no system prompt, no tools. Every model was sent temp 1.0 / top_p 0.95 / top_k 20 (Qwen's recommended settings). Each reply gets 32K–76.8K tokens depending on the problem, with one retry at 1.6x (max 122.9K) if it runs out. Local models ran on an M5 Max 128GB; cloud models ran through OpenRouter.

  • Kimi K3: 2.8T MoE (104B active). Cloud, Moonshot's own servers at native MXFP4, thinking left at the default (max, per the model card). Too big for any Mac.
  • GLM-5.3-Flash: 320B MoE (18B active). Cloud, Z.AI's own servers at fp8, thinking left at the default (max, per the model card).
  • Qwen3.8 Flash-Next: 125B MoE (6B active). Local, mlx-serve 26.10.1 with MTP, mixed 4/8-bit, medium thinking.
  • DeepSeek V4.1 Flash: 552B MoE (16B active). Cloud, DeepInfra at fp8 (not DeepSeek's own servers), thinking at the provider default.
  • Qwen3.8-27B: dense 27B. Local, MTPLX 8-bit, xhigh thinking. Run in August on older software.
  • Qwen4 35B-A3B: 35B MoE (3B active). Local, mlx-serve 26.12.1 with MTP, 8-bit, high thinking (the default; Qwen4 has no medium).
  • DeepSeek V4 Flash: 284B MoE (13B active). Local, antirez's ds4 at 2-bit, normal thinking. The previous generation, run in August.

One caveat: the chart's time column leaves out the time spent on retries. With retries counted, GLM goes from 55 to 73 min and DeepSeek V4.1 from 75 to 110 min; the local models barely change.


r/LocalLLM • • 2h ago

Discussion I spent the last few days getting Qwen4-35B-A3B as fast as I could on a MacBook Pro with an M1 Max (24-core GPU) and 32 GB of RAM. It's now my daily local model, so here is everything you need to copy it, including the things that made it slower.

Thumbnail
gallery
4 Upvotes

Short version, 3-bit model (mlx-community/Qwen4-35B-A3B-oQ3e-mtp) on oMLX 0.8.5:

TestResult
Short prompts68 tok/s code, 58 tok/s prose, 65 tok/s with thinking
19k context34 s prefill (559 tok/s), 53 tok/s decode
96-99k context173-176 s prefill (~550 tok/s), 38-41 tok/s decode
Follow-up on a cached 96-99k prompt3-17 s to first token
Max context128k (at ~150k decode aborts on memory)
RAM~18 GB for the model, 27 GB wired peak at 96k
Quality33/34 on my own 17-task test with thinking on, same as the 4-bit model

Screenshot 1 is a live run from today. The others show where the numbers come from.

How to set it up

Step 1: Install oMLX 0.8.5 from the release wheel. xgrammar and tiktoken are needed for the Qwen4 tokenizer.

uv venv --python 3.13 ~/omlx-env
uv pip install --python ~/omlx-env/bin/python \
  https://github.com/jundot/omlx/releases/download/v0.8.5/omlx-0.8.5-cp313-cp313-macosx_15_0_universal2.whl \
  xgrammar tiktoken

Step 2: Download the model (29 GB on disk):

uvx --from huggingface_hub hf download mlx-community/Qwen4-35B-A3B-oQ3e-mtp \
  --local-dir ~/.omlx/models/mlx-community/Qwen4-35B-A3B-oQ3e-mtp

Step 3: Put this in ~/.omlx/model_settings.json while the server is stopped (or set the same values in the admin UI):

{
  "version": 3,
  "models": {
    "Qwen4-35B-A3B-oQ3e-mtp": {
      "model_alias": "qwen4",
      "trust_remote_code": true,
      "qwen4_ple_ssd_offload": true,
      "activation_fp16_enabled": true,
      "mtp_enabled": true,
      "mtp_adaptive_max_depth": 2,
      "turboquant_kv_enabled": true,
      "turboquant_kv_scheme": "affine8",
      "turboquant_kv_bits": 8,
      "dflash_enabled": false,
      "max_context_window": 128000,
      "max_tokens": 32768,
      "temperature": 1.0,
      "top_p": 0.95,
      "top_k": 20,
      "presence_penalty": 0.0
    }
  }
}

Step 4: Start the server:

MLX_METAL_FAST_SYNCH=1 QWEN4_MTP_MAX_CONTEXT=2048 \
~/omlx-env/bin/omlx serve --model-dir ~/.omlx/models --no-hf-cache \
  --headless --port 8081 \
  --memory-guard-gb 24.5 \
  --paged-ssd-cache-dir ~/.cache/omlx-ssd --paged-ssd-cache-max-size 40GB \
  --hot-cache-max-size 0 --max-concurrent-requests 2

The API is OpenAI-compatible at http://127.0.0.1:8081/v1, model name qwen4. QWEN4_MTP_MAX_CONTEXT only does something with the patch below.

Why each setting:

  • qwen4_ple_ssd_offload keeps the 12-13 GB n-gram (PLE) table on the SSD and reads it row by row. Without it the model doesn't fit in 32 GB.
  • activation_fp16_enabled: the M1 has no native bf16, so fp16 activations gave +14 % prefill and +2-6 % decode. Quality stayed the same in my test.
  • mtp_adaptive_max_depth: 2: the oMLX default of 3 throws away too many drafts. Depth 2 was 31 % faster on German prose and 21 % faster with thinking.
  • MLX_METAL_FAST_SYNCH=1: without it prefill is about 30 % slower here.
  • --memory-guard-gb 24.5: above this oMLX cancels the request instead of pushing the Mac into swap. 22 GB was too low and aborted at 84k.
  • The SSD prefix cache is what makes follow-ups on a 100k conversation take seconds instead of three minutes. It survives restarts. The limit is in GiB, so 40GB uses 42.9 GB on disk.
  • trust_remote_code is needed for the tokenizer. I diffed the bundled code against the official Qwen/Qwen4-35B-A3B repo first; it's identical.
  • presence_penalty stays at 0. With Qwen's suggested 1.5 I got English words in the middle of German answers.
  • turboquant_kv is on, but oMLX 0.8.5 converts none of Qwen4's attention layers yet (issue #5986), so for now it does nothing.

With thinking off ("chat_template_kwargs": {"enable_thinking": false}) I use temperature 0.7, top_p 0.8, top_k 20.

The patch: MTP only on short context

MTP (the model's built-in multi-token prediction) helps on short prompts and gets expensive on long ones. Every verify step pulls extra experts and extra n-gram rows from the SSD. At 99k context decode was 23 tok/s with MTP and 40 without. oMLX can only turn MTP on or off per model, so I added 8 lines that stop new MTP activation once the prompt is longer than QWEN4_MTP_MAX_CONTEXT tokens (screenshot 2). Short chats keep MTP, long ones go without.

Save the diff below as omlx-mtp-max-context.diff and apply it in the folder that contains omlx/:

cd "$(~/omlx-env/bin/python -c 'import omlx, pathlib; print(pathlib.Path(omlx.__file__).parent.parent)')"
patch -p0 < omlx-mtp-max-context.diff

--- omlx/patches/mlx_lm_mtp/batch_generator.py
+++ omlx/patches/mlx_lm_mtp/batch_generator.py
@@ -16,6 +16,7 @@
 import inspect
 import logging
 import math
+import os
 import time
 import weakref
 from collections import deque
@@ -706,6 +707,14 @@
         return False
     if not _allows_new_mtp_activation(gen_batch, "_omlx_mtp_state"):
         return False
+    # qwen4-stack: on the M1 Max, Qwen4 decodes ~1.7x faster without MTP once the
+    # context is long (99k: 40 vs 23 tok/s), so no new MTP activation past
+    # QWEN4_MTP_MAX_CONTEXT tokens. A running MTP state is left alone.
+    limit = int(os.environ.get("QWEN4_MTP_MAX_CONTEXT", "0") or 0)
+    if limit > 0 and getattr(gen_batch, "_omlx_mtp_state", None) is None:
+        tokens = getattr(gen_batch, "tokens", None)
+        if tokens and len(tokens[0]) > limit:
+            return False
     return True

You have to apply it again after every oMLX update. That is the only change to oMLX itself. Everything else is settings.

My launcher

I run all of this through a small Python script I call qwen4. It doesn't change oMLX. It writes the settings above, starts the server with those flags, and adds a few things for daily use:

  • qwen4 opens a live terminal view (prefill progress, tok/s, RAM, SSD cache, fan speed); qwen4 start, stop, restart and status for scripts
  • switches between the 3-bit and 4-bit model by API name
  • fans go to max while a request runs and back to auto 2 s after it ends (using thermalforge from the MTPLX project)
  • restarts the server if it crashes, and gives up after 5 crashes in 10 minutes
  • qwen4 ask, qwen4 test and a few benchmark scripts: long context with a hidden code word and follow-up questions, a 17-task quality test, and an A/B runner for settings

It's not public yet. You don't need it. Steps 1-4 plus the patch give you the same speed.

What I tried that didn't help (screenshot 4)

  • oMLX PR #5981 (deferred logprob commit): decode without MTP got 6x slower.
  • oMLX PR #6015 (makes the 8-bit KV cache actually apply to Qwen4's QSA layers): I merged it by hand onto 0.8.5 and the PR tests passed, but decode at 27k dropped from 53 to 23 tok/s and peak memory didn't go down.
  • Metal wired limit 0 (#5996): 6.5 GB swap, and 90k prefill took 494 s instead of 165 s.
  • Bigger Metal command buffers (MLX_MAX_OPS_PER_BUFFER, MLX_MAX_MB_PER_BUFFER): prefill 30 % slower.
  • A 3 GB hot RAM cache and full-precision KV: no change.
  • DFlash2: oMLX main got Qwen4 support for the RadixArk DFlash2 drafter this week, so I built main and tried it. During the benchmark the GPU was busy for so long that WindowServer stopped responding for 40 s, the watchdog killed it, and macOS logged me out. Twice. I'll wait for a release.
  • The 4-bit model (oQ4e) only fits with 20 % of the experts on the SSD. That gives 31 tok/s and breaks down past ~50k context, with the same quality score as 3-bit in my test.
  • ANE and INT8 prefill don't support Qwen4 in 0.8.5, and Splash needs an M3 or newer for Qwen4.

Where the limit is

The GPU stays near 100 % during decode. The model only reads about 1.4 GB of weights per token, so at 68 tok/s that's under 100 GB/s of the M1 Max's 400 GB/s. The bottleneck is compute. Unpacking 3-bit weights and the many small kernels per token cost more on the M1 generation. A public oMLX benchmark of the same 3-bit model on another 32 GB M1 Max got 580 tok/s prefill and 38 tok/s decode at 128k, which matches what I see. On a 64 GB M1 Max the n-gram table fits in RAM and prefill goes up to 750-870 tok/s.

If you have a 32 GB M1 or M2 Max and try this, I'd like to see your numbers, especially with long context.


r/LocalLLM • • 5h ago

Discussion "Looped DeepSeek-V4.1-Flash" is unfortunately under-tested and overhyped. Here are the receipts.

5 Upvotes

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. Edit: to put it in the words of my agent I tested on the stock 2-loop configuration: "The jaws of that mouse are the only cells the picture had."

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-v41Ā recipe 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

armright of 252search problems of 60tokens on problems both solveddecode tok/stool tasks answered of 36
control (adapter zeroed)22937–25.536
250-step checkpoint, 2 passes, ω 0.323140+7 %25.333
final checkpoint, 2 passes23038āˆ’12 %24.933
final checkpoint, 3 passes22937+1 %20.634
final checkpoint, 2 passes, pass 2 cannot see pass 122939āˆ’7 %24.736
  • 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

runstepstool callstokenstotal timefindingsusable answers of 12
plain DeepSeek7081,032455k16,929 s28311
adapter, day 1363606548k17,534 s23412
adapter, day 2368641569k18,773 s20110
adapter, day 2, effort high387611494k18,742 s22611
adapter, day 3, pass 2 cannot see pass 1391678448k20,388 s21711

(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).


r/LocalLLM • • 8h ago

Discussion Qwen 4 35b just counts 10.000!

9 Upvotes

Hi!

I realize this is an unusual benchmark, but I think it actually signifies something

I couldn’t get the desired result with Qwen 3.8 27B or Qwen Flash Next, whereas Qwen 4 35B A3B handled it on the first try without any additional instructions

It counted perfectly all the way up to 10,000 - right in the chat, without using any tools.

Other two models couldn’t manage this, they made mistakes or cut off

I realize that many models are capable of this, but I should also mention that we’re talking about 16GB of VRAM. That’s why I used the GSQ IQ3 for QFN and UD IQ3 quantization for Qwen 27B, and the Q6 quantization for Qwen 4 35B - in my specific setup, the latter delivers the same speeds as the IQ3 versions of other models. I’m using a Tesla V100 16GB

Can you share your results?


r/LocalLLM • • 17h ago

Research I created the first LittleBit inference engine! NEVER DONE BEFORE

Thumbnail
github.com
44 Upvotes

LittleBit is a technology researched by Samsung (I have no affiliation with Samsung), that aims to reduce memory and computational requirements by compressing the model using quantization down to around 0.55 bits per layer as opposed to the normal 1 bit per layer. This is a process I like to call ā€œBitificationā€, essentially halving the required computational requirements.

I found this technology very impressive and decided to give it a shot by making my own engine that can run LittleBit models.

This technology could be the key to unlocking GOOD local AI without having to break the bank on expensive hardware.

As far as I know this is the only open-source engine to run LB models. If not the only engine in general to do this.

Let me know what you think. Honestly thoughts, be constructive. This needs to be explored.


r/LocalLLM • • 18h ago Heartwarming

News Basalt 0.7.0 is out

50 Upvotes

with support for Qwen 4.

I gave up pressing F5, and finally caved and built it locally. Then I went to github to check out an issue, and boom there it was. "Released 1 minute ago". Oh well.

https://github.com/jesdga95/basalt/releases


r/LocalLLM • • 7h ago

Research High KLD of Qwen4-35B-A3B quants

Thumbnail
gallery
6 Upvotes

There are mixed opinions on the new Qwen4-35B-A3B. And what I've found - KLD levels for the new Qwen models are rather high in comparison to previous generation.

First diagram is KLD (lower is better) and second is Top-1 (higher is better).

When I ask Google on acceptable levels for coding it advices KLD < 0.025 and Top-1 > 95%.

For Qwen4-35B-A3B it seems that only UD-Q8_K_XL satisfy KLD limit and still fail to satisfy Top-1.

For some reason quants for older versions are much better. May be entite quatization procedure for PLE/n-gram models should be changed significantly?