STRATA_BATCH_DF2=1 with pipelined batch groups: the slot drafters bind, cost nothing at one request, and the engine dies on the first two that overlap
I maintainer di solito rispondono entro 4 giorni
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 42/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- cpp
- Ambito
- backend, performance
Direzione di ricerca
Start in program/generate.cpp around the batch_df2_wanted guard at lines 7765–7768 and the pipelined batch refusal near 7788. Trace how batch_groups_for(false) determines the group mode, then inspect the batch window capture and set_batch_taps paths around lines 13300 and 13413. Reproduce with the provided two concurrent request setup; done means pipelined groups no longer crash and the c=2 requests return 200.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
STRATA_BATCH_DF2=1 with pipelined groups: the drafters bind, cost nothing alone, and the engine dies on the first two requests that overlap
Summary. On a layer split whose batch slots run as pipelined groups (the 0.2.7 NVIDIA default),
forcing the slots' DFlash2 drafters on with STRATA_BATCH_DF2=1 gets them allocated and bound - and
the first time two requests are in flight the engine process is gone. It is not a slow path or a
refusal: the serve layer answers 503 the engine stopped unexpectedly (process exited), and the next
request starts a fresh engine. Single-stream it is completely free, which is what makes it easy to
ship by accident.
Where the guard is. program/generate.cpp:
const bool batch_df2_wanted = [&] {
const char* e = std::getenv("STRATA_BATCH_DF2");
const bool off = e != nullptr && e[0] == '0';
const bool forced = e != nullptr && e[0] != '0' && e[0] != '\0';
...
if (off || !(o.draft == "dflash2" && !o.draft_auto && o.batch >= 2 && o.serve && !split_same)) return false;
if (forced) return true; // <-- 7765: returns before any group check
return stages.empty() || batch_groups_for(false).groups <= 1; // <-- 7768: what the comment describes
}();
The comment above it says the pipelined groups keep their undrafted slots, and 7768 is the code
that implements that - but forced short-circuits ahead of it, so an explicit STRATA_BATCH_DF2=1
asks the pipelined window loop for slot drafts it was never written to carry. The --batch-mtp
refusal at 7788 (a layer split with --batch pipelines the slots in groups by default and the pipelined groups run no slot drafts) does not fire either, because its condition is
groups > 1 && !mtp_piped and STRATA_PIPED_MTP=1 sets mtp_piped. So nothing objects:
strata generate: STRATA_BATCH_DF2: 2 slot drafters on CUDA1 (... MiB of private K/V ring and buffers each, ...)
strata serve: STRATA_BATCH_DF2: 2 slot drafters ready (batch windows carry each slot's token and its spare-row drafts)
and the expert cache is unaffected (4954 CUDA0 / 5123 CUDA1 slots, the same as without them).
Environment. Engine 0.1.66, tree HEAD-6c6c22d8 built for sm_86, Linux, 2x RTX 3090 24 GB, layer
split 24/48, Swift-1.5 Qwen3.8-Flash-Next Unsloth UD-Q4_K_XL, --serve, --max-context 524288,
--kv int8, --mtp .../mtp/rt, --draft dflash2 (tuned pack), --spec 6, batch 2 slots with
--batch-groups at its default (the boot reports --batch-groups auto: 2 groups of 1 slot), env
STRATA_BATCH_MTP=1 STRATA_PIPED_MTP=1. The only difference from the shape we run day to day is the
added STRATA_BATCH_DF2=1.
Reproduction. Boot with the above, then hit /v1/chat/completions (max_tokens 48, not
streaming): one request alone, then two simultaneously, then four, then one again.
| leg | STRATA_BATCH_DF2=1 |
same boot minus that one env var |
|---|---|---|
| 1 request | 200 in 1.14 s |
200 in 1.17 s |
| 2 concurrent | 503 in 2.33 s - {"error": {"type": "server_error", "message": "the engine stopped unexpectedly (process exited; status unavailable): ..."}} |
200, 200 (1.26 s, 1.24 s) |
| 4 concurrent | 503 in 49.93 s |
200 x4 (0.92-2.35 s) |
| 1 request again | 200 in 48.64 s (after the restart) |
200 in 0.76 s |
Observed on 3 of 3 boots with the force on (twice through a concurrency rig at c=2, once through the
probe above), and the control column is the same window, immediately after, so it is not a level
shift or the harness.
The line before the death. Every fatal leg has the same last two lines, and they look wrong on
their own:
strata serve: KV streaming: 98.47% of 10956 block reads hit VRAM, 0.7 MiB read from RAM
strata verify: captured the batch window over slots 0,0
strata verify: captured the batch window over slots 0,0
captured the batch window over slots 0,0 - one window whose slot list holds the same slot twice,
where the normal shape is a window per slot (over slots 0 and over slots 1 in the same boot). In
our retained engine log that string appears 180 times, all of them inside the forced boots; a control
boot on the shipped shape prints captured the batch window 4 times and slots 0,0 zero times. The
process then exits without printing anything else: no assertion text, no CUDA error, nothing in the
kernel journal, and no systemd exit record (the engine is a child of the serve wrapper, so the wrapper
can only say status unavailable).
What we would want from upstream. Either reading is defensible and both beat the present
behaviour:
- make 7765 honour the group mode the comment describes (
forcedstill cannot beat
batch_groups_for(false).groups > 1, with the existing 7800WARNING: ... is off:line saying so), or - make the pipelined window actually carry the taps (
set_batch_taps, 13300 / 13413) over one slot
per group, since the row budget is the same shape the MTP proposals already use with
STRATA_PIPED_MTP=1.
2 is the one worth having: on this box the pipelined groups run DFlash2's slots without drafts,
which is worth 26 % of aggregate throughput at 2 concurrent requests - c=2 131 tok/s undrafted vs
165 tok/s with MTP drafting the same groups, with single-stream code decode 137 vs 121 in the other
direction. A drafted pipelined DFlash2 window would be the best of both, so this is not just a crash
report.
Not attempted. We did not bisect or patch it; the forced shape is not in use here and we have
ruled it out of our serving config until it is fixed. Happy to re-run either fix on this box - the
probe above is the whole test, and the gate is simply "does c=2 return 200".
- Lingua principale
- C++
- Stelle
- 11.6k
- Fork
- 1k
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
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
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
Niko1221/Strata#7365 · 2 commenti ·
I maintainer di solito rispondono entro 4 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 4 giorni
-
[GUI] Engine chip: move the breathing status dot to the right end of the quant line, inside the chipAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
I maintainer di solito rispondono entro 4 giorni
-
[GUI] The top horizontal stroke of 更 in the sidebar footer is never drawn (Windows, 125% scaling)Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
Niko1221/Strata#7276 · 1 commento ·
I maintainer di solito rispondono entro 4 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
Niko1221/Strata#7230 · 1 commento ·
I maintainer di solito rispondono entro 4 giorni
Tutte le issue di Niko1221/Strata
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
I maintainer di solito rispondono entro 1 giorno
-
`test_controlled_TermSequenceBox_logging` and `test_symbolic_ops` fail when another test runs firstAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
Quantinuum/tket#2282 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 84/100
KhronosGroup/Vulkan-Tutorial#555 ·
I maintainer di solito rispondono entro 10 giorni
-
Server crashes when a mob dies to poisonForse già presa @joelstiller l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
DarkCastleMUD/DarkCastle#305 ·
I maintainer di solito rispondono entro 1 giorno
-
[Issue]: RAS status report lists the wrong pids for an outlier nodeForse già presa @bhargavchintam l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
I maintainer di solito rispondono entro 2 giorni