mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #5268] [Engine] qwen35moe on a Tesla P40 (sm_61): decode falls from 67 to 11 tok/s as the prompt grows to 24K (same GGUF on llama.cpp holds 69-78) #3136
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#3136
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 @sarge18 on GitHub (Nov 5, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/5268
Area
[Engine] (speed, kernels, models, the server and API)
Desktop app, Terminal or source?
Terminal (the
stratacommand)What happened
On a Tesla P40 (sm_61, experimental CUDA 12 path), the Qwen3.6-35B-A3B own-engine path (
qwen35moe,strata-q36) decodes at 67 tok/s on a short prompt, but decode speed falls steeply as the prompt grows: 50.7 tok/s at a 4K prompt, 21.1 at 12K, 13.0 at 16K and 10.9 at 24K. The same GGUF on the same card under llama.cpp v0.9.0 (--spec-type draft-mtp --spec-draft-n-max 2) holds 69–78 tok/s over the same prompts. Without drafting, llama.cpp still holds 42–46.Drafting does not explain it: acceptance stays high at every length (18 of 20 at 24K). The cost per generated token grows with the context. Prefill does not show the same drop: 790 / 778 / 663 tok/s at 4K / 12K / 24K.
From the engine's own lines (one P40, greedy, thinking off, 32K window):
The numbers repeat to within ±0.1 tok/s across two runs, and the 16K case falls in 11.6–13.0 over three repetitions. The load line is
strata-q36: hybrid experts: 168 of 256 per layer in VRAM (12.30 GiB), all 18.75 GiB in pinned host memory, so a third of each layer's experts stay in host memory. Possibly related: #3303 (the q36 KV cache is fp32 with no--kvoption). I have not profiled whether the time goes to attention over the KV cache or to something else. I also do not know whether newer cards show the same curve; this may be specific to the P40, which has very slow FP16. Decode by context length on any supported card would show whether it is P40-only.Smallest steps or command that reproduce it
Config written by
strata install --family qwen36 --model UD-Q4_K_XL --cuda 12 --gpu 1 --context 32768(engine command as launched):Then send one greedy request (temperature 0, top_k 1, and
presence_penalty 0,frequency_penalty 0,repetition_penalty 1set explicitly, see #3354) with a ~4K, ~12K and ~24K token prompt andmax_tokens64. Compare the "generated in … tok/s" figure in the engine log.Reproduction status
Reproduced locally
Strata version
0.2.10 (Terminal), engine package
0.1.56 linux-x86_64-cuda-cuda12(signed, from the v0.2.10 feed)Graphics card, memory and system
1× Tesla P40 24 GB (sm_61; 22.4 GiB usable) of two in a Dell R730, 2× Xeon E5-2698 v4 (no AVX-512), 499 GiB RAM, Ubuntu 26.04, driver 580.173.02. The engine runs pinned to the GPU's NUMA node (
numactl --cpunodebind=1 --preferred=1). Nothing else ran on the card.Model, size and settings
Qwen3.6-35B-A3B-UD-Q4_K_XL.gguf, 22,853,663,008 bytes, sha256
55983c5a…e9f1(thesetup.pypin). 32K context,--mtp 2, one request at a time, thinking off.Logs
The four request lines are above. Comparison on the same machine and file: llama.cpp v0.9.0 (
cd959bae, built for sm_61),-ngl 99 --n-cpu-moe 0 -fa on, all experts in VRAM: decode 73.9 / 77.6 / 68.7 tok/s at 4K / 12K / 24K with draft-mtp n_max 2, and 46.0 / 44.5 / 42.4 without drafting.Measured and written up with the help of an AI assistant (Claude); the numbers come from the engine's own log lines quoted above.