mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #3252] [Engine] 0.1.45 and 0.2.0-beta (engine 0.1.45.3): decode −10% and prefill −20% on A100 40GB (sm_80); 0.1.44.1 unaffected #1315
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#1315
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @t-sm0 on GitHub (Oct 19, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/3252
Area
[Engine] (speed, kernels, models, the server and API)
Desktop app, Terminal or source?
Source (engine built from source inside Docker per release tag).
What happened
On an A100 40 GB (sm_80), 0.1.45 loses ~10 % decode and ~20 % prefill against 0.1.44.1, and 0.2.0-beta (engine 0.1.45.3) inherits the regression unchanged — same args, same pack, fresh engine per arm. 0.2.0's new sm_86/sm_60 decode tables (+10–14 % there) again skip sm_80.
Identical fixed prompts per arm, one request at a time, engine restarted per arm, decode read from the engine's own
timings.predicted_per_second:[run i]prefix so nothing is cached),max_tokens 8, temp 0,cache_n = 0, median of 2 runs, tok/s fromtimings.prompt_per_second.*Decode cells are 16384-token wall runs on one session each — a later 5-arm rerun on fresh engines put 0.2.0-beta decode at 91–96 t/s and prefill at 3,105–3,119 (on par with 0.1.44.1). The prefill cells are a measurement artifact (an 8192-token prompt-cache hit shrank the read denominator; the −20 % does not exist —
0 reused + 23301 readreads 3,113 in every arm). See the correction comment below.In the beta arm the sand run's output also broke format (no fenced HTML, ~10 KB vs the usual ~31 KB) — noted in passing, not measured systematically.
Config difference, ruled out as the cause: the 0.1.4x arms carry the experimental-speed-projection control vector; the 0.2.0-beta arm cannot (the cvec launch flags were renamed/removed in 0.1.45.3 — the launch dies with
unknown argument: projecton--cvec-mode project). ESP measured ±0 % decode in an earlier A/B on this box.Suspects
native_mmvq_il_rows_forhas only akIlRows_70entry; every sm_80+ card inheritskIlRowsShared, measured on an RTX 3060 (sm_86) and RTX 5070 (sm_120). The A100 uses the same guess — same class of gap as the 0.2.0 sm_86/sm_60 tables that skip sm_80.f3be9743warm-up regression is HIP-only; a CUDA-side equivalent or the prefill chunk-path changes are candidates.Ruled out on our side: CUDA arch is explicitly 80 in all four builds (no other GPU in the box); identical pack, args, expert-cache size (14322 slots / 27.2 GiB) and VRAM budget across arms; ESP (±0 %); no storage-tier involvement (everything resident,
ple-io ram).Questions
STRATA_MMVQ_IL=0,STRATA_MMVQ_IL_ROWS=…,STRATA_ROUTE_TAIL_SKIP=0, prefill switches? Happy to run any set on this box and report numbers; all four images stay tagged, and this box stays on 0.1.44.1 meanwhile.Smallest steps or command that reproduce it
docker build --build-arg CUDA_ARCHITECTURES=80(the image's engine args below otherwise identical across arms).--pack <packs>/iq3_s --native <models>/Qwen3.8-Flash-Next-GSQ-RCO-IQ3_S-00001-of-00002.gguf --ple-gguf <models>/…-00002-of-00002.gguf --expert-profile <data>/expert-profile.bin --expert-cache auto --prefill auto --spec 4 --spec-min-p 0.5 --mtp <data>/mtp/rt --max-context 262144 --kv int8 --ple-io ram --kv-resident 32768 --vision --vram-reserve-mib 700.Reproduction status
Reproduced locally (all four arms, three probes each, fresh engine per arm).
Strata version
Strata 0.2.0-beta (
3d1fb48, engine 0.1.45.3) · 0.1.45 (c4074a70) · 0.1.44.1 (b3e02db) · 0.1.43.1 (2d70b1bf) — all built from source.Graphics card, memory and system
NVIDIA A100-PCIE 40 GB (sm_80, driver 615.78.08) · 125 GB RAM · i5-11600K (6C/12T, AVX2 only) · Arch Linux.
Model, size and settings
Qwen3.8-Flash-Next GSQ-RCO IQ3_S (native pack + 2 GGUF shards, PLE in RAM, MTP drafter) · 262K context · int8 KV · pictures on · expert cache 14322 slots / 27.2 GiB · args in the repro block above.
Logs
Per-arm probe numbers are in the table above; the engine's per-request
timings.predicted_per_second/prompt_per_secondvalues are the source of every cell. Raw per-request JSON for all arms available — say the word and I will attach them as a gist.@github-actions[bot] commented on GitHub (Oct 19, 2026):
Thanks for the issue. To keep the tracker readable, every item needs an area prefix in the title and the parts of the issue form filled in. This one is missing:
Edit the issue (title and description) and this note goes away on its own. If it is still missing parts in 5 days it will be closed, which is not a rejection: fix it and comment
/reopen.Details: CONTRIBUTING.md
@github-actions[bot] commented on GitHub (Oct 19, 2026):
Thanks, this follows the format now.
@njcray2 commented on GitHub (Oct 19, 2026):
I had a similar drop between 0.1.43.1 and 0.1.45 and it was fixed by changing
--vram-reserve-mib 700to--vram-reserve-mib 1600.Check to see if there are warnings like the following in your log:
For some reason 0.1.45 does not tolerate low VRAM as well as earlier versions.
@c-OOL-io commented on GitHub (Oct 19, 2026):
[data point] RTX 4080 SUPER (sm_89), Windows 11: App-bundle engine (0.1.45.3) ~18–31% slower than source 0.1.45, same box & identical config
Same machine, only the engine binary differs. 3 runs each with
strata_bench. Adds an Ada (sm_89) data point.Spec-draft acceptance is identical (~69 %), so it's the decode/prefill path itself, not speculative decoding.
Both engines report
engine_version 0.1.45but are different binaries (source 214.6 MB, component 223.4 MB in a0.1.45.3-windows-x86_64-cuda-cuda13folder); the App-bundle/component engine is the slow one.@Niko1221 commented on GitHub (Oct 20, 2026):
Thanks for the bisect between 0.1.44.1 and 0.1.45. We have no A100 and could not reproduce the loss: on a Tesla P100 (sm_60) and two RTX A4000 (sm_86), 5 interleaved rounds each, 0.1.45 against 0.1.44.1 measured decode x1.015 and x0.992 and prompts x1.004 and x1.022, and 0.2.1 is 7 to 10% faster in decode than 0.1.45 on both. Reading the commits found no default that changed for sm_80 only. Using your flags (262K context, --ple-io ram, --vision) the A4000 pair showed decode x0.96 once, which we could not repeat. Could you run the same decode and prompt test on 0.2.0-beta with STRATA_MMVQ_IL=0, STRATA_ROUTE_TAIL_SKIP=0 and your other flags, one change at a time, and send the numbers? A run of each tag in Docker would help too.
A run on 0.2.1 would help as well, since its decode is faster than 0.1.45 on our cards.
This is in Strata 0.2.1: https://github.com/Niko1221/Strata/releases/tag/v0.2.1
@victorgabr commented on GitHub (Oct 20, 2026):
I have an A100 to test this in 2 quick checks.
I ran an A/B test; I will submit the bench results later as a PR for you guys.
A --vram-reserve-mib 700 and --vram-reserve-mib 1600
PS. I am planning to submit a PR for better statistical tests on those benchmarks; only "median improvement" is not enough to claim anything if the standard deviation is huge (noise)
I've just made a PR adding statistical tests on bench.sh for A/B comparison.
https://github.com/Niko1221/Strata/pull/3494
@litao9417 commented on GitHub (Oct 20, 2026):
0.1.46 does not recover steady-state decode on sm_86 — measured −11% vs 0.1.45.3 on an RTX 3080 Ti
Different arch than the A100 report above, and a different result than the gfx1200 leg: here 0.1.46 is ~11% slower than 0.1.45.3, not flat.
Same machine, same model, same flags — the only change was the app auto-updating (0.2.0-beta → 0.2.1), which swapped the engine 0.1.45.3 → 0.1.46 (commit
a7bdbfdabc9a,f-021-rel).System
--max-context 262144 --kv int8 --kv-resident 32768 --pool-workers 7 --pcie-frac 0.55 --spec-min-p 0.7 --vram-reserve-mib 1728, no--visionBoot profile identical (control that the config did not move)
Method
One fixed Chinese prompt (~400 characters),
temperature 0,max_tokens 900,reasoning_effort low; 9 requests per session, median, fresh engine per session.Results
Only 1 of the 18 values on 0.1.46 reaches the 0.1.45.3 minimum, so the two samples barely overlap.
Raw 0.1.46 numbers:
[37.19, 45.62, 53.25, 55.33, 50.20, 50.02, 56.62, 56.62, 47.26]and[52.95, 55.43, 54.51, 48.22, 54.29, 59.34, 45.03, 46.17, 57.39].Caveat
Both builds cannot be loaded side by side (the app replaces the engine component in place), so there is no interleaved pair; the 0.1.45.3 sample is one session taken before the update. The boot-profile lines above are what I have to show the configuration did not move.
Happy to run
STRATA_*switches or other flags on this box if it helps bisect.@dvvii commented on GitHub (Oct 20, 2026):
[data point] RTX 2080 Ti (sm_75), Linux: the loss here is entirely the 0.2.x Linux file-tier defaults, not the engine. With them off, engine 0.1.46.2 equals 0.1.42 within ±1.3%.
Adds a Turing (sm_75) data point, and includes the
STRATA_ROUTE_TAIL_SKIP=0run asked for above.Box. i9-9900K (8c/16t, no AVX-512), 46 GB usable DDR4 dual-channel, RTX 2080 Ti 11 GB (sm_75), PCIe 3.0 x16 (engine probes 12.7 GB/s), Arch Linux, kernel 7.2.11, driver 615.78.08, CUDA UMD 13.4.
Model. Qwen3.8-Flash-Next GSQ-RCO IQ3_XXS, 40.0 GiB
experts.binpack on NVMe (2.50 GB/s),--resident-experts(35.8 GiB page-locked),--kv int8,--max-context 32768, MTP on,--expert-cache auto(2650 slots, 4.34 GiB),--spec 4,--spec-min-p 0.70.Method. Both engines compiled from source in the same v0.2.1.3 checkout; only
engine/stratadiffers, swapped withtools/ab_engine.py'sexe=.--rounds 4, so each arm runs in each position twice. The box was idle (loadavg < 2) before each run, which matters: a run started 49 s aftertools/calibrate.pyshowed a monotonic 20 → 39 tok/s climb with wall-clock time regardless of arm, and was discarded.Result A — stock 0.2.x defaults: the regression reproduces on sm_75
Medians of 4 rounds, decode tok/s:
Prompt tok/s: 50.0 → 46.9, 50.0 → 46.2, 44.3 → 43.8, 843.6 → 842.8.
Result B — same two engines, five file-tier variables set to 0 on both arms
STRATA_IO_PREFETCH=0 STRATA_IO_PF_GATE=0 STRATA_COLD_OVERLAP=0 STRATA_FILE_TIER_PROBE=0 STRATA_PREFILL_HOST_PLAN=0Prompt tok/s: 51.0 → 51.4, 48.5 → 49.6, 46.5 → 46.4, 847.4 → 849.0.
So on this box the 7–10 % is not in the decode path at all — it is the cost of the new Linux file-tier defaults, and 0.1.46.2 is otherwise identical to 0.1.42.
The prefetch never armed, so the cost is not prefetch doing work
0.2.1's note gates the pack prefetch on the page cache holding ≥ 55 % of the experts, and warns that below that a cold 4K prompt reads 4–6 % slower.
--resident-expertspage-locks 35.8 GiB here, so the engine's own plan reports2.2 GiB against 40.0 GiB is ~5 %, far below the gate — and the gate correctly declines. Every request logs
Nothing is read ahead, yet the path still costs 7–10 % relative to having the variables off. That looks like fixed overhead in the file-tier accounting rather than unwanted I/O, which may be the more tractable half of this report.
Caveat: the five variables were tested as a bundle, so which one carries the cost is not established.
STRATA_PREFILL_HOST_PLANis a plausible first suspect, since the plan above is recomputed per prompt. A per-variable bisect at 4 rounds each is about 20 min per variable on this box and can be run on request.Two hypotheses from this thread, tested and not the cause
STRATA_ROUTE_TAIL_SKIP=0(requested above). Much worse here, so the default is a large win on this card rather than a suspect — consistent with its documented +10–20 % on 12–16 GB cards that miss experts. Medians of 3 rounds, decode tok/s:=0--vram-reserve-mib 1600(per the suggestion earlier in this thread). This box does emitonly 411 MiB of VRAM free at the start of this request (below 512 MiB), so the symptom matches, but raising the reserve is a net loss on an 11 GB card: it buys 900 MiB of headroom and costs 540 expert slots (2650 → 2110, free VRAM 409 → 1309 MiB).So that fix appears to depend on having enough VRAM that the lost expert slots are cheaper than the paging risk.
Unrelated, but from the same session
tools/calibrate.pypicks--spec-min-p 0.70over the 0.5 default on this CPU, which its own docstring predicts ("a slower CPU pays more per extra window row, so it wants a higher floor"). Confirmed on a second harness:ab_engine.py, 4 rounds, +2.5 % to +6.6 % decode, winning 12 of 16 head-to-head request/round pairs. Both arms of Results A and B carry 0.70, so it does not affect the comparison above.Also, for anyone running this model on a 32K-context server:
tools/agent_turns_bench.pycannot complete here. Its turn 3 of 23 exceeds--max-context 32768and the server correctly answers HTTP 400; the workload climbs to ~100K tokens, which this card cannot hold alongside the model.--max-turns 2is as far as it gets.@Niko1221 commented on GitHub (Oct 21, 2026):
Thanks @c-OOL-io for the clean numbers. We tried to reproduce the packaged-vs-source gap on the same commit (v0.2.1) on two NVIDIA PCs (RTX A4000 with a Haswell Xeon, RTX 3060 with a Core Ultra 7): the released Linux CUDA 12 and CUDA 13 engines against a setup.py-style source build, 5 interleaved pairs, decode and 4K/20K prompts. They match within 1% (one run of the packages was even 5% faster in decode, which is noise), so the build flags (sm_86/sm_89 machine code, optimisation level, bundled CUDA libraries) are not the cause on those cards.
The one thing the package builds differently is ggml's CPU part: it targets a generic AVX2 CPU, while a source build uses all instructions of your CPU (your 7950X3D has AVX-512). We have no AVX-512 + NVIDIA box with Windows to test that, and your comparison also mixes versions (source 0.1.45 against the 0.1.45.3 engine, which is the 0.2.0-beta code).
Could you run source and component of the same version, 0.2.1, with strata_bench, and then copy only strata.exe from the source build over the component's strata.exe (same folder, so it uses the component's CUDA DLLs)? If that swap is still fast, send us the engine log header of both runs (the lines with cpu features and expert cache) and we will look at the CPU build next.
@t-sm0 commented on GitHub (Oct 21, 2026):
@Niko1221 — you asked for a re-measurement; my earlier comments (including those requested runs) were removed to keep the thread readable. Consolidated final result:
Resolution: the reported sm_80 decode regression is not in the engine code — the 0.2.x terminal flow produces the entire gap.
Final A/B, same machine (A100-PCIE 40 GB, sm_80), same tetris request (seed 42, temp 1.0, top_p 0.95, top_k 20, max_tokens 16384), same model volumes — only the serving path differs:
serve/server.py→ engine stdin/stdout)Both rows ran the same 0.1.44.1 binary (sha256-identical production binary, swapped in as the v0.2.1 engine component). The engine's own timing line under the terminal flow reads
16384 generated in 178148 ms (92.0 tok/s)— the engine itself runs slower when driven through the terminal, so this is not client-side HTTP delay.Engine cores are additionally equal when measured flow-free (generate mode, identical args): 0.1.44.1 = 73.7, 0.1.45 = 80.1, 0.1.46 = 73.3 tok/s (32.2 / 31.0 / 32.3 ms per speculation round).
Data notes, for the record:
engine started:log lines prove it.)So there is nothing to fix in the engine for sm_80. The remaining defect is in the Python terminal pipeline between the OpenAI-compatible endpoint and the engine's stdin/stdout protocol — backpressure over the stdout pipe and/or a different effective sampling/verification path (the acceptance drop with identical binaries and identical parameters).
@zwcf5200 commented on GitHub (Oct 22, 2026):
Cross-arch data point for the same conclusion, on sm_70: 6× Tesla V100-PCIE-32GB, both engines built from source.
Crossed test (server × engine, same box/pack/args):
serve/server.pyOnly the server version moves the number; the engine binary does not. Same argv (
--spec 3 --spec-min-p 0.5 --pipeline-windows 2 --layer-split auto), same 100-token replies, draft acceptance ~89 % in both. Prefill, first token, 256-token single-stream decode and the 4 greedy outputs (sha256) are unchanged.Details, full tables and engine logs: #3667.
@c-OOL-io commented on GitHub (Oct 22, 2026):
[data point update] Re-tested on 0.2.2 (engine 0.1.47): regression gone on this box
Same machine (Ryzen 9 7950X3D, RTX 4080 SUPER, Windows 11), same optimized config,
tools/strata_bench.py(runs 3, median of two runs):The earlier ~18-31% drop I measured with the App-bundle engine 0.1.45.3 does not reproduce on 0.2.2's 0.1.47: it is back on par with the source 0.1.45 build. Looks resolved here (sm_89, Windows 11, AVX-512 CPU).
@linxuhao commented on GitHub (Oct 22, 2026):
[data point] GA100 / sm_80 (CMP 170HX), Linux: sm_80 has no entry in the per-card tables; filling them gives decode +20 % and prompts up to 2x on this card
This is not an A100 and does not bisect the 0.1.44.1 → 0.1.45 drop. It is the same chip class, and two of the suspects above are measurable on it.
9de04cd4(0.2.1.4).Suspect 1, the shared MMVQ-IL table. sm_80 still has no row of its own in current main, so every sm_80 card falls back to
kIlRowsShared. We measured sm_80 row tables with the docs/MMVQ_IL_TABLE.md procedure. In interleaved pairs they gave decode +2.7..+3.2 % over the shared table, with identical output. That accounts for part of a 10 % gap, not all of it.Also missing for sm_80. The wide dense dequant is the default on sm_61 and sm_86 but not on sm_80. Turning it on (
STRATA_DEQUANT_WIDE=1, bitwise) gave prompts +6.3..+7.2 % at 3.3K tokens and +3.9 % at 52K. A100 owners can try that today without a rebuild.Our whole sm_80 series together, on the same box with a fresh engine per run:
The stock arm sets
STRATA_PF_FUSED=1 STRATA_OWNED_PRICE=exact. Our arm turns on our new switches plus existing upstream ones. The breakdown and the scope proposal are in #3712.🤖 Generated with Claude Code
@Niko1221 commented on GitHub (Oct 26, 2026):
We are closing this one into #3667, which has the crossed server x engine test that isolates the cause (serve/server.py, not the engine binary) on V100, and into #3712 for the missing sm_80 tables (MMVQ-IL rows, wide dequant). Thank you to everyone who posted data here. The 4080 packaged-engine gap was reported gone on 0.2.2. For the 3080 Ti and 2080 Ti reports, please open a new issue with the engine version and the start-up log of each arm so we can follow them separately.