[GH-ISSUE #4870] [Engine] Adaptive tier defaults cost ~10 % code decode on a 2x RTX 3090 split whose cache holds ~45 % of each card's experts #2236

Open
opened 2026-11-04 01:57:48 +07:00 by bsakaguchi · 0 comments
Owner

Originally created by @orochifj on GitHub (Nov 1, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/4870

Problem

On a 2-GPU layer split whose expert cache holds about half of each card's experts, the adaptive tier's defaults (every 4 rounds, 96 swaps, decay x0.7) leave single-stream decode about 10 % slower on code than --adapt-every 2 --adapt-swaps 192 --adapt-decay 0.92. The decode hit rate on the code prompt is 84-85 % with the defaults and 92 % with the faster settings.

Environment

  • Strata v0.2.9 (c62d5e3a, engine 0.1.55) built from source for sm_86, with local changes: a data-parallel prompt path, an int8 IQ4 expert prompt kernel and a cap on the batch slots' context. The adaptive tier and the decode path are upstream's. Not repeated on the unmodified build.
  • Linux 6.8, NVIDIA 610.57.04, 2x RTX 3090 24 GB at 250 W, layer split 23 / 25.
  • Swift-1.5 Qwen3.8-Flash-Next IQ4_XS, --max-context 524288 --rope-scaling yarn --rope-scale 2 --kv int8 --kv-resident 32768 --spec 4 --spec-min-p 0.5 --pcie-frac 0, "parallel": 4 with --batch-mtp (the measured requests ran alone, on the solo path).
  • Expert cache 5,552 + 5,299 slots: about 45 % / 43 % of each card's 12,288 layer-expert pairs (23 % of the model's 24,576 by the count slots / (layers x experts)).

Reproduce

The same engine started twice per arm; each start: a 128-token warm-up, then four prompts (Chinese prose, Chinese chat, English technical, code) x 2 reps, greedy, thinking off, 1,024 output tokens; the median per prompt. Arm B adds only --adapt-every 2 --adapt-swaps 192 --adapt-decay 0.92.

Results (decode tok/s, run 1 / run 2)

zh prose zh chat EN technical code
A: defaults (4 / 96 / x0.7) 113.1 / 113.8 122.9 / 119.7 118.9 / 115.6 163.9 / 164.6
B: 2 / 192 / x0.92 115.0 / 113.3 124.5 / 119.7 121.5 / 117.2 181.8 / 180.9
  • Decode hit rate on the code prompt (per-request decode expert cache hit rate line): A 83.8 / 84.7 / 84.0 / 84.9 %, B 92.4 / 92.3 / 92.2 / 92.4 %.
  • STRATA_DECODE_TIMING=1, code prompt: CPU-computed experts per layer-window 5.19 (A) vs 2.58 (B), 22.0 vs 19.8 ms a window.
  • Prompt reading (19K-123K) and four concurrent streams (147 vs 149 tok/s) were unchanged within 1-2 %.

Note

The sergqwer/strata-nvfp4 fork applies 2 / 192 / x0.92 by default when the cache holds 20-60 % of the experts (its generate.cpp, after the expert cache is sized; its comment cites an RTX 5090 with an NVFP4 pack holding 34 %: 19.9 -> 17.8 ms a round). The B arm above is that rule applied by hand. Would a coverage-based default like that be acceptable, or should it stay a documented flag combination?

Reproduction status: reproduced locally (two engine starts per arm within 25 minutes, in the order A A B B, not interleaved).

Originally created by @orochifj on GitHub (Nov 1, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/4870 ### Problem On a 2-GPU layer split whose expert cache holds about half of each card's experts, the adaptive tier's defaults (every 4 rounds, 96 swaps, decay x0.7) leave single-stream decode about 10 % slower on code than `--adapt-every 2 --adapt-swaps 192 --adapt-decay 0.92`. The decode hit rate on the code prompt is 84-85 % with the defaults and 92 % with the faster settings. ### Environment - Strata v0.2.9 (`c62d5e3a`, engine 0.1.55) built from source for sm_86, **with local changes**: a data-parallel prompt path, an int8 IQ4 expert prompt kernel and a cap on the batch slots' context. The adaptive tier and the decode path are upstream's. Not repeated on the unmodified build. - Linux 6.8, NVIDIA 610.57.04, 2x RTX 3090 24 GB at 250 W, layer split 23 / 25. - Swift-1.5 Qwen3.8-Flash-Next IQ4_XS, `--max-context 524288 --rope-scaling yarn --rope-scale 2 --kv int8 --kv-resident 32768 --spec 4 --spec-min-p 0.5 --pcie-frac 0`, `"parallel": 4` with `--batch-mtp` (the measured requests ran alone, on the solo path). - Expert cache 5,552 + 5,299 slots: about 45 % / 43 % of each card's 12,288 layer-expert pairs (23 % of the model's 24,576 by the count `slots / (layers x experts)`). ### Reproduce The same engine started twice per arm; each start: a 128-token warm-up, then four prompts (Chinese prose, Chinese chat, English technical, code) x 2 reps, greedy, thinking off, 1,024 output tokens; the median per prompt. Arm B adds only `--adapt-every 2 --adapt-swaps 192 --adapt-decay 0.92`. ### Results (decode tok/s, run 1 / run 2) | | zh prose | zh chat | EN technical | code | |---|---|---|---|---| | A: defaults (4 / 96 / x0.7) | 113.1 / 113.8 | 122.9 / 119.7 | 118.9 / 115.6 | 163.9 / 164.6 | | B: 2 / 192 / x0.92 | 115.0 / 113.3 | 124.5 / 119.7 | 121.5 / 117.2 | 181.8 / 180.9 | - Decode hit rate on the code prompt (per-request `decode expert cache hit rate` line): A 83.8 / 84.7 / 84.0 / 84.9 %, B 92.4 / 92.3 / 92.2 / 92.4 %. - `STRATA_DECODE_TIMING=1`, code prompt: CPU-computed experts per layer-window 5.19 (A) vs 2.58 (B), 22.0 vs 19.8 ms a window. - Prompt reading (19K-123K) and four concurrent streams (147 vs 149 tok/s) were unchanged within 1-2 %. ### Note The sergqwer/strata-nvfp4 fork applies 2 / 192 / x0.92 by default when the cache holds 20-60 % of the experts (its `generate.cpp`, after the expert cache is sized; its comment cites an RTX 5090 with an NVFP4 pack holding 34 %: 19.9 -> 17.8 ms a round). The B arm above is that rule applied by hand. Would a coverage-based default like that be acceptable, or should it stay a documented flag combination? **Reproduction status:** reproduced locally (two engine starts per arm within 25 minutes, in the order A A B B, not interleaved).
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#2236
No description provided.