Archived
scheduler: --prefill-interleave defaults to auto:1 where nothing pins the schedule
Cause: with --prefill-interleave 0 every step carries a chunk while a prompt prefills, so a sequence already decoding gets one token group per chunk step. On Qwen3.8-Flash-Next fp8 (TP2, MTP 3 drafts) with 8 sessions decoding while 64K-token prompts prefill, that is 12.3 tokens/s a session against ~83 alone; with 4 such prompts at once, 5.4. Change: not given, engine bring-up now serves --prefill-interleave auto:1: after a prefill chunk that ran beside decoding sequences, decode-only steps follow for as long as the chunk step took. --deterministic keeps 0 (a schedule that follows timing is not reproducible), as do KL mode and generators (nothing decodes beside a prefill there); an explicit --prefill-interleave N|auto[:SHARE] wins. Startup names the decision with its reason. The Config default stays 0, so a Scheduler built directly (tests) keeps today's schedule; Config::prefill_interleave_set records the flag. Evidence (decode tokens/s a decoding session / aggregate prefill tokens/s / TTFT), 8 sessions decoding beside 64K prompts: --prefill-interleave 0 12.3 / 3,664 / 17.3 s auto (0.25) 23 / 3,181 / 20 s auto:1 40.9 / 1,823 / 35.5 s auto:2 50 / 1,166 / 56 s with 4 concurrent 64K prefills: 0 5.4 / 2,934 / 64 s; auto 14.8 / 2,545 / 74 s; auto:1 33 / 1,395 / 137 s. auto:1 roughly triples a decoding session's rate for twice the prompt's time to first token. BetterBench quick (short prompts, concurrency 1/2/4/8) shows no reliable difference between 0 and auto: a short prompt is one chunk, after which nothing is held. config_test: the flag records that it was given.
This commit is contained in:
1 parent
6e134fc15f
commit
a58304632a
5 files changed
+42
-8
No files matched your search
@@ -1350,6 +1350,27 @@ int Engine::declare() {
|
||||
: "the model carries no vision tower");
|
||||
}
|
||||
|
||||
/* --prefill-interleave not given: auto:1, decode-only steps for as long as a chunk step took,
|
||||
* so decoders keep about half their rate while prompts prefill (measured on Flash-Next: 8
|
||||
* decoders beside a 64K prefill, 12 -> 41 tokens/s each). Not where the schedule must not
|
||||
* follow timing (--deterministic) or nothing decodes beside a prefill (a generator's passes,
|
||||
* KL mode's scoring); an explicit N or auto[:SHARE] is kept as given. */
|
||||
if (!cfg_.prefill_interleave_set) {
|
||||
RadArchProbe pb{};
|
||||
(void)rad_tools_probe(plugins_, meta_, &pb, cfg_.image_gen_max_pixels, cfg_.image_gen_max_refs);
|
||||
const char* none = pb.gen_rows > 0 ? "a generator: its passes carry no decode rows"
|
||||
: cfg_.kld() ? "KL mode scores documents and decodes nothing" : nullptr;
|
||||
if (none || cfg_.deterministic) {
|
||||
decide("--prefill-interleave", "0", none ? none : "--deterministic keeps a "
|
||||
"timing-independent schedule (--prefill-interleave N or auto overrides it)");
|
||||
} else {
|
||||
cfg_.prefill_interleave = -1;
|
||||
cfg_.prefill_interleave_share = 1.0;
|
||||
decide("--prefill-interleave", "auto:1", "decode-only steps for as long as a chunk "
|
||||
"step took while prompts prefill beside decoding sequences");
|
||||
}
|
||||
}
|
||||
|
||||
/* Control vectors are resolved before any rank declares, because the plugin reads the
|
||||
* direction table from RadBuildCtx. Only `--control-vector off|on` loads one; without it
|
||||
* nothing is looked for and the graph declares no projection op. With it, a plugin that does
|
||||
|
||||
Reference in new issue
Block a user