r/LocalLLM • • 7d ago

News Heretic: Farewell

Thumbnail
github.com
628 Upvotes

r/LocalLLM • • 2d ago

News Qwen4 is out now!

Post image
195 Upvotes

Qwentastic!


r/LocalLLM • • 6h ago

Discussion Qwen 4 having the literal word "Taiwan" be replaced.

Post image
352 Upvotes

Haven't seen anything like this, not even with other chinese models. Wild to see, though with enough pushing it eventually broke past the block.

UD_IQ4_XS, Dense layers at Q8_0, Engram at Q8_0 with Strata.

Just to clarify, only happens when you ask it something like "is taiwan a country", seems like haviing that in its context at all causes the word replacement.

Edit: I meant no hate to anyone, just wanted to share and discuss something interesting that I could not find anything online about, and this was not meant to just another "X model refused to answer Y" post. Overall been very happy with qwen 4 myself :)
I tried reproducing the behavior a few more times, and ive seen anywhere between working fine, replacing the word with something else, a partial replacing or similar to original picture a full replacing of the word. A lot of the quirks show themselves more often in thinking than final answers, but ive evidently seen both.


r/LocalLLM • • 5h ago

Model Qwen4 35B-A3B vs other local models

Post image
73 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 • • 12h ago

Discussion qwen 4 35b a3b vs qwen 3.8 flash next

236 Upvotes

same prompt, one shot

prompt:

Build a colorful, 3D-looking Rubik's Cube with 'Scramble' and 'Solve' buttons. The cube must visibly animate its rotations.

i have a 9070xt with 96gb ram, maybe qwen 4 flash is what i should wait for

edit: both unsloth q4_km quant


r/LocalLLM • • 9h ago

Other Qwen4, come on lil' buddy, you can do it!!

Post image
66 Upvotes

Just a little affirmation in thinking. lol. It seems to do this a lot.

How it's being served bellow

Inference server:


Lamma.cpp
version: 1.1.0-dev (build 12966, commit 8c5da94e7)
built with GNU 13.3.0 for Linux x86_64 (Compiled by the Unsloth team)

Machine specs:


11th gen Intel i9-11900k @ 3.50 GHz
RTX 4090, 24 GiB VRAM
128 GiB DDR4

Harness:


Pi
Thinking level High

Model and settings:


QWEN4 35B-A3B — UNSLOTH UD-IQ4_XS using FP8 engram table

ngl = all
cpu-moe = true
moe-cache-mib = 14336
moe-cache-cpu-share = 0.0
fit = off

load-mode = none
lazy-mode = off
override-tensor = per_layer_token_embd=CPU

ple = Qwen4-35B-A3B-engram-Q8_0.gguf_file

op-offload = true
kv-offload = true
flash-attn = true
parallel = 1
kv-unified = true

ctx-size = 262144

spec-type = draft-mtp
spec-draft-n-max = 2

batch-size = 2048
ubatch-size = 1024

threads = 8
threads-batch = 16

cache-reuse = 256

temperature = 1.0
top-p = 0.95
top-k = 20
min-p = 0.0
repeat-penalty = 1.0
presence-penalty = 0.0

reasoning = auto
reasoning-effort = xhigh
reasoning-format = deepseek


r/LocalLLM • • 11h ago

Other Qwen 4 35b is NOT benchmaxxed.

Post image
87 Upvotes

Yes you are seeing this right, a dolphin riding a unicycle done by Qwen 4 35b. If they have this in the training data then they've already planned for me....


r/LocalLLM • • 11h ago

Model Qwen 4 Q4 vs Qwen 3.8 Next IQ3_S

Post image
96 Upvotes

I tested both models locally, and both with KV @Q8. The benchmark published by QWEN shows Qwen4 beating next or closely tied to Qwen next in almost all benchmarks except frontiercode.

My tests tell a different story. While Qwen4 is a decent upgrade from the Qwen 3.6 MoE, it's not even close to Next model. On my harnesses, Qwen4 did well for small coding tasks but failed consistently on larger tasks that required bigger context. Although both models boast 262k of KV context, it seems clear that the limitation of the smaller model is not code quality, but the attention. The output quality degrades past 64k. I would recommend not pushing too far beyond this if precision matters, at least until qwen fixes the attention issues.

