mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
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#1553
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 @mantovaniluca91 on GitHub (Oct 22, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/3721
Since 0.1.45 a new conversation that matches a checkpoint inside another parked conversation borrows it (
ConversationCache::borrows(), PR #1164) instead of taking the whole entry. Under--layer-splitthis never happens — in v0.2.2src/program/generate.cpp:So on a layer split the sibling's parked conversation is still taken whole, and its next turn reads its history again. For agent clients with many conversations sharing one long system prompt, this is the case that matters most, and multi-GPU layer splits are exactly where people run long contexts. Could borrowing be extended to layer splits (copying each stage's share of the checkpoint and K/V up to the match), or is there a reason it cannot work there?
Setup
--layer-split 27 --batch 2 --batch-groups auto, MTP,--kv int8 --kv-resident 32768, 262K context, GSQ-RCO IQ3_XXS.--conversation-cache-mib 40960 --conversation-cache-slots 16 --conversation-cache-min-tokens 8192 --prompt-cache-every 32768.What we see (one working day, 22/10, 10:20–14:41, ~500 requests)
At most 4–5 conversations above 8K tokens alive at the same time, yet the cache stays at 16 parked entries;
evictionsreached 148.9 requests of conversations that were already running (not new ones, and not right after a client-side compaction) read their prompt from token 0: 23K–165K tokens, 15–110 s each, ~6 minutes of prefill in total. Example from
/metrics?requests=all: a desktop session resumed from the cache on its previous turns, then at 13:59prompt_tokens 165358, reused 0, 110 s of prefill, with no change in its history (message count still growing, system prompt and tools identical).From the log alone we cannot tell which of these were plain evictions and which were a sibling taking the entry (
take()), because a take of another conversation's entry prints the sameconversation cache: restored N tokens (checkpoint)line as a normal resume. Our reading of the code (0.1.43.1,best()+take(parked.index)) is that a new conversation matching the shared system-prompt checkpoint inside conversation A's entry moves A's whole entry out, and A's next turn starts again from its root.Requests, in order of usefulness to us
--layer-split(per-stage copy of the matched checkpoint and the K/V up to it, the donor stays parked).taken by a sibling: N tokens of a parked M-token conversation), and a counter in/metricsnext toborrowed, so the cost can be measured.--prompt-cache-everywe saw the pinned item be the 16K checkpoint, and new conversations resume from 16K/32K instead of the end of the system prompt; we moved to--prompt-cache-every 32768as a workaround.We can test any build on 2× 7900 XTX now and on 2× MI50 later, and report the same day counts (
borrowed,evictions, re-reads from the root).@Niko1221 commented on GitHub (Nov 5, 2026):
Thanks for taking the time to report this.
Strata has changed a lot since this was opened, and 0.2.11 is out now, so many older reports no longer apply. We're closing issues older than a week that have had no new reports in the last week. Closed here does not mean rejected.
To reopen it takes about two minutes:
/reopen. A check runs and either reopens the issue or lists what is still missing.The rules are in CONTRIBUTING.md.