mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #614] [CLOSED] serve: optionally checkpoint an existing chunk near the prompt tail #2720
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#2720
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/614
Author: @imanu86
Created: 10/3/2026
Status: ❌ Closed
Base:
main← Head:codex/prompt-cache-tail-038📝 Commits (1)
8dad0caGPT6-CACHE-Salva un checkpoint opzionale vicino alla fine del prompt📊 Changes
2 files changed (+44 additions, -2 deletions)
View changed files
➕
docs/PROMPT_CACHE_TAIL.md(+29 -0)📝
src/program/generate.cpp(+15 -2)📄 Description
A branched request can share almost the whole previous prompt but diverge before its final cached state, leaving only an earlier periodic checkpoint usable. Optional
--prompt-cache-tailsaves at most one extra checkpoint near the prompt's end, on a chunk boundary the existing batched prefill already reaches. It defaults to off, uses the existing bounded cache, and does not split chunks or advance the periodic schedule early. Reread diagnostics and layer splits retain their existing behavior.For a 33823-token prompt, 6144-token chunks and a 16384-token periodic interval, a branch sharing 32769 tokens can reuse 30720 rather than 18432 tokens. The benefit depends on prompt/branch position and cache capacity.
Validation against pristine upstream 0.1.38 (
99f3dbd) on a modified RTX 2080 Ti 22 GB, KV capacity 262144, int8, 32768 resident cells:This is a conservative new alternative, not the original Daily checkpoint-grid patch: that patch changed chunk boundaries and failed its local paired numerical gate. Its failure remains documented. This proposal does not claim to repair or validate that implementation. The Daily and launcher have not been changed.
Pinned report, complete results/logs, reproducibility scripts, fixture IDs and SHA manifest. Raw multi-GB logits remain local with hashes/sizes recorded in result metadata. The initial incomplete dialogue attempt is preserved separately from the corrected deep-conversation result. AMD/multi-GPU and stock 11 GB hardware are unvalidated.
Related work checked before submission: #62/#65 retain a root/shared-prefix checkpoint, and #203 proposed asynchronous checkpoint copies (closed after no measured gain on current main). This option instead adds one existing near-tail chunk boundary for branches. The broader elastic-cache work in #37, #378 and #563 is outside this focused PR.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.