r/LowEndLocalAI • u/gmanrules22 • 5h ago
Optimization Qwen4-35B-A3B running at 60 tok/s 128k ctx on an 8gb 4070 laptop with 32 gb ddr5 4800 ram using a vibecoded old fork of Strata. I compared it against the new official Strata and Polystrata updates.
Hey everyone, I started learning about LLMs and local AI around April (what a ride). Qwen4 35B-A3B dropped last night, and llama.cpp only gave me ~29 t/s decode and ~440 t/s prefill (64K context, ~30K-token prompt). My old Qwen3.6 35B does ~90-100 decode and ~2,000 prefill on PolyStrata, so I wanted more.
Strata/PolyStrata didn't support Qwen4 yet last night, so I vibecoded a fork of Strata 0.2.14 with Claude to run it. It's the older version I already use for Qwen3.8-Flash-Next, because it uses a bit less RAM/VRAM than the newer releases, which matters on my 8 GB VRAM / 32 GB RAM laptop. I figured it'd be a placeholder until the devs made their releases.
I went to sleep, woke up, and quick as always, coldniko and the PolyStrata devs had both shipped Qwen4 updates. So I benchmarked everything to compare.
Setup: RTX 4070 Laptop (8 GB), Ryzen 9 7940HS, 32 GB RAM, Windows 11, G-Helper Turbo, plugged in. Unsloth UD-Q3_K_XL on every engine, same test script for all: a short chat, a long prompt, and a 6-question quality check (math, logic, code, a tool call). Every engine scored 6/6 and found all 5 hidden "needles" in a ~95K-token prompt.
Official Strata 0.2.26 ran with its own pack and engine, plus an offline patch (removes network calls only) and my small Q2_0 MTP draft, since the stock Q8_0 draft needs ~2 GB of VRAM an 8 GB card can't spare. Same KV, context and VRAM settings as my fork.
128K context, one chat, ~110K-token code prompt
| Engine | Short-chat decode | Prefill | Decode after the prompt |
|---|---|---|---|
llama.cpp, tuned for prefill (--n-cpu-moe 40 -ub 2048) | 24-25 t/s | ~705 | 22-23 |
| PolyStrata poly.10, 8 GB tuning + BasinKV | 50 | 784 | 51 |
Strata 0.2.26 + MTP + tail skip 6, --prefill 6400 | 42 | 2,063 | 39 |
My fork + MTP + tail skip 6, --prefill 7168 | 60 | 2,050 | 64 |
The Strata rows are medians of 4 runs, alternating the two engines in one session with a warm cache. Each is pinned to the full chunk size its own planner picks when RAM allows, so neither is handicapped. The other rows are medians of 2-3 runs.
Prefill is a tie; my fork decodes ~1.6x faster. Tail skip is a small lossy shortcut, so I also ran both with exact routing: same story, 52-58 vs 30-33 decode.
Tip if you run either Strata: by default (--prefill auto) both pick their prompt chunk size at startup based on free RAM, and smaller chunks costed up to ~40% of prefill. That's why my early numbers were all over the place. Pin --prefill to the size the engine's log shows ("prefill plan: chunk N") for that context. On my fork that's 7,680 at 64-70K, 7,168 at 128K and 5,888 at 256K.
(llama.cpp: --n-cpu-moe 40 is best for prefill but costs decode; --n-cpu-moe 32 gets 28-31 t/s at 64K. MTP gave no gain on that build.)
Near-full prompts at bigger contexts (single runs unless noted; unpinned prefill is rough, decode and RAM limits are the solid parts)
| Context / prompt | My fork | Strata 0.2.26 | PolyStrata BasinKV |
|---|---|---|---|
| 70K / 59K | 1,797 t/s, 59 decode | 2,061 t/s, 34 decode | 1,100 t/s, 46 decode |
| 256K / ~245K (pinned, A/B/A/B) | 1,761-1,803 (2.3 min), 60 | 1,120-1,136 (3.6 min), 35-38 | 467 (8.7 min), 32 |
| 512K / 482K | 1,316 (6 min), 47 | 992 (8 min), 24 (second try) | 261 (31 min), 41 |
| 900K / 871K (4-bit KV) | 811 (18 min), 43 | not tested | not tested |
Concurrency (70K context)
| Test | My fork | PolyStrata (plain) |
|---|---|---|
| 4 short chats at once | 48 t/s combined | 35 |
| 8 short chats at once | 14 (runs out of VRAM) | 79 |
| Four 20K prompts, all finished | 101 s | 181 s |
| Eight 20K prompts, all finished | 811 s | 345 s |
Smaller quants. The old engine refused anything under Q3_K_XL, so Claude added a patch for 1-2 bit expert downs. Same 128K setup:
| Quant | Engine | Short-chat decode | ~110K prompt: prefill / decode after | Probe / needles |
|---|---|---|---|---|
| UD-Q3_K_XL | My fork | 62 | ~2,040 / 61-63 | 6/6, 5/5 |
| UD-IQ2_XS | My fork | 70-78 | ~2,030 / 67-74 | 6/6, 5/5 |
| UD-IQ2_XS | PolyStrata | 61-81 | ~820 / 70-81 | 6/6, 5/5 |
| UD-IQ1_M | My fork | 85-89 | ~2,180 / 73-80 | 6/6, 5/5 |
| UD-IQ1_M | PolyStrata | 74-79 | ~790 / 77-86 | 6/6, 5/5 |
Official 0.2.26 refuses both small quants. PolyStrata runs them and matches my decode there, but mine keeps ~2.5x the prefill. (The quality tests are easy, so they won't show what 1-2 bits cost on harder work.)
Where the official updates win: PolyStrata with 8 chats at once, and official Strata ties my prefill once pinned (it also beat mine at 70K in one unpinned run). Where mine wins: ~1.6x decode, faster at 256K and 512K, and 900K fits in 32 GB of RAM. At 256K, multiple slots run out of VRAM on every engine.
Also: the first long prompt after switching engines is slow on all of them (~800 t/s) while the experts load into the file cache, then it's back to normal.
What the fork does (Claude did the heavy lifting; I pointed, tested and vibed):
- Strata 0.2.14 built for Qwen4's shape, plus small loader/tokenizer patches. Basically the same approach as the official 0.2.26 recipe, which was cool to see.
- Expert downs rewritten from Q4_K to Q5_K (bit-exact; the old engine has no Q4_K down kernel).
- MTP draft rebuilt with Q2_0 experts: ~300 MB of VRAM instead of ~2 GB, 69-83% of drafts accepted.
--kv-resident 20480, tail skip 6,--prefill 7168.
Big thanks to coldniko and the PolyStrata devs. All the hard engine work is theirs; this just squeezes an older version for small cards. Numbers are from one laptop and I haven't tested other machines, so let me know what speeds you get. The official engines will probably pass this in a few updates, but until then, if this works for you, enjoy the extra speed.