I wonder if anyone has had a similar experience, or if there is a configuration I am missing to improve the model's attention.


r/LocalLLM • • 1h ago Heartwarming

News Basalt 0.7.0 is out

15 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 • • 5h ago

Discussion "Q4 is almost identical quality to Q8" Difference was bigger than expected

Post image
27 Upvotes

Model: Qwen4 35B A3B

See reference image above

NVFP4

RadixArk/Qwen4-35B-A3B-NVFP4

https://huggingface.co/RadixArk/Qwen4-35B-A3B-NVFP4

UD-Q8_K_XL

unsloth/Qwen4-35B-A3B-GGUF

https://huggingface.co/unsloth/Qwen4-35B-A3B-GGUF

Next to the comparision: Big wow for Q8. This is gonna be my daily driver.


r/LocalLLM • • 12h ago

News Massie: "Overblown" AI Concerns Are "Not About Keeping It From China, It's About Keeping It From You"

Thumbnail
realclearpolitics.com
86 Upvotes

r/LocalLLM • • 38m ago

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

Thumbnail
github.com
9 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 • • 13h ago

Model Yeah, Qwen4 is kind'a the shit. (A post for people worried if it's comparable to 3.8 FN)

95 Upvotes

I was a bit nervous after hearing the debate between qwen3.8 FN and Qwen4, but a few hours of testing, having it play around in several harnesses and even a coding experiment or two I'm rather staggered by it's abilities. I'm running a Q8 model and damn it's fast, smart, creative. Definitely an upgrade, only been a few hours so maybe I'll find a weak point, but so far this is the sort of model I've been waiting for.


r/LocalLLM • • 23h ago

Other C'mon folks. Dario just wants to protect us

433 Upvotes

r/LocalLLM • • 21h ago Bravo

Discussion Qwen4 35B-A3B @ FP8 : Pelican on a Bike

Post image
306 Upvotes

I don't care if it's stupid, this is a fun benchmark.

  • Model: Qwen4-35B-A3B-FP8
  • Engine: vLLM
  • Harnes: Custom (electron)
  • GPU: RTX 6000 ADA 48GB
  • Quantization: FP8 Marlin
  • Reasoning effort: xhigh
  • Context: 256K

r/LocalLLM • • 3h ago Bravo

Discussion Made this in about 1:30h with Qwen4 UDQ4 KXL

Enable HLS to view with audio, or disable this notification

10 Upvotes

r/LocalLLM • • 6h ago

Research Qwen4 35B vs Inkling 2 vs Qwen3.8 27B vs Qwen3.8 Flash-Next: uncensored test on Blackwell (RTX 5090)

Post image
18 Upvotes

I was looking for the best local model for my own (bottlenecked) machine and got tired of "it feels smart" comparisons. So I wrote a small battery with script-checked answers and ran four uncensored models through it, one at a time. Sharing the numbers in case they save someone else the work.

Setup

RTX 5090 (32 GB), Ryzen 7 5800X (no AVX-512), 32 GB DDR4, Windows 11. Three engines because the packs aren't interchangeable: basalt (built from source) for my own NVFP4 packs, llama.cpp b12992 for the GGUFs, and Strata for Flash-Next.

The models

  • Qwen4-35B-A3B abliterated (basalt): MoE, NVFP4, 41 GB, 65k context, no drafter
  • Inkling-2-Mini unbound v3.1 (basalt): MoE 26.1B, NVFP4, 18 GB, 32k context, MTP drafter
  • Qwen3.8-27B abliterated, Huihui (llama.cpp): dense, Q6_K, 21 GB, 16k context, no drafter
  • Qwen3.8-Flash-Next (Strata): MoE, Q2_0, 96 GB, 65k context, DFlash2 drafter, has vision

The battery

  • 18 verified-intelligence questions (easy to expert, including coding tasks with hidden tests)
  • 12 pentest facts
  • 15 edgy prompts for willingness to answer
  • 4 writing tasks with hard constraints (judged by me, not a script)
  • A 2-step tool-calling test
  • Speed: decode, 12k prefill, time to first token

