[GH-ISSUE #3508] [Engine] qwen36 (qwen35moe) on sm_61 Pascal 16GB: expert cache fixed at 73/256 in VRAM, 18.75 GiB all in pageable host memory, 6.98 GiB VRAM free unused, runtime flags ignored #1439

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

Originally created by @visualpha on GitHub (Oct 20, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/3508

Area

[Engine] (speed, kernels, models, the server and API)

Desktop app, Terminal or source?

Desktop app (Windows, Strata-0.2.1-windows-cuda12.exe) + setup.py CLI

Reproduction status

Reproduced locally

Strata version

0.2.1 (engine 0.1.46)

Graphics card, memory and system

Quadro P5000 16 GB, compute capability 6.1 (sm_61), driver 582.78, CUDA 12.9 · Xeon E3-1230 v5, 4 cores / 8 threads, AVX2 · 32 GB RAM (page file 16 GB) · Windows 10 LTSC (10.0.19044) · Model: Qwen3.6-35B-A3B-UD-Q4_K_XL (unsloth, 22.85 GB, 753 tensors, MTP block inside)

Related: #3430 (App does not detect Quadro P6000 Pascal), #3444 (vision start error on the same card). This report adds a third Pascal-side finding: the qwen36 engine's expert placement on a 16 GB Pascal card (Quadro P5000, sm_61) leaves 6.98 GiB of VRAM free while putting 18.75 GiB of experts into pageable host memory. #3303 (qwen35moe KV always fp32) is also related but targets the KV path, not the expert-cache placement.


What happened

On this 16 GB Pascal card, the qwen36 engine (strata-q36) allocates the expert cache at a fixed 73 of 256 experts per layer (5.35 GiB in VRAM) and puts all 18.75 GiB of the experts into pageable host memory, leaving 6.98 GiB of VRAM free while RAM usage climbs to ~30 GB.

The allocation is decided at engine start and is not affected by any runtime flag:

Flag tried Effect
--expert-vram 13 Accepted (no "ignoring" message) but experts went 70 -> 73 (+3), VRAM free unchanged at 6.98 GiB
STRATA_MEMORY_LIMIT_MIB=20480 strata.exe Private bytes dropped 34.5 -> 31.1 GB, but the hybrid experts: 73 of 256 ... 18.75 GiB in pageable host memory line is byte-identical
STRATA_SM60_PERF=1 No change in expert allocation
STRATA_SM61_TABLE=1 No change (log shows the same line)
--kv int8, --kv-grow, --mmap-experts, --expert-cache N strata-q36: ignoring --kv int8 (not an option of this engine) — all rejected by the qwen36 engine

The engine's own log at start:

strata-q36: D:\AI Models\...\Qwen3.6-35B-A3B-UD-Q4_K_XL.gguf: 753 tensors (layout checked), 4.40 GiB on the GPU in 4.3 s (the routed experts are placed after the engine's buffers)
strata-q36: prompt experts on MMQ (int8)
strata-q36: context 32768 cells, prompt chunk 2048, MTP block loaded, 6.98 GiB of VRAM free
strata-q36: hybrid experts: 73 of 256 per layer in VRAM (5.35 GiB), all 18.75 GiB in pageable host memory, the rest of a batch of <= 128 rows on 4 CPU threads, bigger prompt chunks streamed (1.10 GiB staging); 45.3 s
strata-q36: warmed up in 7.3 s (one prompt chunk, a decode step, a speculative step)

nvidia-smi during idle after load: 15659 MiB / 16384 MiB used (95.6%). nvidia-smi during decode: peak util 78-83%, power 75-95 W, no thermal throttle (SM clock 1771 MHz, memory 2999 MHz, both at max).

RAM during idle after load: 30.1 GB / 32 GB used. strata.exe Private = 34.5 GB (> physical RAM), WorkingSet = 29.1 GB.


Reproduction steps

  1. Install Strata 0.2.1 (Windows CUDA 12 installer) on a Pascal sm_61 16 GB card (Quadro P5000 / GTX 1080 Ti class) with 32 GB RAM.
  2. Put the model file Qwen3.6-35B-A3B-UD-Q4_K_XL.gguf (22.85 GB) and mmproj-F16.gguf in a folder.
  3. Run:
    D:\Strata\control\python\python.exe D:\Strata\control\setup.py --yes --no-start --family qwen36 --model UD-Q4_K_XL --context 32768 --vision yes --data-dir D:\Strata-data --gguf-dir <folder>
    
  4. Start the server:
    D:\Strata\control\python\python.exe D:\Strata\control\strata.py serve --profile <config.json> --host 127.0.0.1 --port 8080
    
  5. Observe the engine log line hybrid experts: 73 of 256 ... 18.75 GiB in pageable host memory ... 6.98 GiB of VRAM free.

Expected (from the engine's own --help for the generic engine): --expert-vram GiB should set the experts' budget, and with a 16 GB card the budget should be closer to 10-13 GiB, which would put 120-160 of 256 experts in VRAM and cut the pageable host memory from 18.75 GiB to roughly 8-10 GiB.

Actual: 73 of 256 experts in VRAM regardless of --expert-vram 13 or STRATA_MEMORY_LIMIT_MIB=20480.


What this costs

Measured decode speed with the current (fixed) allocation:

  • Short prompt (~21 tokens), 300 output tokens, thinking off: 22-31 tok/s, stable median 31.3 tok/s (5-run medians, warm engine).
  • draft_n in timings is always 0 (MTP block is inside the GGUF, not a separate layer — expected for qwen36).
  • CUDA util during decode: 71-83% (peak 78-83%), never 100%.
  • CPU during decode: 4 physical cores, 3 of them pinned at 100%, 1 at ~10-13%, SMT siblings at 20-45%.

A community benchmark on an RTX 5060 Ti 16 GB (Blackwell) with the same model, same quantization, same 32K context reports 126-133 tok/s decode at 32K (issue #3303). The P5000 has 2x the memory bandwidth of a 1050 Ti and 3.3x the CUDA cores, yet only reaches ~31 tok/s, which points at the expert placement (73/256 in VRAM, 18.75 GiB pageable) rather than at raw GPU capability.

A Pascal-only community data point (GTX 1050 Ti 4 GB mobile, 48 GB RAM, Qwen3.6 35B at a ~14 GB quantization) reports 24.53 tok/s decode at 8K context — the smaller quantization means a much smaller pageable expert footprint, which is consistent with the "pageable host memory" cost being the dominant factor here.


Why this looks like a sm_61 / 16 GB gap

  • The engine's BUILD.json lists archs: [60, 61, 70, 75, 80, 86, 89], so sm_61 is compiled in.
  • setup.py's sm60_card(arch) treats 60 <= arch <= 70 as one class, so sm_60 (Tesla P100, 16 GB HBM2) and sm_61 (Quadro P5000 / GTX 1080 Ti, 16 GB GDDR5X) share the same code path.
  • The qwen36 engine (strata-q36) rejects --kv, --kv-grow, --mmap-experts, --expert-cache with ignoring ... (not an option of this engine).
  • --expert-vram 13 is accepted but only moves 3 experts into VRAM (70 -> 73), which suggests the flag is parsed but the placement decision uses a different (hard-coded or sm_60-derived) budget.

The result is that a 16 GB Pascal card behaves as if it had ~8 GB of usable expert VRAM, while the remaining ~7 GB of VRAM stays free and the 18.75 GiB of experts sit in pageable host memory, competing with the 22.85 GB of weights for 32 GB of RAM.


Suggested fix directions

  1. Make --expert-vram GiB actually set the expert cache budget on the qwen36 path (currently it is parsed but the placement does not follow it).
  2. Make the expert placement use the real detected VRAM (16 GB here) instead of a fixed 73/256 slots, at least when --expert-vram is given.
  3. Consider making the pageable host memory tier use pinned (page-locked) memory when RAM allows, or fall back to --mmap-experts-style file-backed paging when RAM is tight (the 18.75 GiB pageable tier is the main RAM pressure).
  4. Expose the expert-cache / expert-vram knobs that the generic engine supports (--expert-cache N, --mmap-experts, --resident-experts) on the qwen36 path, or document why they are not applicable.

Logs

Full engine log (last start, STRATA_MEMORY_LIMIT_MIB=20480):

strata-q36: D:\AI Models\...\Qwen3.6-35B-A3B-UD-Q4_K_XL.gguf: 753 tensors (layout checked), 4.40 GiB on the GPU in 4.3 s (the routed experts are placed after the engine's buffers)
strata: K-quant prompt kernels from .../strata_kq.dll (STRATA_MMQ_KQ=1)
strata-q36: prompt experts on MMQ (int8)
strata-q36: context 32768 cells, prompt chunk 2048, MTP block loaded, 6.98 GiB of VRAM free
strata-q36: hybrid experts: 73 of 256 per layer in VRAM (5.35 GiB), all 18.75 GiB in pageable host memory, the rest of a batch of <= 128 rows on 4 CPU threads, bigger prompt chunks streamed (1.10 GiB staging); 45.3 s
strata-q36: warmed up in 7.3 s (one prompt chunk, a decode step, a speculative step)

nvidia-smi --query-gpu=memory.used,memory.total,utilization.gpu,clocks.current.sm,clocks.current.memory,power.draw,temperature.gpu --format=csv,noheader during decode:

15659 MiB, 16384 MiB, 78 %, 1771 MHz, 2999 MHz, 90.63 W, 57

nvidia-smi -q -d PERFORMANCE throttle states:

Performance State   : P8
SW Power Cap        : Not Active
HW Slowdown         : Not Active
HW Thermal Slowdown : Not Active
Sync Boost          : Not Active

RAM / commit during idle after load:

TotalVisibleMemorySize = 32 GB
FreePhysicalMemory = 1.9 GB (used ~30.1 GB)
strata.exe Private = 34.5 GB, WorkingSet = 29.1 GB
PageFile CurrentUsage = 240 MB, PeakUsage = 2745 MB

What would make this verifiable on our side

  • A strata-q36 startup line that prints the detected VRAM and the chosen expert budget (slots and GiB) in the same line as hybrid experts: ....
  • A flag (or env var) that forces the expert budget on the qwen36 path, so we can A/B the 73/256 default against a larger budget on the same card.
  • A note in docs/QWEN36.md about the expected expert placement on 8 GB / 12 GB / 16 GB Pascal cards.

Happy to run any A/B arm on this machine and attach the logs. The full session transcript (including the --expert-vram 13, STRATA_MEMORY_LIMIT_MIB=20480, STRATA_Q36_FIXED_SLOTS=1, STRATA_Q36_STREAM_ALL=1, STRATA_Q36_KEEP_PACKED=1 runs) is available on request.


Limits of this report: single machine, single model, single quantization, Windows only. No Linux or sm_60 (Tesla P100) comparison. No token-parity check was run (the flags above do not change the answers, only the placement). The 1050 Ti data point cited above comes from a community article, not from a controlled benchmark on our side.

Originally created by @visualpha on GitHub (Oct 20, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/3508 ### Area [Engine] (speed, kernels, models, the server and API) ### Desktop app, Terminal or source? Desktop app (Windows, Strata-0.2.1-windows-cuda12.exe) + setup.py CLI ### Reproduction status Reproduced locally ### Strata version 0.2.1 (engine 0.1.46) ### Graphics card, memory and system Quadro P5000 16 GB, compute capability 6.1 (sm_61), driver 582.78, CUDA 12.9 · Xeon E3-1230 v5, 4 cores / 8 threads, AVX2 · 32 GB RAM (page file 16 GB) · Windows 10 LTSC (10.0.19044) · Model: Qwen3.6-35B-A3B-UD-Q4_K_XL (unsloth, 22.85 GB, 753 tensors, MTP block inside) **Related:** #3430 (App does not detect Quadro P6000 Pascal), #3444 (vision start error on the same card). This report adds a third Pascal-side finding: the qwen36 engine's expert placement on a 16 GB Pascal card (Quadro P5000, sm_61) leaves 6.98 GiB of VRAM free while putting 18.75 GiB of experts into pageable host memory. #3303 (qwen35moe KV always fp32) is also related but targets the KV path, not the expert-cache placement. --- ## What happened On this 16 GB Pascal card, the qwen36 engine (`strata-q36`) allocates the expert cache at a fixed 73 of 256 experts per layer (5.35 GiB in VRAM) and puts **all 18.75 GiB of the experts into pageable host memory**, leaving **6.98 GiB of VRAM free** while RAM usage climbs to ~30 GB. The allocation is decided at engine start and is not affected by any runtime flag: | Flag tried | Effect | |---|---| | `--expert-vram 13` | Accepted (no "ignoring" message) but experts went 70 -> 73 (+3), VRAM free unchanged at 6.98 GiB | | `STRATA_MEMORY_LIMIT_MIB=20480` | strata.exe Private bytes dropped 34.5 -> 31.1 GB, but the `hybrid experts: 73 of 256 ... 18.75 GiB in pageable host memory` line is **byte-identical** | | `STRATA_SM60_PERF=1` | No change in expert allocation | | `STRATA_SM61_TABLE=1` | No change (log shows the same line) | | `--kv int8`, `--kv-grow`, `--mmap-experts`, `--expert-cache N` | **`strata-q36: ignoring --kv int8 (not an option of this engine)`** — all rejected by the qwen36 engine | The engine's own log at start: ``` strata-q36: D:\AI Models\...\Qwen3.6-35B-A3B-UD-Q4_K_XL.gguf: 753 tensors (layout checked), 4.40 GiB on the GPU in 4.3 s (the routed experts are placed after the engine's buffers) strata-q36: prompt experts on MMQ (int8) strata-q36: context 32768 cells, prompt chunk 2048, MTP block loaded, 6.98 GiB of VRAM free strata-q36: hybrid experts: 73 of 256 per layer in VRAM (5.35 GiB), all 18.75 GiB in pageable host memory, the rest of a batch of <= 128 rows on 4 CPU threads, bigger prompt chunks streamed (1.10 GiB staging); 45.3 s strata-q36: warmed up in 7.3 s (one prompt chunk, a decode step, a speculative step) ``` `nvidia-smi` during idle after load: `15659 MiB / 16384 MiB used` (95.6%). `nvidia-smi` during decode: peak util 78-83%, power 75-95 W, no thermal throttle (SM clock 1771 MHz, memory 2999 MHz, both at max). RAM during idle after load: `30.1 GB / 32 GB used`. strata.exe Private = 34.5 GB (> physical RAM), WorkingSet = 29.1 GB. --- ## Reproduction steps 1. Install Strata 0.2.1 (Windows CUDA 12 installer) on a Pascal sm_61 16 GB card (Quadro P5000 / GTX 1080 Ti class) with 32 GB RAM. 2. Put the model file `Qwen3.6-35B-A3B-UD-Q4_K_XL.gguf` (22.85 GB) and `mmproj-F16.gguf` in a folder. 3. Run: ``` D:\Strata\control\python\python.exe D:\Strata\control\setup.py --yes --no-start --family qwen36 --model UD-Q4_K_XL --context 32768 --vision yes --data-dir D:\Strata-data --gguf-dir <folder> ``` 4. Start the server: ``` D:\Strata\control\python\python.exe D:\Strata\control\strata.py serve --profile <config.json> --host 127.0.0.1 --port 8080 ``` 5. Observe the engine log line `hybrid experts: 73 of 256 ... 18.75 GiB in pageable host memory ... 6.98 GiB of VRAM free`. Expected (from the engine's own `--help` for the generic engine): `--expert-vram GiB` should set the experts' budget, and with a 16 GB card the budget should be closer to 10-13 GiB, which would put 120-160 of 256 experts in VRAM and cut the pageable host memory from 18.75 GiB to roughly 8-10 GiB. Actual: 73 of 256 experts in VRAM regardless of `--expert-vram 13` or `STRATA_MEMORY_LIMIT_MIB=20480`. --- ## What this costs Measured decode speed with the current (fixed) allocation: - Short prompt (~21 tokens), 300 output tokens, thinking off: **22-31 tok/s**, stable median **31.3 tok/s** (5-run medians, warm engine). - `draft_n` in timings is always 0 (MTP block is inside the GGUF, not a separate layer — expected for qwen36). - CUDA util during decode: 71-83% (peak 78-83%), never 100%. - CPU during decode: 4 physical cores, 3 of them pinned at 100%, 1 at ~10-13%, SMT siblings at 20-45%. A community benchmark on an RTX 5060 Ti 16 GB (Blackwell) with the **same model, same quantization, same 32K context** reports **126-133 tok/s decode** at 32K (issue #3303). The P5000 has 2x the memory bandwidth of a 1050 Ti and 3.3x the CUDA cores, yet only reaches ~31 tok/s, which points at the expert placement (73/256 in VRAM, 18.75 GiB pageable) rather than at raw GPU capability. A Pascal-only community data point (GTX 1050 Ti 4 GB mobile, 48 GB RAM, Qwen3.6 35B at a ~14 GB quantization) reports 24.53 tok/s decode at 8K context — the smaller quantization means a much smaller pageable expert footprint, which is consistent with the "pageable host memory" cost being the dominant factor here. --- ## Why this looks like a sm_61 / 16 GB gap - The engine's `BUILD.json` lists `archs: [60, 61, 70, 75, 80, 86, 89]`, so sm_61 is compiled in. - `setup.py`'s `sm60_card(arch)` treats `60 <= arch <= 70` as one class, so sm_60 (Tesla P100, 16 GB HBM2) and sm_61 (Quadro P5000 / GTX 1080 Ti, 16 GB GDDR5X) share the same code path. - The qwen36 engine (`strata-q36`) rejects `--kv`, `--kv-grow`, `--mmap-experts`, `--expert-cache` with `ignoring ... (not an option of this engine)`. - `--expert-vram 13` is accepted but only moves 3 experts into VRAM (70 -> 73), which suggests the flag is parsed but the placement decision uses a different (hard-coded or sm_60-derived) budget. The result is that a 16 GB Pascal card behaves as if it had ~8 GB of usable expert VRAM, while the remaining ~7 GB of VRAM stays free and the 18.75 GiB of experts sit in pageable host memory, competing with the 22.85 GB of weights for 32 GB of RAM. --- ## Suggested fix directions 1. Make `--expert-vram GiB` actually set the expert cache budget on the qwen36 path (currently it is parsed but the placement does not follow it). 2. Make the expert placement use the real detected VRAM (16 GB here) instead of a fixed 73/256 slots, at least when `--expert-vram` is given. 3. Consider making the pageable host memory tier use pinned (page-locked) memory when RAM allows, or fall back to `--mmap-experts`-style file-backed paging when RAM is tight (the 18.75 GiB pageable tier is the main RAM pressure). 4. Expose the expert-cache / expert-vram knobs that the generic engine supports (`--expert-cache N`, `--mmap-experts`, `--resident-experts`) on the qwen36 path, or document why they are not applicable. --- ## Logs Full engine log (last start, `STRATA_MEMORY_LIMIT_MIB=20480`): ``` strata-q36: D:\AI Models\...\Qwen3.6-35B-A3B-UD-Q4_K_XL.gguf: 753 tensors (layout checked), 4.40 GiB on the GPU in 4.3 s (the routed experts are placed after the engine's buffers) strata: K-quant prompt kernels from .../strata_kq.dll (STRATA_MMQ_KQ=1) strata-q36: prompt experts on MMQ (int8) strata-q36: context 32768 cells, prompt chunk 2048, MTP block loaded, 6.98 GiB of VRAM free strata-q36: hybrid experts: 73 of 256 per layer in VRAM (5.35 GiB), all 18.75 GiB in pageable host memory, the rest of a batch of <= 128 rows on 4 CPU threads, bigger prompt chunks streamed (1.10 GiB staging); 45.3 s strata-q36: warmed up in 7.3 s (one prompt chunk, a decode step, a speculative step) ``` `nvidia-smi --query-gpu=memory.used,memory.total,utilization.gpu,clocks.current.sm,clocks.current.memory,power.draw,temperature.gpu --format=csv,noheader` during decode: ``` 15659 MiB, 16384 MiB, 78 %, 1771 MHz, 2999 MHz, 90.63 W, 57 ``` `nvidia-smi -q -d PERFORMANCE` throttle states: ``` Performance State : P8 SW Power Cap : Not Active HW Slowdown : Not Active HW Thermal Slowdown : Not Active Sync Boost : Not Active ``` RAM / commit during idle after load: ``` TotalVisibleMemorySize = 32 GB FreePhysicalMemory = 1.9 GB (used ~30.1 GB) strata.exe Private = 34.5 GB, WorkingSet = 29.1 GB PageFile CurrentUsage = 240 MB, PeakUsage = 2745 MB ``` --- ## What would make this verifiable on our side - A `strata-q36` startup line that prints the **detected** VRAM and the **chosen** expert budget (slots and GiB) in the same line as `hybrid experts: ...`. - A flag (or env var) that forces the expert budget on the qwen36 path, so we can A/B the 73/256 default against a larger budget on the same card. - A note in `docs/QWEN36.md` about the expected expert placement on 8 GB / 12 GB / 16 GB Pascal cards. Happy to run any A/B arm on this machine and attach the logs. The full session transcript (including the `--expert-vram 13`, `STRATA_MEMORY_LIMIT_MIB=20480`, `STRATA_Q36_FIXED_SLOTS=1`, `STRATA_Q36_STREAM_ALL=1`, `STRATA_Q36_KEEP_PACKED=1` runs) is available on request. --- **Limits of this report:** single machine, single model, single quantization, Windows only. No Linux or sm_60 (Tesla P100) comparison. No token-parity check was run (the flags above do not change the answers, only the placement). The 1050 Ti data point cited above comes from a community article, not from a controlled benchmark on our side.
bsakaguchi 2026-11-04 01:51:17 +07:00
Author
Owner

@github-actions[bot] commented on GitHub (Oct 20, 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:

  • Start the title with its area: [Engine], [GUI], [TUI], [Benchmark], [Docs] or [Other], then a short description. Example: "[Engine] decode stops after 2 minutes".
  • Fill in "Area".
  • Fill in "Desktop app, Terminal or source?".
  • Fill in "Reproduction status".
  • Fill in "Strata version".
  • Fill in "Graphics card, memory and system".

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

<!-- gh-comment-id:6300989377 --> @github-actions[bot] commented on GitHub (Oct 20, 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: - [ ] Start the title with its area: [Engine], [GUI], [TUI], [Benchmark], [Docs] or [Other], then a short description. Example: "[Engine] decode stops after 2 minutes". - [ ] Fill in "Area". - [ ] Fill in "Desktop app, Terminal or source?". - [ ] Fill in "Reproduction status". - [ ] Fill in "Strata version". - [ ] Fill in "Graphics card, memory and system". 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](https://github.com/Niko1221/Strata/blob/main/CONTRIBUTING.md)
Author
Owner

@visualpha commented on GitHub (Oct 21, 2026):

A/B results and three new findings (0.2.2, engine 0.1.47)

Upgrading to 0.2.2 / engine 0.1.47 changed nothing on this machine's qwen36 path. The hybrid experts line is byte-identical to 0.2.1, and I ran a 6-arm A/B to separate the knobs.

Finding 0 (new, highest impact): MTP never fires on Windows qwen36 — drafts accepted 0 of 0 on every request

Every serve log line on this machine shows the MTP block loaded but never used:

strata-q36: context 32768 cells, prompt chunk 2048, MTP block loaded, 6.98 GiB of VRAM free
strata serve: session 0: prompt 21 tokens = ... 192 generated in 6630 ms (29.0 tok/s), drafts accepted 0 of 0 (stop)

All 10 recent requests: drafts accepted 0 of 0. For comparison, #3303's log on an RTX 5060 Ti (Linux, same model, same --mtp 2) shows drafts accepted 237/324, 229/342 — a 73% acceptance rate.

--mtp 0 vs --mtp 2 on this machine changes decode by only +0.4 tok/s (29.8 vs 30.2, inside noise), which is consistent with the draft loop never running. The MTP block is loaded (startup time differs: 61 s with MTP=2 vs 97 s with MTP=0), so the weights are there; the verify window appears not to be calling the drafter on this path. If MTP worked at #3303's 73% acceptance, decode here should be roughly 20-30% higher — a larger lever than the expert placement below.

A/B matrix (same model, same machine, 6 restarts, 5 requests each, thinking off, 300 output tokens)

# Config Median decode tok/s hybrid experts line
1 baseline (no --expert-vram, no env) 30.2 (30.1-30.6) 70/256 (5.13 GiB), 18.75 GiB pageable, 6.98 GiB VRAM free
2 --expert-vram 8 30.4 73/256 (5.35 GiB), same pageable/free
3 --expert-vram 13 30.7 73/256 (5.35 GiB), same pageable/free
4 --mtp 0 29.8 70/256, same
5 engine 0.1.46 (old binary) 30.0 70/256, same
6 env STRATA_HC_Q8=1 STRATA_ROUTE_TAIL_SKIP=0 only 29.9 70/256, same

All arms land in 29.8-30.7 tok/s (<3% spread, inside noise). The hybrid experts line never changes except for the two --expert-vram arms, which move 70 → 73 and stop there.

Finding 1: --expert-vram is a boolean, not a budget

8 GiB and 13 GiB produce the identical placement (73/256, 5.35 GiB). The flag is parsed (no ignoring message) but the placement does not follow the value. On a 16 GB card, 13 GiB of expert budget should put ~120-160 of 256 experts in VRAM, not 73.

Finding 2: engine 0.1.47 did not touch the qwen36 path

Arm 5 runs the previous binary (0.1.46) with the same config: identical hybrid experts line, speed within noise (30.0 vs 30.2). The 0.2.2 release notes do not mention qwen36 / qwen35moe expert placement.

Finding 3: the app's "Load model" path differs from the CLI path (three concrete deltas)

Loading the same model from the desktop app (0.2.2) instead of strata.py serve --profile produced:

(a) The app passes flags the q36 engine rejects:

... strata.exe --serve --native ... --mtp 2 --vram-reserve-mib 1536 --resident-budget-gib 12
strata-q36: ignoring --vram-reserve-mib 1536 (not an option of this engine)
strata-q36: ignoring --resident-budget-gib 12 (not an option of this engine)

The app's qwen36 path apparently carries the Flash-Next flag set; both flags are silently dropped.

(b) The app's start OOM'd once before succeeding:

strata-q36: cudaMalloc(&p, n * 4) failed: out of memory (C:\w22\src\qwen35\q36_engine.cu:1127)

Same line and same failure as #3303 (the fp32 KV allocation). On this machine it recovered on a retry, but it means the app path is closer to the KV wall than the CLI path — likely because the rejected --vram-reserve-mib 1536 was meant to make room.

(c) The app's start is ~20% slower than the CLI's:

Start path Median decode
CLI, config with 3 env switches 30.2-30.7 tok/s
App "Load model" 24.0 tok/s (16.9 / 23.8 / 29.1 / 24.0 / 29.0)

Part of this is the missing env switches (arm 6 vs arm 1: 29.9 vs 30.2, so ~0.3), so most of the gap is elsewhere — possibly the OOM/retry, or the app's extra flags changing engine state. Worth a look if anyone reproduces it.

Why this issue may not have shown up before

  • The strata engine's own model menu (and the stratat.com model page) does not list Qwen3.6-35B among its headline quants (only six Qwen3.8-Flash-Next entries), so users picking a model from the list never see it. The app's own setup does offer a Qwen3.6 branch.
  • The setup warns needs 32 GB RAM for UD-Q4_K_XL, so the reachable audience is 32 GB RAM + 12-16 GB VRAM PCs — a small slice.
  • The app's initial setup has a Qwen3.6 branch (it detected my local files and reported Downloaded), but its picture-reader download then failed on my network, which is a separate issue.

The four open qwen36 reports I can find (#3508, #3303, #3294, #3298) all point at the same file: src/qwen35/q36_engine.cu — KV not parsed (#3303), expert budget not honored (this issue), single-GPU only (#3294), --mtp 2 treated as a path (#3298, fixed). It reads like the qwen36 path is behind the generic path rather than any single card being wrong.

Cross-card comparison (same model, same quant, same 32K)

Card OS Experts in VRAM RAM tier Source
Quadro P5000 16 GB (sm_61) Windows 10 70-73 / 256 pageable this issue
RTX 5060 Ti 16 GB (sm_120) Ubuntu 78 / 256 pinned #3303

The VRAM-side numbers are within 10% of each other, which argues against an sm_61-specific cause. The difference I see is the host-memory tier: pageable here (Windows + 32 GB RAM, Private bytes 34.5 GB > physical) versus pinned on Linux. I can test a pinned build if someone points me at one.

What would settle it

  1. A strata-q36 startup line printing the detected VRAM and the chosen expert budget on the same line as hybrid experts: ... (I still cannot tell whether the 73 comes from a fixed table, an sm_60-era heuristic, or a free-VRAM calculation that ignores --expert-vram).
  2. One test engine with STRATA_Q36_EXPERT_VRAM=<GiB> forcing the budget, so I can A/B 73/256 against a larger budget on this card and attach before/after speed plus an identity gate.
  3. If the app's qwen36 path is meant to carry --vram-reserve-mib, either honour it or drop it from the generated args so the log stops advertising flags the engine refuses.

Full logs for all six arms and both start paths are available on request.


Limits: one machine, Windows only, one quantization, decode-only. The A/B arms are 5 requests each, medians, no identity gate — they separate knobs, they do not establish that any of them changes the answers. The app-vs-CLI comparison is one run of each and includes a config difference (env switches) and one OOM retry, so treat the 24 vs 30 gap as a lead, not a measurement.

<!-- gh-comment-id:6318039654 --> @visualpha commented on GitHub (Oct 21, 2026): ## A/B results and three new findings (0.2.2, engine 0.1.47) Upgrading to 0.2.2 / engine 0.1.47 changed nothing on this machine's qwen36 path. The `hybrid experts` line is byte-identical to 0.2.1, and I ran a 6-arm A/B to separate the knobs. ### Finding 0 (new, highest impact): MTP never fires on Windows qwen36 — `drafts accepted 0 of 0` on every request Every serve log line on this machine shows the MTP block loaded but never used: ``` strata-q36: context 32768 cells, prompt chunk 2048, MTP block loaded, 6.98 GiB of VRAM free strata serve: session 0: prompt 21 tokens = ... 192 generated in 6630 ms (29.0 tok/s), drafts accepted 0 of 0 (stop) ``` All 10 recent requests: `drafts accepted 0 of 0`. For comparison, #3303's log on an RTX 5060 Ti (Linux, same model, same `--mtp 2`) shows `drafts accepted 237/324, 229/342` — a 73% acceptance rate. `--mtp 0` vs `--mtp 2` on this machine changes decode by only +0.4 tok/s (29.8 vs 30.2, inside noise), which is consistent with the draft loop never running. The MTP block is loaded (startup time differs: 61 s with MTP=2 vs 97 s with MTP=0), so the weights are there; the verify window appears not to be calling the drafter on this path. If MTP worked at #3303's 73% acceptance, decode here should be roughly 20-30% higher — a larger lever than the expert placement below. ### A/B matrix (same model, same machine, 6 restarts, 5 requests each, thinking off, 300 output tokens) | # | Config | Median decode tok/s | `hybrid experts` line | | - | -------------------------------------------------- | ------------------- | --------------------------------------------------------- | | 1 | baseline (no `--expert-vram`, no env) | 30.2 (30.1-30.6) | 70/256 (5.13 GiB), 18.75 GiB pageable, 6.98 GiB VRAM free | | 2 | `--expert-vram 8` | 30.4 | **73/256 (5.35 GiB)**, same pageable/free | | 3 | `--expert-vram 13` | 30.7 | **73/256 (5.35 GiB)**, same pageable/free | | 4 | `--mtp 0` | 29.8 | 70/256, same | | 5 | engine **0.1.46** (old binary) | 30.0 | 70/256, same | | 6 | env `STRATA_HC_Q8=1 STRATA_ROUTE_TAIL_SKIP=0` only | 29.9 | 70/256, same | **All arms land in 29.8-30.7 tok/s (<3% spread, inside noise).** The `hybrid experts` line never changes except for the two `--expert-vram` arms, which move 70 → 73 and stop there. ### Finding 1: `--expert-vram` is a boolean, not a budget `8 GiB` and `13 GiB` produce the identical placement (73/256, 5.35 GiB). The flag is parsed (no `ignoring` message) but the placement does not follow the value. On a 16 GB card, 13 GiB of expert budget should put ~120-160 of 256 experts in VRAM, not 73. ### Finding 2: engine 0.1.47 did not touch the qwen36 path Arm 5 runs the previous binary (0.1.46) with the same config: identical `hybrid experts` line, speed within noise (30.0 vs 30.2). The 0.2.2 release notes do not mention qwen36 / qwen35moe expert placement. ### Finding 3: the app's "Load model" path differs from the CLI path (three concrete deltas) Loading the same model from the desktop app (0.2.2) instead of `strata.py serve --profile` produced: **(a) The app passes flags the q36 engine rejects:** ``` ... strata.exe --serve --native ... --mtp 2 --vram-reserve-mib 1536 --resident-budget-gib 12 strata-q36: ignoring --vram-reserve-mib 1536 (not an option of this engine) strata-q36: ignoring --resident-budget-gib 12 (not an option of this engine) ``` The app's qwen36 path apparently carries the Flash-Next flag set; both flags are silently dropped. **(b) The app's start OOM'd once before succeeding:** ``` strata-q36: cudaMalloc(&p, n * 4) failed: out of memory (C:\w22\src\qwen35\q36_engine.cu:1127) ``` Same line and same failure as #3303 (the fp32 KV allocation). On this machine it recovered on a retry, but it means the app path is closer to the KV wall than the CLI path — likely because the rejected `--vram-reserve-mib 1536` was meant to make room. **(c) The app's start is ~20% slower than the CLI's:** | Start path | Median decode | | ------------------------------- | ------------------------------------------------- | | CLI, config with 3 env switches | **30.2-30.7 tok/s** | | App "Load model" | **24.0 tok/s** (16.9 / 23.8 / 29.1 / 24.0 / 29.0) | Part of this is the missing env switches (arm 6 vs arm 1: 29.9 vs 30.2, so ~0.3), so most of the gap is elsewhere — possibly the OOM/retry, or the app's extra flags changing engine state. Worth a look if anyone reproduces it. ### Why this issue may not have shown up before - The strata engine's own model menu (and the stratat.com model page) does not list Qwen3.6-35B among its headline quants (only six Qwen3.8-Flash-Next entries), so users picking a model from the list never see it. The app's own setup does offer a Qwen3.6 branch. - The setup warns `needs 32 GB RAM` for UD-Q4_K_XL, so the reachable audience is 32 GB RAM + 12-16 GB VRAM PCs — a small slice. - The app's initial setup has a Qwen3.6 branch (it detected my local files and reported `Downloaded`), but its picture-reader download then failed on my network, which is a separate issue. The four open qwen36 reports I can find (#3508, #3303, #3294, #3298) all point at the same file: `src/qwen35/q36_engine.cu` — KV not parsed (#3303), expert budget not honored (this issue), single-GPU only (#3294), `--mtp 2` treated as a path (#3298, fixed). It reads like the qwen36 path is behind the generic path rather than any single card being wrong. ### Cross-card comparison (same model, same quant, same 32K) | Card | OS | Experts in VRAM | RAM tier | Source | | -------------------------- | ---------- | --------------- | ------------ | ---------- | | Quadro P5000 16 GB (sm_61) | Windows 10 | 70-73 / 256 | **pageable** | this issue | | RTX 5060 Ti 16 GB (sm_120) | Ubuntu | 78 / 256 | **pinned** | #3303 | The VRAM-side numbers are within 10% of each other, which argues against an sm_61-specific cause. The difference I see is the host-memory tier: `pageable` here (Windows + 32 GB RAM, Private bytes 34.5 GB > physical) versus `pinned` on Linux. I can test a pinned build if someone points me at one. ### What would settle it 1. A `strata-q36` startup line printing the detected VRAM and the chosen expert budget on the same line as `hybrid experts: ...` (I still cannot tell whether the 73 comes from a fixed table, an sm_60-era heuristic, or a free-VRAM calculation that ignores `--expert-vram`). 2. One test engine with `STRATA_Q36_EXPERT_VRAM=<GiB>` forcing the budget, so I can A/B 73/256 against a larger budget on this card and attach before/after speed plus an identity gate. 3. If the app's qwen36 path is meant to carry `--vram-reserve-mib`, either honour it or drop it from the generated args so the log stops advertising flags the engine refuses. Full logs for all six arms and both start paths are available on request. --- **Limits:** one machine, Windows only, one quantization, decode-only. The A/B arms are 5 requests each, medians, no identity gate — they separate knobs, they do not establish that any of them changes the answers. The app-vs-CLI comparison is one run of each and includes a config difference (env switches) and one OOM retry, so treat the 24 vs 30 gap as a lead, not a measurement.
Author
Owner

@visualpha commented on GitHub (Oct 21, 2026):

Root cause found in src/qwen35/q36_engine.cu:2897 — the budget is clamped back to free VRAM

I read the engine source this evening (0.2.2). The placement logic in place_experts() explains both symptoms reported above — the fixed 73/256 slots and the --expert-vram 8 = --expert-vram 13 equality:

// L2839: budget2 is correct — 13 GiB when --expert-vram 13
size_t budget2 = vram_gib >= 0 ? budget : (fr > reserve ? fr - reserve : 0);

// L2896: slot_bytes starts from budget2 (correct)
size_t slot_bytes = budget2 > staging ? budget2 - staging : 0;

// L2897: but this clamps it back to free VRAM regardless of the budget
if (slot_bytes + staging + ((size_t) 256 << 20) > fr)
    slot_bytes = fr > staging + ((size_t) 512 << 20) ? fr - staging - ((size_t) 512 << 20) : 0;

On this card at engine start: fr = 6.98 GiB, staging = 1.10 GiB, so the L2897 clamp gives slot_bytes ≈ 5.38 GiB → 73 slots — identical with or without --expert-vram. The 13 GiB budget never reaches the slot computation at L2899.

This also explains why the flag is accepted (no ignoring message): expert_vram is parsed at L3778, used at L2812 to compute budget, and then silently overwritten at L2897.

Suggested fix

Only clamp when no explicit budget was given:

// L2897 current:
if (slot_bytes + staging + ((size_t) 256 << 20) > fr)
    slot_bytes = fr > staging + ((size_t) 512 << 20) ? fr - staging - ((size_t) 512 << 20) : 0;

// suggested:
if (vram_gib < 0 && slot_bytes + staging + ((size_t) 256 << 20) > fr)
    slot_bytes = fr > staging + ((size_t) 512 << 20) ? fr - staging - ((size_t) 512 << 0) : 0;

(The second argument of the ternary also has a typo: 512 << 0 instead of 512 << 20 in the current code — worth fixing in the same pass.)

Expected outcome on this machine

With the fix and --expert-vram 13:

Metric Current (clamped) Expected (fixed)
Slots in VRAM 73 / 256 (5.35 GiB) ~150–160 / 256 (~11.5 GiB)
Pageable host memory 18.75 GiB ~12–13 GiB
Free VRAM at start 6.98 GiB ~1–2 GiB
Decode hit rate ~54% (from #3303's 32K data) ~80%+
Decode speed 30.2 tok/s ~40+ tok/s (estimate)

I can A/B the patch on this machine if someone builds a test engine with it — the A/B protocol from the previous comment (6 arms, 5 requests each, medians) is ready to run.

Reproduction (unchanged from above)

strata-q36: context 32768 cells, prompt chunk 2048, MTP block loaded, 6.98 GiB of VRAM free
strata-q36: hybrid experts: 73 of 256 per layer in VRAM (5.35 GiB), all 18.75 GiB in pageable host memory, ...

--expert-vram 8 → 73/256; --expert-vram 13 → 73/256. Both identical.

<!-- gh-comment-id:6320031264 --> @visualpha commented on GitHub (Oct 21, 2026): ## Root cause found in `src/qwen35/q36_engine.cu:2897` — the budget is clamped back to free VRAM I read the engine source this evening (0.2.2). The placement logic in `place_experts()` explains both symptoms reported above — the fixed 73/256 slots and the `--expert-vram 8` = `--expert-vram 13` equality: ```cpp // L2839: budget2 is correct — 13 GiB when --expert-vram 13 size_t budget2 = vram_gib >= 0 ? budget : (fr > reserve ? fr - reserve : 0); // L2896: slot_bytes starts from budget2 (correct) size_t slot_bytes = budget2 > staging ? budget2 - staging : 0; // L2897: but this clamps it back to free VRAM regardless of the budget if (slot_bytes + staging + ((size_t) 256 << 20) > fr) slot_bytes = fr > staging + ((size_t) 512 << 20) ? fr - staging - ((size_t) 512 << 20) : 0; ``` On this card at engine start: `fr = 6.98 GiB`, `staging = 1.10 GiB`, so the L2897 clamp gives `slot_bytes ≈ 5.38 GiB` → **73 slots** — identical with or without `--expert-vram`. The 13 GiB budget never reaches the slot computation at L2899. This also explains why the flag is accepted (no `ignoring` message): `expert_vram` is parsed at L3778, used at L2812 to compute `budget`, and then silently overwritten at L2897. ### Suggested fix Only clamp when no explicit budget was given: ```cpp // L2897 current: if (slot_bytes + staging + ((size_t) 256 << 20) > fr) slot_bytes = fr > staging + ((size_t) 512 << 20) ? fr - staging - ((size_t) 512 << 20) : 0; // suggested: if (vram_gib < 0 && slot_bytes + staging + ((size_t) 256 << 20) > fr) slot_bytes = fr > staging + ((size_t) 512 << 20) ? fr - staging - ((size_t) 512 << 0) : 0; ``` (The second argument of the ternary also has a typo: `512 << 0` instead of `512 << 20` in the current code — worth fixing in the same pass.) ### Expected outcome on this machine With the fix and `--expert-vram 13`: | Metric | Current (clamped) | Expected (fixed) | |---|---|---| | Slots in VRAM | 73 / 256 (5.35 GiB) | ~150–160 / 256 (~11.5 GiB) | | Pageable host memory | 18.75 GiB | ~12–13 GiB | | Free VRAM at start | 6.98 GiB | ~1–2 GiB | | Decode hit rate | ~54% (from #3303's 32K data) | ~80%+ | | Decode speed | 30.2 tok/s | ~40+ tok/s (estimate) | I can A/B the patch on this machine if someone builds a test engine with it — the A/B protocol from the previous comment (6 arms, 5 requests each, medians) is ready to run. ### Reproduction (unchanged from above) ``` strata-q36: context 32768 cells, prompt chunk 2048, MTP block loaded, 6.98 GiB of VRAM free strata-q36: hybrid experts: 73 of 256 per layer in VRAM (5.35 GiB), all 18.75 GiB in pageable host memory, ... ``` `--expert-vram 8` → 73/256; `--expert-vram 13` → 73/256. Both identical.
Author
Owner

@Niko1221 commented on GitHub (Oct 22, 2026):

The A/B and the place_experts() root-cause note are enough to triage this; nothing else is needed from you. Thanks for the follow-up — the 0.2.2 comparison is what makes it actionable.

<!-- gh-comment-id:6337196393 --> @Niko1221 commented on GitHub (Oct 22, 2026): The A/B and the place_experts() root-cause note are enough to triage this; nothing else is needed from you. Thanks for the follow-up — the 0.2.2 comparison is what makes it actionable.
Author
Owner

@github-actions[bot] commented on GitHub (Oct 26, 2026):

Closing this issue because it still did not follow the format after 5 days. That is housekeeping, not a rejection.

To bring it back: fix the title (area prefix) and the missing parts, then comment /reopen. A check runs and reopens it, or tells you what is still missing. See CONTRIBUTING.md.

<!-- gh-comment-id:6413528232 --> @github-actions[bot] commented on GitHub (Oct 26, 2026): Closing this issue because it still did not follow the format after 5 days. That is housekeeping, not a rejection. To bring it back: fix the title (area prefix) and the missing parts, then comment `/reopen`. A check runs and reopens it, or tells you what is still missing. See [CONTRIBUTING.md](https://github.com/Niko1221/Strata/blob/main/CONTRIBUTING.md).
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#1439
No description provided.