mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #5199] [Engine] 0.1.56's default --prefill-chunk (16384) lends ~3.5 GB from the expert slots on a 16 GB card: 572 -> 258 slots, decode -12-18% #3096
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#3096
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 @MingShi350 on GitHub (Nov 4, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/5199
Area
[Engine] — speed, kernels, the server
Desktop app, Terminal or source?
Source (a source tree, started with
serve/server.py --engine strata --config <run config>.json). The run config was written by hand, so it holds only the engine arguments listed below.What happened
Engine 0.1.56 defaults the prompt chunk to 16384 tokens (
ds4: ... prompts in chunks of 16384). On a 16 GB card the prompt path lends VRAM out of the expert slots, so the number of experts that stay on the card falls from 572 (0.1.55) to 258 (0.1.56) and decode drops 12–18%, while prompt reading does not gain enough to make up for it.Setting
--prefill-chunk 8192on 0.1.56 restores 707 expert slots and makes the 16K prompt read 5% faster than 0.1.55. Nothing else has to change.The same binary shows the effect is the chunk value, not new code: 0.1.55 with
--prefill-chunk 16384given by hand also falls to 240 slots.Smallest steps or command that reproduce it
Four arms on one machine, same model, same pack, same run config; only the engine binary or
--prefill-chunkchanges. Each arm: load, one 400-token warm-up, then 3× 4K prompt, 3× 16K prompt, 3× short answer (200 tokens), 2× 700-token answer.Common arguments:
Control (the point that the chunk alone explains it):
Log lines, quoted:
Note the free figure: 0.1.56's default leaves 947 MiB unused instead of filling it with expert slots, i.e. the room is taken by the prompt path's loan, not by a real allocation of the expert cache.
Reproduction status
Reproduced locally (twice; the ordering of arms 1 and 2 was swapped on the second run and the result followed the engine/chunk, not the order).
Strata version
Strata 0.2.10 · Control 0.1.56 · engines
strata-dsv410.1.55 (f-028-rel, commit8c1aea4bca1b) and 0.1.56 (f-0291-rc1, commit06698c674673), botharchs [86, 89, 120], CUDA 13.0.Graphics card, memory and system
RTX 4080 16 GB (sm_89) · 64 GB DDR5-6000 (2×32, dual channel) · Windows 11 · NVIDIA driver 621.01 · model on a WD_BLACK SN770 NVMe.
Model, size and settings
DeepSeek-V4.1-Flash-1017 uncensored GSQ-RCO IQ2_XS 2.25 bpw with the shared 110.6 GB IQ4_NL Engram table, 7 files, 48,786 tensors, vision tower and DSpark drafter in the pack. 262,144 context, pictures on,
--experts 5,--cpu-threads 16, RAM store 48 GB,DS4_FAT_ROWS=16,DS4_NO_VIEW=0.What I think the path is (source reading, not measured)
ds4_model.cusays the prompt path lends VRAM from a device's layers and keeps its lasttail_kslots in one buffer (Chunk::borrow), and the chunk rule is picked before the expert slots are placed (min_slots - k). With 16384 the loan is large enough to displace ~314 expert slots of 11.4 MB (about 3.5 GB) on a 16 GB card. The measurement above is of the slot count and the speeds; the borrow itself I read in the source, and I did not trace the allocation.Why this reaches users
tools/dsv41/tune.pytries only the drafter and the CPU threads (its docstring says the RAM store sizes itself and is left alone); it never tests--prefill-chunkand never reports the expert slot count. A normal install therefore keeps 16384 and the slower decode, and the tuning run reports no change.Suggestion
Scale the default prompt chunk by the card's VRAM, or cap it at 8192 below about 24 GB. On this card 8192 gives the best of both: 707 slots, 805 tok/s on a 16K prompt (against 786 at 16384 and 767 on 0.1.55) and the decode of 0.1.55.
Workaround
strata launch ... --set-style config or the run config'sargs: add--prefill-chunk 8192. On 0.1.56 this is strictly better than the default here.Related