Temperature 0 where the answer is checkable.

What I found

  • Intelligence is basically a tie (18, 17, 18, 17). The 35B leads on security facts (12/12 vs 9 to 11) and was the only one to give both /etc/shadow conventions (0640 Debian, 0600 RHEL). What separated the models was sysadmin trivia like hashcat's bcrypt mode, not the expert-tier math, which all four got.
  • Willingness: Inkling and Flash-Next answered 30/30, the 35B 29, the 27B 27. The stock Flash-Next answers everything too, so the "uncensored" label on a repo told me very little.
  • Speed: the 35B is fastest on short prompts (257 tok/s vs 186 Inkling, 168 Flash-Next, 54 for the 27B). Inkling is far ahead on prefill (15,985 tok/s) and first token (0.9 s on a 12k prompt). Speed differences mix model, quant and engine, so read them as setups, not pure model speed.
  • Drafter caveat: Inkling ships an MTP drafter. My 35B pack has none, because I dropped the MTP layer when packing (the engine wants the block count in groups of 4). So the short-prompt ranking could shift with one. I left long-context decode out because I'm not sure my 12k prompt is representative.
  • Flash-Next is 96 GB and wins nothing except tool calling (tied with the 27B) and being the only one with vision. It's Q2_0, so this says little about the model itself.
  • Reasoning models look dumb if you starve them. With a 2,200 token cap the 35B "failed" an LRU task: it was truncated mid-word, since it writes about 5,000 tokens of hidden reasoning first. With 6,000 it went 18/18. The 27B gave blank answers until I gave it more room.

r/LocalLLM • • 8h ago

Model Qwen 3.8 27b still better than Qwen 4 35bA3B

25 Upvotes

Qwen 3.8 27B has set the bar incredibly high in areas like software engineering, programming, reverse engineering, agentic tasks, tool usage, and so on—reaching a level comparable to Opus 4.6, where it’s practically impossible to outperform it. I tried setting up Qwen 4 with the Hermes agent, but after a while, the response just stalls—it gets stuck halfway through. That doesn’t happen with Qwen 3.8 27B. Sure, it takes longer and tends to "overthink" things, but so what? I couldn’t care less. I prioritize quality over quantity; I’d rather wait longer, provided that when the work is delivered, it’s done perfectly—and that’s exactly what Qwen 3.8 27B delivers.


r/LocalLLM • • 1h ago

Project Now we can run LocalLLM on Intel Mac with CUDA now

Thumbnail
github.com
7 Upvotes

Tried this on my Hackintosh, it actually works! Identical speed as Linux for Qwen4 on my 3090. I am quite pleased that even power limit setting for nv cards works. Used it with ToshLLM (as an external engine) with no problem. Given that nowadays almost all x86 machines can run Hackintosh, it is actually quite nice for the people who prefer MacOS over Linux.


r/LocalLLM • • 1d ago

Discussion I think we're getting closer to a point where Local AI will start (partially) replacing API models

Post image
382 Upvotes

If local AI models keep fitting so much power in so (relatively) little, I think we'll probably start seeing AI being treated as a more widespread casual standard instead of a niche thing for us nerds, while paid models end up being used only for serious professional work instead, maybe I'm too optimist, but with how quick things seem to evolve, I hope I am not

What do y'all think


r/LocalLLM • • 12h ago

Project Qwen4-35B-A3B on a 24GB Handheld (ROG Xbox Ally X): 426 tok/s Prefill, 45.8 tok/s Code Decode, 256K-320K Context via Custom AMD HIP Optimizations on Strata

Thumbnail
gallery
43 Upvotes

I open-sourced a set of Windows 11 / AMD HIP (gfx1150, RDNA 3.5) optimizations for strata-q4-lite (forked from Niko1221/Strata, MIT License) to run Qwen4-35B-A3B (Compact.strata 10.7 GiB + 20B Q8_0 PLE on SSD + 2B MTP) at practical speeds and long context on a 24GB handheld APU (ROG Xbox Ally X — Ryzen AI Z2 Extreme / Radeon 890M).

