Files
Strata/engine/include
Niko1221 751d55647f fix(inkling cuda): the auto prefill chunk leaves room for the K/V that still has to grow (regression fix for faceebb50)
faceebb50 chose the chunk from the memory left after the experts only. On a 24 GB card with UD-Q4_K_XL at 32K the 1024 chunk took the room the
global K/V needs to grow, so the K/V tail went to host RAM and decode at 30K tokens fell with 2 slots from 80.9 to 36.0 tok/s (3 slots 14.7).

The chunk now also has to leave slots x (context - the window allocated at start) x bytes per position free (none when K/V offload is on).
RTX 4090, UD-Q4_K_XL, 32K, decode tok/s at 30K tokens, 1 / 2 / 3 slots:
  faceebb50          87.7 / 36.0 / 14.7
  this change        86.6 / 79.8 / 24.0
  STRATA_INK_CHUNK_AUTO=0 (chunk 512, the old default) 87.7 / 80.9 / 25.4
3 slots spill by the engine's own auto host-offload decision, not by the chunk (the same with the old default).
ink_chunk_test covers the three cases.
2026-11-23 22:52:54 +01:00
..