[Engine] explicit --layer-split reloads CUDA0 dense weights a second time at startup (0 MiB freed)
I maintainer di solito rispondono entro 5 giorni
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 82/100
Direzione di ricerca
Leggi la logica di trim in src/program/generate.cpp intorno alle righe 6554–6557 e il blocco di trim successivo intorno alla riga 7168; confronta questi percorsi con la gestione precedente di stage_trim intorno alle righe 5580 e 5607–5612. Riproduci il problema con il comando fornito --layer-split 18,33 --trim-stage-weights e verifica che la scansione ridondante e il ricaricamento vengano saltati quando stage_trim è già attivo. Il lavoro è completato quando all’avvio le matrici di proiezione native vengono caricate una sola volta e per questo trim non viene più segnalato 0 MiB freed.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Area
[Engine] (speed, kernels, models, the server and API)
Desktop app, Terminal or source?
Source (START-HERE.bat, setup.sh or a build)
What happened
On an explicit --layer-split (for example --layer-split 18,33 --trim-stage-weights, or when the early spill walk converts auto into an explicit split), stage_trim (src/program/generate.cpp:5580) already trims CUDA0 before its initial wt.load and native_dense.load (src/program/generate.cpp:5607-5612):
strata generate: layer split: CUDA0 loads the dense weights of layers 0-17 only
strata generate: 95 MiB of weights loaded from .../packs/unsloth_iq3_xxs in 0.2 s (855 canonical tensors skipped: served natively)
strata: STRATA_HC_Q8=1: 0.24 GiB of Q8_0 hyper-connection projections for the verify read
strata generate: 191 native projection matrices, 1146.24 MiB of weights, in 5.1 s
However, const bool trim = o.trim_stage_weights && multi_gpu && !stages.empty(); at src/program/generate.cpp:6554 (added for --layer-split auto post-search trimming) does not check !stage_trim. As a result, on an explicit split:
if (trim)atsrc/program/generate.cpp:6557scansindex.txtand runsWeightTable::pool_bytes48 times over the already-trimmedskipset.if (trim)atsrc/program/generate.cpp:7168freesCUDA0's already-trimmed weight arena andNativeDenseprojections, re-allocates the same size, and reloads all 191 native projection matrices (1,146.24 MiB) from the GGUF shards a second time, adding ~5-7 seconds to startup and logging0 MiB freed:
strata: STRATA_HC_Q8=1: 0.24 GiB of Q8_0 hyper-connection projections for the verify read
strata generate: 191 native projection matrices, 1146.24 MiB of weights, in 5.0 s
strata generate: layer split: CUDA0 keeps only its own layers' dense weights (0.43 GiB in all): CUDA0 0-17 (0 MiB freed) (the later cards trim in late_weights)
Expected behavior: when stage_trim is already true (const bool trim = o.trim_stage_weights && multi_gpu && !stages.empty() && !stage_trim;), skip the redundant post-search trim_prefix scan and CUDA0 reload.
Smallest steps or command that reproduce it
./build/strata --serve \
--pack /path/to/packs/unsloth_iq3_xxs \
--native /path/to/Qwen3.8-Flash-Next-UD-IQ3_XXS-00001-of-00004.gguf \
--ple-gguf /path/to/Qwen3.8-Flash-Next-UD-IQ3_XXS-00004-of-00004.gguf \
--layer-split 18,33 --trim-stage-weights
Reproduction status
Reproduced locally
Strata version
Strata 0.2.15 · engine 0.1.61 (commit c77572806)
Graphics card, memory and system
RTX 5060 Ti 16 GB + RTX 2080 Ti 11 GB + RTX 3080 Ti 12 GB · 2x Xeon E5-2683 v4 · 188 GiB DDR4 RAM · Ubuntu Linux 7.3.4
Model, size and settings
Qwen3.8-Flash-Next UD-IQ3_XXS · 512K context (--kv k8v4) · --layer-split 18,33 --trim-stage-weights
Logs
strata generate: layer split: CUDA0 loads the dense weights of layers 0-17 only
strata generate: 95 MiB of weights loaded from .../packs/unsloth_iq3_xxs in 0.2 s (855 canonical tensors skipped: served natively)
strata: STRATA_HC_Q8=1: 0.24 GiB of Q8_0 hyper-connection projections for the verify read
strata generate: 191 native projection matrices, 1146.24 MiB of weights, in 5.1 s
...
strata: STRATA_HC_Q8=1: 0.24 GiB of Q8_0 hyper-connection projections for the verify read
strata generate: 191 native projection matrices, 1146.24 MiB of weights, in 5.0 s
strata generate: layer split: CUDA0 keeps only its own layers' dense weights (0.43 GiB in all): CUDA0 0-17 (0 MiB freed) (the later cards trim in late_weights)
- Lingua principale
- C++
- Stelle
- 11.6k
- Fork
- 1k
- Merge medio
- 18g 13h
- PR unite (30g)
- 4
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di Niko1221/Strata
-
needs-format
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
Niko1221/Strata#6251 · 1 commento ·
I maintainer di solito rispondono entro 5 giorni
-
[TUI] A leftover run config marks a model installed: the list checks the file name, not the filesAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 83/100
I maintainer di solito rispondono entro 5 giorni
-
needs-format
Difficoltà 2/5 1-3 ore Idoneità per principianti 73/100
Niko1221/Strata#6229 · 1 commento ·
I maintainer di solito rispondono entro 5 giorni
-
[Engine] qsa_rows_bench: --ctx below 32768 makes the dense step read outside the page table (Xid 31)Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
I maintainer di solito rispondono entro 5 giorni
-
[Other] Terminal: shell tab completion for the strata commandForse già presa Una pull request collegata a questa issue è aperta o già unita. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
Niko1221/Strata#6086 · 2 commenti ·
I maintainer di solito rispondono entro 5 giorni
Tutte le issue di Niko1221/Strata
Issue simili
-
[Bug]: NP 管理器文件编辑器里删除键无效Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
metasequoiaime/msime#11666 ·
I maintainer di solito rispondono entro 1 giorno
-
DAE2 crashes on call.without.effects with a non ref.func expressionForse già presa @stevenfontanella l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
WebAssembly/binaryen#9404 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 65/100
CodeZombie/goodluckOS#178 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
CVO-Org/immersive-cigs-rewrite#313 ·
I maintainer di solito rispondono entro 1 giorno
-
windows-latest (20261116.315.1) ships with incompatible MSVC (18.12) and pinned LLVM/Clang (20)Apertabug report
Difficoltà 2/5 1-3 ore Idoneità per principianti 73/100
actions/runner-images#15367 · 4 commenti ·
I maintainer di solito rispondono entro 2 giorni