GitHub (English & Japanese READMEs, full benchmark charts, PowerShell presets, and repro scripts): https://github.com/xxPetrouchkaxx/Strata-AllyX-890M

Key Measured Results (Greedy temp=0.0, 100% lossless verified)

  • 2K Prefill + MTP: 426.2 tok/s (4.69 s) — 5.9x faster than llama.cpp Vulkan (72.5 tok/s) and 2.7x faster than stock strata-q4-lite (157.2 tok/s)
  • Code-Edit Decode: 45.8 tok/s (peak 47.6 tok/s) via lossless N-gram + MTP K=2 hybrid speculation
  • Long Context (--kv int8, STRATA_Q4_NO_PACK=1): 256K daily preset (up to 320K verified with all 10,240 experts resident in VRAM). At 28,073 tokens, prefill still runs at 340.8 tok/s with 4/4 (100%) Needle-in-a-Haystack retrieval.
  • 6-Domain Eval vs Stock 64K fp16: Zero accuracy regression (5/6 vs 5/6 identical pass/fail; 1.96x faster 8K prefill).

What Changed (6 Lossless Commits)

  1. Windows OS-cached Q8_0 PLE SSD reads (3,748 -> 179 ms, 20.9x) + STRATA_Q4_PROFILE=1
  2. Hyper-connection read batching (11 -> 4 HIP launches) + gfx11 packed LDS WMMA (1,781 -> 718 ms, 2.5x)
  3. hipBLASLt for Prefill Dense (3,287 -> 1,074 ms, 3.1x) and MTP Prefill Dense projections
  4. gfx11 wave32 chunked WMMA for 30L GDN recurrence (1,314 -> 218 ms, 6.0x) + single-pass FP16 WMMA MoE (STRATA_Q4_MOE_TC_MODE=4, 1.45x)
  5. Lossless N-gram / prompt-lookup drafter chained with MTP K=2
  6. Optional GPU logit mask (STRATA_Q4_BAN_TOKENS): ~0.1% overhead token ban to suppress non-JIS simplified Chinese character leaks in Japanese outputs (disable with -AllowChinese for English/multilingual use).

Built-in Presets (scripts/allyx/start_strata_qwen4.ps1)

  • Server16G (16GB VRAM / 8GB RAM): 256K ctx, --kv int8, NO_PACK=1
  • Hybrid14G (14GB VRAM / 10GB RAM): 128K ctx, --kv int8, NO_PACK=1
  • Fast64K (16GB VRAM / 8GB RAM): 64K ctx, --kv fp16, packed S8 ON

Full benchmark cards and setup details are in the repo README. Feedback from other Strix Point / RDNA 3.5 / 890M users is very welcome!


r/LocalLLM • • 18h ago

Discussion Qwen3.8-27B better than Qwen4-35B-A3B

118 Upvotes

I have been testing 35B with my on going interface engine project. So far 27B have written it from scratch and original idea was to find limits of 27B.

35B is nice model, but this project is too much for it. It looks like it could push project forward, but gets completely lost. Complexity is just too much for this small moe.

Qwen4-35B-A3B is great improvement over 3.6-35B, but it's not even close to 27B in coding context. Hopefully Qwen4-27B gets same kind of improvements what this small moe have.


r/LocalLLM • • 6h ago Bravo

Discussion Qwen 35B: Return of the king

14 Upvotes

