mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #5496] [Engine] split engine 0.2.11: the prompt-path auto pick counts the arena's unallocated expert slots as free VRAM, so 3x RTX 3090 24 GB fails to start ("VRAM short" -> "pool 3 has 271 slots, a window needs 320") #5465
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#5465
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 @chaerle on GitHub (Nov 7, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/5496
Area
[Engine]
Desktop app, Terminal or source?
Source (own build of v0.2.11)
What happened
On v0.2.11 the all-cards split engine (
strata-split-3) no longer starts on 3x RTX 3090 24 GB with the Qwen3.8-Flash-Next GSQ-RCO IQ3_S set. The same configuration started and ran a full test suite on v0.2.10 (ffa80d73) the day before.The engine reports "VRAM short by ~1.8 GiB", moves ~3,100 more experts to RAM, and then stops in
place_experts():No other process was on GPU 0-2 (
nvidia-smi: 56 / 3 / 3 MiB used before the start). A fourth RTX 3090 (GPU 3) drives the desktop and is not one of the engine's cards.Cause (from reading the source, confirmed by the runs below)
New in 0.2.11,
Engine::Engine(src/split/src/engine.cu, around line 84) picks the prompt path's rows and chunks per pass (8192 x 4 = 4148 MiB down to 4096 x 2 = 1112 MiB) fromcudaMemGetInfoon each card. WithFNX_ARENA(the default) the largest expert pool's slots are not allocated at that point:Model::expert_cacheleaves them toEngine::arena_fill(model.cpp around line 319). On this box that pool is 9,860 slots x 0.56-0.66 MiB, about 5.4-6.3 GiB per card, so the pick sees that much more free VRAM than there will be and takes 8192 x 4 (no "prompt path:" line is printed, which means the pick was 8192 x 4). The arena sizing further down then comes up ~1.8 GiB short, the "VRAM short" loop moves experts to RAM, and the smallest pool (pool 3) drops below 2MAXTTOPK = 320 slots.On 48/96 GB cards the extra 3 GiB of prompt buffers fit, which is probably why the tested setups (2x RTX A6000, 2x RTX PRO 6000) do not show it. On 2x RTX 4060 Ti 16 GB (#5187) the pick falls to 4096 x 2 anyway because even the overestimated free VRAM is small.
Results (same machine, same config, one start each; logs below)
FNX_PF_ROWS=4096 FNX_PF_PASS=4ffa80d73)tools/strata_bench.py --runs 3 --longon T2 and T3 (medians):So 4096 x 4 also fits here and reads 16K/32K prompts ~2-3 % faster; the patched pick is conservative (the 2000 MiB margin) but starts by itself.
Proposed fix (7 lines, src/split/src/engine.cu; tested as T3 on this machine only, CUDA build only, HIP not built)
Not covered by the patch: the two prompt stages (
2 * pf_stage_bytes, 2 x 384 MiB here) are also not in the pick; they fit insidePF_MARGIN_MIBon this box. I did not run the HIP build or other card sizes.Workaround on 0.2.11 without a rebuild:
"env": {"FNX_PF_ROWS": "4096", "FNX_PF_PASS": "4"}in the run config.With this workaround the engine also starts with
--batch 3,5and8on the same cards (free VRAM on GPU 0 after load 276 / 254 / 252 MiB, no further experts moved to RAM); a full test pass with--batch 5ran without errors.Smallest steps or command that reproduce it
-DSTRATA_BUILD_SPLIT=ON -DSTRATA_SPLIT_CARDS="2;3" -DSTRATA_SPLIT_ARCH=86.LimitMEMLOCK=infinity) with the IQ3_S set, context 65536,--spec 6 --lookup 15 --batch 1 --vision, noFNX_*variables exceptSTRATA_NO_ARENA_THP=1:Reproduction status
Reproduced locally
Strata version
Strata v0.2.11 (
c3b3f503), engine 0.1.57, source build (CUDA 13.2, sm_86,-DSTRATA_NATIVE_EXPERTS=ON), HOSTRING (no peer access)Graphics card, memory and system
Model, size and settings
mtp/rt, mmproj BF16--spec 6 --lookup 15, conversation cache 4096 MiB, defaults otherwise (arena on, coldest 3 GiB of experts in RAM)Logs
Local directories are replaced by placeholders (
<strata>= the Strata checkout,<data>= the model data directory,<report>= the output folder).engine-log-T1-stock.txt (v0.2.11 as released: fails)
engine-log-T2-workaround.txt (FNX_PF_ROWS=4096 FNX_PF_PASS=4: loads)
engine-log-T3-patched.txt (patch below, no FNX_PF_*: loads)
run_tests.sh (the test script; local directories replaced by placeholders)
Related: #5187 and #5258 (per-pool floor; same pool-3 error, different trigger: 16 GB cards with most experts in RAM), #5440 (staging threshold).
A community benchmark of the same setup (split engine on 3x RTX 3090,
--batch 1/3/5/8, full test pass) follows as a results-only PR.@chaerle commented on GitHub (Nov 7, 2026):
Retested on v0.2.12 (engine 0.1.58), same hardware and model,
--batch 5, 64K context, noFNX_PF_*set.20885f7a/a7cc8faa(per-pool window floor, ported from #5158) fix the crash: the engine now starts. The cause described above is still there, though. The prompt-path pick still counts the arena pool's not-yet-allocated slots as free, picks 8192 x 4, and the shortfall now pushes extra experts to RAM instead of failing:Measured with the same requests (streamed, single client):
FNX_PF_*FNX_PF_ROWS=4096 FNX_PF_PASS=4FNX_PF_*So short prompts, which is most agent turns, wait about 5x longer. The 7-line patch attached to this issue (subtract the arena pool's slots from the free VRAM before the pick) applies unchanged to v0.2.12 and is complementary to the residency floor. Rebuilt with it, the engine picks the prompt path on its own (
fnx: prompt path: 4096 rows, 2 chunks a pass (the cards hold 3904 MiB free after the weights, the K/V pool 796 MiB)), nothing goes short, and it keeps 3.0 GiB of experts in RAM. Its pick is one step more cautious than the hand-set 4096 x 4 (long prompts read ~10% slower), which seems the right side to err on.