mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #4930] [Engine] KVA with batch slots: interleaved piecewise reads with a global frontier #2267
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#2267
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @bayerhazard on GitHub (Nov 1, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/4930
Short
This is the interleaved form of KVA for batch slots: a cold long prompt stays piecewise, KVA gets a global frontier, and the other slot keeps decoding. On our 24 GB RTX 5090 Laptop, a 100K request goes from 43.6 s to 38.2 s while a concurrent 25K request stays at 16.6 s instead of 37.1 s (whole-prompt variant) or 18.35 s (KVA off).
Our system
parallel: 2,--prefill auto:32768, KVA split 36 / suffix 2048, MTP--spec 6, engine 0.1.55 (Strata 0.2.9).The solution
Follow-up to #4927. Instead of reading the whole cold prompt in one run:
set_kva_total(n)toPrefilland store the full cold-part length;cold_readinKvaConfig::decline);kva_frontier = total - suffix);batch_read_piece/read_windowsas usual, so KVA approximates the prefix pieces and the slots decode between pieces; the last 2K stay exact;kva_floor_across the pieces of one cold part (reset only atpos0 == 0).Branch: https://git.aimighty.olares.de/aimighty/strata/src/branch/kva-interleave-029
Diff: 4 files, 12 insertions, 7 deletions (
kva.hpp,prefill.hpp,prefill.cpp,generate.cpp).What it brings
tools/batch_test.py, 40K, greedy,--adapt-every 1000000 --pcie-frac 0: KVAapproximated 32768 of 32768for the first batch piece and0 of 6146for the exact remainder; long slot identical to solo. The short slot differs at token 46 in both KVA on and KVA off on this engine (existing batch/cache behavior, not KVA).Limits
Request
Please consider this as the preferred form of KVA+batch for
parallelslots. It supersedes the whole-prompt read in #4927 for multi-request serving. I can open a PR and run the required builds/tests.