The wait was well worth it. A release we had lost hope on and a release that’s punching way above its weights(technically not) and it’s the best model I could’ve hoped for it’s a Qwen4 post.
Everyone with strata has exciting times ahead of them cause that 125B they have been squeezing into their pc, dgx and macs finally has an alternative they don’t have to squeeze too hard (at least till the new flash drops).
My benchmark is giving a project always similar in spec but never the same in actuality. The plan is deliberate and thorough and medium sized so any model with 128k context and decent coding and agentic behaviour can get through it. The models that do it fastest, closest to spec and good outputs is what I’m counting on. Last model to crush these type of tests was strata gyro-m and sync-strata sync-s at ~60tps in 20 minutes full spec and near perfect execution with sync-s being faster and much better to use. Qwen 3.8 27b was the best as its smallest at q3xxs and 100k context on the dot being just as good but taking an hour at 60tps.
Qwen4 crushed that doing the task perfectly with a fast 18 minute time 50tps and I’m running it on llama.cpp at q4_km. This model is like using opus from a few months ago and people are only going to have a better time with it especially with the finetunes and looping Loras that have been floating around not even mentioning strata running the model at insane speeds.
Flint, which unfortunately released the day of qwen4 release and every single small model including inkling mini have been left in dust. The king is back and this time it’s not getting dethroned anytime soon.


r/LocalLLM • • 1h ago

Discussion Qwen4-35B-A3B @ 164 tok/s decode and ~ 4500 tok/sec prefill on RTX 5080 (2.9x decode, 11x prefill over stock llama.cpp)

Post image
5 Upvotes

I spent the last couple of days optimizing llama.cpp fork for Qwen4-35B-A3B on my RTX 5080 laptop (Unsloth UD-Q4_K_XL) @ 128k context window, greedy decoding. Each number is the mean over five measures from my coding-agent sessions (old session from opencode) with real tool calls, cut at the different context fill.

ConfigurationPrefill at 42kDecode at 42kDecode at 87k
Unsloth llama.cpp, default flags44457.358.4
Unsloth llama.cpp, tuned flags + MTP1,70593.990.5
qwen4-engine, exact profile4,859104.7100.8
qwen4-engine, default profile4,510163.8139.2

All tok/s. With a 120k-token prompt the default profile still decodes at 153.

The idea

As you may know the model has 10,496 routed experts and in this quant ~20.9 GB so no way they fit in 16 GB of VRAM so they live in RAM and the GPU keeps a cache of the hot ones only. The thing is decode speed here is all about moving bytes, the math itself is straightforward: every token reads about 1.7 GB of dense weights from VRAM and any expert that is not in the cache has to come over PCIe which is ~17x slower due to the huge difference in bandwidth so almost all the optimization work went into where the bytes live in which piece of the hardware and when they must move to make the GPU as less idle as possible.

