scheduler: --prefill-interleave auto:SHARE sets the decode-only share of a chunk step's time

auto gave decode-only steps a fixed quarter of a chunk step's time. On the device (8 decoding
sessions beside 64K prefills, MTP on) that left decode at 23 tokens/s a session against 83 alone,
with 0.45 s gaps: two or three decode steps of ~40 ms per 0.45 s chunk. auto:SHARE makes the share a
choice (0 < SHARE <= 4); auto stays 0.25. The cap on decode-only steps rises from 16 to 64 so a
larger share is not cut off. config_test parses it, sched_test checks auto:1.
This commit is contained in:
Code000 committed 2026-11-05 20:20:13 +01:00
1 parent 5a8c5533d1
commit c00b882b96
7 files changed
+43 -12

No files matched your search

+1 -2
View File
@@ -783,9 +783,8 @@ private:
/* --prefill-interleave auto: the decode-only steps after a chunk (interleave_steps), sized by
* the running means of a step that carried a chunk and of a decode step, in seconds, fed by
* step_finished. */
static constexpr double kInterleaveShare = 0.25;
static constexpr double kInterleaveEma = 0.25;
static constexpr int64_t kInterleaveAutoMax = 16;
static constexpr int64_t kInterleaveAutoMax = 64;
double ema_chunk_s_ = 0.0, ema_decode_s_ = 0.0;
void step_cost_locked(bool chunk, double seconds);
/* The throughput window (step_finished): each kind's tokens and the wall time the steps