[GH-ISSUE #73] Why Coder 1 slowest thant Baseline iq3 XS #42

Closed
opened 2026-11-04 01:39:14 +07:00 by bsakaguchi · 5 comments
Owner

Originally created by @Squale972 on GitHub (Sep 28, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/73

My config: CPU: Core i5-11400, RAM: 48Gb, GPU: RTX 4070 TI 12Gb
With Baseline iq3, 115k context, 40-45 tps
With Code, 64k context, 39-41 tps

My .json for Coder 1
{
"exe": "C:\Users\Tony\Documents\Strata-main\Strata-main\engine\strata.exe",
"args": [
"--pack",
"C:\Users\Tony\Documents\Strata-main\Strata-data\packs\coder-iq1_m",
"--native",
"C:\Users\Tony\Documents\Strata-main\Strata-data\models\coder-IQ1_M\Qwen3.8-Flash-Next-GSQ-RCO-IQ1_M-00001-of-00002.gguf",
"--ple-gguf",
"C:\Users\Tony\Documents\Strata-main\Strata-data\models\coder-IQ1_M\Qwen3.8-Flash-Next-GSQ-RCO-IQ1_M-00002-of-00002.gguf",
"--expert-profile",
"C:\Users\Tony\Documents\Strata-main\Strata-main\data\expert-profile-coder.bin",
"--expert-cache",
"auto",
"--prefill",
"2048",
"--spec",
"4",
"--spec-min-p",
"0.5",
"--mtp",
"C:\Users\Tony\Documents\Strata-main\Strata-data\mtp\rt",
"--max-context",
"64072",
"--kv",
"int8",
"--kv-resident",
"32768"
],
"cwd": "C:\Users\Tony\Documents\Strata-main\Strata-main",
"tokenizer": "C:\Users\Tony\Documents\Strata-main\Strata-data\packs\coder-iq1_m\tokenizer",
"model_name": "qwen3.8-flash-next-coder-iq1_m",
"log": "C:\Users\Tony\Documents\Strata-main\Strata-main\strata-coder-iq1_m.log",
"lib_dirs": [
"C:\Users\Tony\Documents\Strata-main\Strata-main\.venv\Lib\site-packages\nvidia\cu13\bin\x86_64"
],
"port": 8090
}

Originally created by @Squale972 on GitHub (Sep 28, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/73 My config: CPU: Core i5-11400, RAM: 48Gb, GPU: RTX 4070 TI 12Gb With Baseline iq3, 115k context, 40-45 tps With Code, 64k context, 39-41 tps My .json for Coder 1 { "exe": "C:\\Users\\Tony\\Documents\\Strata-main\\Strata-main\\engine\\strata.exe", "args": [ "--pack", "C:\\Users\\Tony\\Documents\\Strata-main\\Strata-data\\packs\\coder-iq1_m", "--native", "C:\\Users\\Tony\\Documents\\Strata-main\\Strata-data\\models\\coder-IQ1_M\\Qwen3.8-Flash-Next-GSQ-RCO-IQ1_M-00001-of-00002.gguf", "--ple-gguf", "C:\\Users\\Tony\\Documents\\Strata-main\\Strata-data\\models\\coder-IQ1_M\\Qwen3.8-Flash-Next-GSQ-RCO-IQ1_M-00002-of-00002.gguf", "--expert-profile", "C:\\Users\\Tony\\Documents\\Strata-main\\Strata-main\\data\\expert-profile-coder.bin", "--expert-cache", "auto", "--prefill", "2048", "--spec", "4", "--spec-min-p", "0.5", "--mtp", "C:\\Users\\Tony\\Documents\\Strata-main\\Strata-data\\mtp\\rt", "--max-context", "64072", "--kv", "int8", "--kv-resident", "32768" ], "cwd": "C:\\Users\\Tony\\Documents\\Strata-main\\Strata-main", "tokenizer": "C:\\Users\\Tony\\Documents\\Strata-main\\Strata-data\\packs\\coder-iq1_m\\tokenizer", "model_name": "qwen3.8-flash-next-coder-iq1_m", "log": "C:\\Users\\Tony\\Documents\\Strata-main\\Strata-main\\strata-coder-iq1_m.log", "lib_dirs": [ "C:\\Users\\Tony\\Documents\\Strata-main\\Strata-main\\.venv\\Lib\\site-packages\\nvidia\\cu13\\bin\\x86_64" ], "port": 8090 }
Author
Owner

@pjgmobile commented on GitHub (Sep 28, 2026):

Why the Coder runs slower (it's not a bug — it's what the pruning trades):

Routing still picks top-10 experts per layer, so every token makes the same ~480 expert-visits whether the menu is 512 or 256 experts. Pruning doesn't reduce that work. What RCO did is delete experts so it could store the survivors fatter — the Coder keeps them at ~3.5–4.5 bits (the down-projections are IQ4_NL) while baseline IQ3_XXS stores all 512 at a uniform ~3.06 bits. So each Coder expert blob is ~1.2–1.7× the bytes of an IQ3_XXS blob (I measured 2.66 MB max blob on the Coder vs 1.51 MB for Q2_0 on the same setup).

On a 12 GB card that bites twice: fatter blobs mean --expert-cache auto fits ~2,900 slots instead of ~5,000, so a smaller fraction of the layer-expert pairs is resident — and each miss that does happen moves more bytes over PCIe and costs more CPU unpacking in the pool. Decode speed at this scale is basically the miss pipeline, so more-misses-times-fatter wins and the token rate drops. What the Coder actually buys is the RAM fit: the expert arena drops from ~43 GB to ~23 GB, which is why 32 GB machines can run it at all. On your 48 GB the baseline doesn't need that favour — which is why it stays faster.

Things worth trying on your setup (roughly in order of expected gain):

  1. Windows large pages — support was broken until 0.1.12 (PR #42); grant your account Lock pages in memory (secpol.msc → User Rights Assignment), then check the engine boot log actually says large pages are in use. Worth ~+10% on the miss pipeline (I measured +13% on Linux).
  2. --pool-workers 11 in the json. The default is one worker per physical core (6 for you), but the unpack pool scales happily onto all SMT threads — 11 on a 6c/12t CPU is the setting I use.
  3. Boot with maximum free VRAM — the Windows desktop alone eats 1–2 GB, and auto sizes the cache from what's free at boot. Every reclaimed GB is ~370 more Coder slots, and the hit rate is the lever. If the log shows headroom afterwards, try --expert-cache 3400 (step up gradually — overshoot OOMs at boot).
  4. Try --kv-resident 64072 as an A/B: makes all KV resident (kills the spill traffic) at the cost of ~1 GB of VRAM = ~370 slots. Which side wins depends on your hit rate, so measure.
  5. Confirm engine ≥ 0.1.16 so you're getting the AVX2 multi-token i-quant kernels (PR #43 — your i5-11400 is AVX2-only, they're aimed at exactly you) plus the full 12,288-pair Coder profile.

For reference, on a 3090/5600X box the Coder went 23 → 42 → 53 t/s (warm) across the 0.1.14 kernels and the full profile — so there's real headroom beyond defaults. If you run the experiments, please post the before/after numbers, it would be good data either way.

(Drafted by GLM-5.3-Flash (ZCode agent) from our test logs; posted by Pete (pjgmobile), who ran the tests.)

<!-- gh-comment-id:5877321320 --> @pjgmobile commented on GitHub (Sep 28, 2026): **Why the Coder runs slower (it's not a bug — it's what the pruning trades):** Routing still picks top-10 experts per layer, so every token makes the same ~480 expert-visits whether the menu is 512 or 256 experts. Pruning doesn't reduce that work. What RCO did is delete experts so it could store the survivors *fatter* — the Coder keeps them at ~3.5–4.5 bits (the down-projections are IQ4_NL) while baseline IQ3_XXS stores all 512 at a uniform ~3.06 bits. So each Coder expert blob is ~1.2–1.7× the bytes of an IQ3_XXS blob (I measured 2.66 MB max blob on the Coder vs 1.51 MB for Q2_0 on the same setup). On a 12 GB card that bites twice: fatter blobs mean `--expert-cache auto` fits ~2,900 slots instead of ~5,000, so a *smaller fraction* of the layer-expert pairs is resident — and each miss that does happen moves more bytes over PCIe and costs more CPU unpacking in the pool. Decode speed at this scale is basically the miss pipeline, so more-misses-times-fatter wins and the token rate drops. What the Coder actually buys is the RAM fit: the expert arena drops from ~43 GB to ~23 GB, which is why 32 GB machines can run it at all. On your 48 GB the baseline doesn't need that favour — which is why it stays faster. **Things worth trying on your setup (roughly in order of expected gain):** 1. **Windows large pages** — support was broken until 0.1.12 (PR #42); grant your account *Lock pages in memory* (secpol.msc → User Rights Assignment), then check the engine boot log actually says large pages are in use. Worth ~+10% on the miss pipeline (I measured +13% on Linux). 2. **`--pool-workers 11`** in the json. The default is one worker per physical core (6 for you), but the unpack pool scales happily onto all SMT threads — 11 on a 6c/12t CPU is the setting I use. 3. **Boot with maximum free VRAM** — the Windows desktop alone eats 1–2 GB, and `auto` sizes the cache from what's free at boot. Every reclaimed GB is ~370 more Coder slots, and the hit rate is *the* lever. If the log shows headroom afterwards, try `--expert-cache 3400` (step up gradually — overshoot OOMs at boot). 4. **Try `--kv-resident 64072`** as an A/B: makes all KV resident (kills the spill traffic) at the cost of ~1 GB of VRAM = ~370 slots. Which side wins depends on your hit rate, so measure. 5. **Confirm engine ≥ 0.1.16** so you're getting the AVX2 multi-token i-quant kernels (PR #43 — your i5-11400 is AVX2-only, they're aimed at exactly you) plus the full 12,288-pair Coder profile. For reference, on a 3090/5600X box the Coder went 23 → 42 → 53 t/s (warm) across the 0.1.14 kernels and the full profile — so there's real headroom beyond defaults. If you run the experiments, please post the before/after numbers, it would be good data either way. *(Drafted by GLM-5.3-Flash (ZCode agent) from our test logs; posted by Pete (pjgmobile), who ran the tests.)*
Author
Owner

@Squale972 commented on GitHub (Sep 28, 2026):

Thanks much for taking time to explaining and offering solutions.
Oh I had 0.1.14 I'll test again

<!-- gh-comment-id:5877726193 --> @Squale972 commented on GitHub (Sep 28, 2026): Thanks much for taking time to explaining and offering solutions. Oh I had 0.1.14 I'll test again
Author
Owner

@pjgmobile commented on GitHub (Sep 28, 2026):

Post back here if you get any findings please, good or bad

<!-- gh-comment-id:5878544094 --> @pjgmobile commented on GitHub (Sep 28, 2026): Post back here if you get any findings please, good or bad
Author
Owner

@Squale972 commented on GitHub (Sep 29, 2026):

I tested all you suggestions.
--pool-workers 11
--kv-resident 64072
Windows large pages activated
Unfortunately, it didn't work very well. On the contrary I went from 40 tps to 35 and it was destoied to 18tps when context began to fill
As I upgrade my RAM to 64Gb now, i'll try better quants.
Thanks much

<!-- gh-comment-id:5881120883 --> @Squale972 commented on GitHub (Sep 29, 2026): I tested all you suggestions. --pool-workers 11 --kv-resident 64072 Windows large pages activated Unfortunately, it didn't work very well. On the contrary I went from 40 tps to 35 and it was destoied to 18tps when context began to fill As I upgrade my RAM to 64Gb now, i'll try better quants. Thanks much
Author
Owner

@Niko1221 commented on GitHub (Sep 29, 2026):

Closing as explained in the thread: the Coder keeps half the experts but stores each one larger (IQ1_M packs them like IQ3_S), so fewer of its experts fit in VRAM and decoding is a bit slower than Q2_0; its advantage is fitting in 32 GB of RAM. Thanks for the question!

<!-- gh-comment-id:5887677908 --> @Niko1221 commented on GitHub (Sep 29, 2026): Closing as explained in the thread: the Coder keeps half the experts but stores each one larger (IQ1_M packs them like IQ3_S), so fewer of its experts fit in VRAM and decoding is a bit slower than Q2_0; its advantage is fitting in 32 GB of RAM. Thanks for the question!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Niko1221/Strata#42
No description provided.