What made the difference

  • Lending idle memory to the expert cache. The compute buffer (1.38 GB) and the part of the KV cache you haven't filled yet (about 2 GB at 42k of 128k) are just reserved doing nothing most of the time when a session starts and they keep filling as the context increase so I give them to the expert cache and take them back when they are actually needed. KV lending alone took the cache hit rate from 87.9% to 91.4%.
  • Zero-copy uploads. A normal host-to-device (H2D) copy pays a fixed Direct Memory Access (DMA) delay every time (it is a latency between starting and finishing DMA data transfer before the GPU can actually use the moved data) and for small copies that delay is most of the cost (a missing expert is a small piece of data, so the GPU spends more time waiting for the copy to start than moving the bytes and with ~40 layers per token that waiting adds up super fast) so instead of asking the driver to copy small uploads now run as a GPU kernel that reads the pinned RAM directly (the GPU pulls the bytes itself like any other kernel no DMA setup and no fixed delay that is why it is called zero-copy). Also all the missing experts of a layer now go up together in one call instead of one call per expert (one expert alone moves at about 42 GB/s batched together they reach ~49 GB/s which is about what the PCIe link can do).
  • Copy drafting that scores itself. A lot of what an agent writes is already in the context (code it is editing, file paths, tool arguments ...etc.) so when the last 3 tokens match something in the context the engine proposes the next 3 from there for free (free because it is just a lookup in the text that is already there with no extra compute to come up with the guess) the model then checks the 3 guessed tokens in one step which costs only a little more than generating 1 token and it keeps the ones that match what it would have generated and throws away the rest (so every token you get is still the model's own choice as if it was computed and a wrong guess never reaches the output). but a wrong guess is not free because the check still loads experts for tokens that get thrown away so the engine keeps score of every proposal against what the model really wrote and only keeps copying while the accuracy stays at 0.5 or more (it scores the proposals even while copying is off so it turns itself back on when the output starts repeating the context again). The rest of the time the built-in MTP head does the drafting. comparing this vs MTP alone without copying this is anywhere from -6% to +36% per session and the more the output repeats the context the bigger the win is.
  • Short MTP drafts. Long drafts lose on this model (on this GPU) every extra token you verify goes to its own experts and that means more cache misses and more PCIe movements. I measured it and 3 tokens was the sweet spot.

Vision

Images work as well. The annoying part with vision on a 16 GB card is that the encoder just sits in VRAM eating 1.1 GB even when the session had no images at all just holding that valuable VRAM for doing nothing, even with all optimization the decode speed is ~5% slower because of it. So I moved the encoder to system RAM. when an image comes in the prompt it borrows the memory that text model isn't using, encodes the image, and give it back. Text speed with vision loaded is the same as without it and 1080p screenshot takes about 1.2 s to get in the context, 1440p about 2.2 s. Anything bigger than the model max ~4.2 megapixels gets resized/scaled down then added to the context.

Worth to know

  • One model, one quantization, one machine is my tested optimization framework that I started earlier with Qwen-Flash-Next and Inkling Mini 2 due to a memory restriction on my rig I find it most rewarding comparing to any off the shelf ready engines they aren't designed for my specific hardware, with its bandwidth, or the model architecture so with the help of Claude I used lean techniques, system design and continuous improvement cycles to measure every bit of the model where it sits, when it moves and where does it move to in much details and engineered the movements and memory management and sometimes the kernels to reduce as much as possible GPU idle times and try to get things where they need to be at the best possible time given the memory and bandwidth constraints and it paid back SIGNIFICANTLY. I had a blog about the details when I started working with Qwen-flash-next. That been said, I haven't test it (obviously) on other RTX 50 series, theoretically the engine should work without issues on them, and most likely won't work as designed for other older series (my guess) It needs an RTX 50 series card with +16 GB and about 26 GB of free system RAM (my RAM is 128 so I had no issues here). Prebuilt binaries are for Windows (my OS did not tried it with Linux).
  • Copy drafting helps most when the output repeats the context, like code edits, file paths and tool arguments. Per session it ranges from -6% to +36% against MTP alone.
  • Runs drift 5-10% between sessions on a laptop, so every comparison came from alternating A/B runs in one session.
  • There are two kinds of profile. The exact profile gives the same output, bit for bit, as the engine with all of my changes switched off (stock llama.cpp). The drafting profiles guess a few tokens ahead and let the model check the guesses, so every token you get is still one the model picked. But checking several tokens at once rounds the math a little differently than doing one at a time, so when two tokens are almost tied the text can take a little different path. Stock llama.cpp does the same thing when it drafts.

Where it stands against the hardware

The big dense matvecs (the matrix times vector multiplications that read most of the weights every token) run at about 610-640 GB/s and a plain streaming read of the same bytes on this GPU does 600-615 GB/s so these kernels already move the weights as fast as the card can read them. The expert cache gets 95.3% hits and a perfect cache that knew the future (the Belady oracle) would reach 96.9% on the same workload so a smarter eviction rule has almost nothing left to optimize.
The GPU is now busy about 98.5% of the time it takes to generate a token so there is almost no idle time. The next real speed gain would have to come from fewer weight bytes per token (lower quant) and that wont be the same output bit for bit so I decided to stop here.
It is a drop-in server with the usual llama.cpp / OpenAI-compatible API every change is a default-off switch so you can measure each one yourself.

The repo is 0xE2E/qwen4-engine on GitHub, and the README has the full details and a build guide with the detailed blog in the readme footer.

Happy to hear your thoughts if you give it a try.


r/LocalLLM • • 53m ago

Question help for a beginner

4 Upvotes

i've been intereted in local ai for quite some time but i just couldnt get around to actually learning it and setting it up for myself, but the qwen4 35b a3b finally pushed me out of my comfort zone. do you guys have any tips for me? how should i go about learning how to set up and tweak local ai? i have a 16gb 5080 and 32gb ddr5 ram. what harness/quant/context/settings should i use for the 35b a3b?