Archived
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:
1 parent
5a8c5533d1
commit
c00b882b96
7 files changed
+43
-12
No files matched your search
+10
-1
@@ -3283,7 +3283,16 @@ TEST(interleave_auto_fits_decode_steps_in_a_quarter_of_a_chunk_step) {
|
||||
CHECK_EQ(steps(0.4, 0.03), 3); /* 0.1 s of 0.03 s steps */
|
||||
CHECK_EQ(steps(0.4, 0.05), 2);
|
||||
CHECK_EQ(steps(0.4, 0.2), 0); /* a decode step dearer than the quarter */
|
||||
CHECK_EQ(steps(1.0, 0.001), 16);
|
||||
CHECK_EQ(steps(1.0, 0.001), 64); /* capped at kInterleaveAutoMax */
|
||||
/* auto:SHARE: SHARE of the chunk step's time instead of a quarter. */
|
||||
Fixture k;
|
||||
k.build();
|
||||
k.cfg.prefill_interleave = -1;
|
||||
k.cfg.prefill_interleave_share = 1.0;
|
||||
CHECK_OK(k.start());
|
||||
k.sch.note_step_cost(true, 0.4);
|
||||
k.sch.note_step_cost(false, 0.04);
|
||||
CHECK_EQ(k.sch.interleave_steps(), 10); /* 0.4 s of 0.04 s steps */
|
||||
/* A number is used as given, whatever was measured. */
|
||||
Fixture g;
|
||||
g.build();
|
||||
|
||||
Reference in new issue
Block a user