mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #2569] [CLOSED] batch: a slot that gives its whole conversation back to the main session hands over its checkpoints too #4134
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#4134
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?
📋 Pull Request Information
Original PR: https://github.com/Niko1221/Strata/pull/2569
Author: @andyhrc
Created: 10/15/2026
Status: ❌ Closed
Base:
main← Head:pr/slot-checkpoint📝 Commits (1)
a4186b3batch: a slot that gives its whole conversation back to the main session hands over its checkpoints too📊 Changes
2 files changed (+22 additions, -0 deletions)
View changed files
📝
src/program/generate.cpp(+11 -0)📝
sycl/src/program/generate.cpp(+11 -0)📄 Description
Title
Issue: none open that I found.
Summary
With
--batch, a request's conversation moves between a batch slot and the solo path (the main session): arequest left alone in its slot goes back to the solo path, and goes back into a slot when another request arrives.
When a slot gives its whole conversation back to the main session, the main session's checkpoints are cleared
and only the slot's tokens come over - the slot's own checkpoints (the turn boundary saved when the request was
admitted) stay behind. When the conversation then goes back into a slot or is parked, there is no checkpoint left
to copy. A next turn that continues the prompt but not the whole reply - a client that rewrites the end of the
answer it sends back - then finds nothing to resume from and is read from token 0.
This PR lets the checkpoints come with the conversation, as they already do for a read that gave way (
BYIELD),and as an admission and
park=already copy the longest one into the slot. Independent of #2527 / #2528.Seen in use
3 x RTX A4000 16 GB (layer split), Qwen3.8-Flash-Next IQ3_S,
--batch 6in 3 groups, two people with Claude Code.A 121,183-token conversation went slot -> solo -> slot while the other user's requests came and went:
The next turn shared 121,483 tokens with the slot but split from it 300 tokens into the previous answer, so it
could only resume from the turn boundary - which was gone. 40 s of prompt reading instead of about 4,300 tokens.
Measured
Same machine; a 27.5K-token conversation that is admitted into a slot, goes to the solo path when the other request
ends, goes back into a slot when a third arrives, and finishes; its next turn sends the first answer rewritten
after its first 8% (before any mid-reply checkpoint). The same server code, only the engine differs:
What changed
src/program/generate.cppand its SYCL copysycl/src/program/generate.cpp, where an idle slot gives back all itholds (
slot_ck == nullptr): its checkpoints are appended to the main session's chain (each a prefix of the slot'stokens, so of
live), with a fresh LRU stamp. The partial-read case (BYIELD), which already did this, isunchanged and not done twice.
How it was checked
🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.