mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #1810] [CLOSED] feat: persist conversation checkpoints with RAM and disk restore #3692
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#3692
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/1810
Author: @CC-David-CC
Created: 10/10/2026
Status: ❌ Closed
Base:
main← Head:fix/mtp-cache-token-parity📝 Commits (10+)
34e2409serve: keep evicted conversations on disk across restartsd258f18serve: restore a session file without holding its K/V in RAM0d846c1Merge remote-tracking branch 'upstream/main' into conversation-spill-disk1904b8aserve: recompute the RAM conversation match after a failed disk attempt: make_room may have evicted the entry the stale index named1a9e8b9Merge remote-tracking branch 'upstream/main' into conversation-spill-disk3a5daf6Merge branch 'pr-1269' into disk-only-cachedd146f4serve: --conversation-cache-disk-only - the conversation cache on disk, no RAM budgetb189048conversation_spill_test: disk-only checks; docs: --conversation-cache-disk-only, measured on Strix Haloff30368docs: --conversation-cache-disk-only restores measured from a cold page cache2987ac4serve: disk-only cache keeps each conversation's root as a persistent prefix entry📊 Changes
40 files changed (+7562 additions, -124 deletions)
View changed files
📝
CMakeLists.txt(+6 -1)➕
bench/results/2026-10-11-cache-refresh/README.md(+81 -0)➕
bench/results/2026-10-11-cache-refresh/cache-parity-disk-temp0.7.json(+552 -0)➕
bench/results/2026-10-11-cache-refresh/cache-parity-disk-temp0.json(+468 -0)➕
bench/results/2026-10-11-cache-refresh/cache-parity-ram-fallback-temp0.7.json(+552 -0)➕
bench/results/2026-10-11-cache-refresh/cache-parity-ram-fallback-temp0.json(+468 -0)➕
bench/results/2026-10-11-cache-refresh/cache-parity-ram-temp0.7.json(+552 -0)➕
bench/results/2026-10-11-cache-refresh/cache-parity-ram-temp0.json(+468 -0)➕
bench/results/2026-10-11-cache-refresh/provenance.json(+16 -0)➕
bench/results/2026-10-11-cache-refresh/session-policy/hip-policy-version-status.json(+24 -0)➕
bench/results/2026-10-11-cache-refresh/session-policy/new-default.txt(+44 -0)➕
bench/results/2026-10-11-cache-refresh/session-policy/new-repro.txt(+47 -0)➕
bench/results/2026-10-11-cache-refresh/session-policy/old-default.txt(+43 -0)➕
bench/results/2026-10-11-cache-refresh/session-policy/old-repro.txt(+43 -0)➕
bench/results/2026-10-11-cache-refresh/session-policy/session-policy-verified-disk-results.json(+552 -0)➕
bench/results/2026-10-11-cache-refresh/session-policy/session-policy-verified-ram-fallback-results.json(+552 -0)➕
bench/results/2026-10-11-cache-refresh/session-policy/session-policy-verified-result.json(+46 -0)➕
bench/results/2026-10-11-cache-refresh/session-policy/session-policy-verified-status.json(+21 -0)➕
bench/results/2026-10-11-cache-refresh/session-policy/sycl-policy-version-status.json(+36 -0)📝
docs/DETAILS.md(+150 -4)...and 20 more files
📄 Description
Adds opt-in automatic disk-only conversation caching and disk fallback when RAM caching cannot admit a snapshot. Saved native state includes the appropriate main/draft layers; absent-MTP save/restore is handled without assuming a draft layer exists. Reproducible comparisons can keep caching enabled while fixing adaptive/CPU placement choices.
Refreshed onto current main, preserving the active-layer guard, current session-reclaim/min-token/memory-cap options and diagnostics. Disk admission now uses the current host/cgroup memory sampler. #1489's native snapshot implementation is already preserved here; #1667 retains its live integration probe and API-history work. The two surviving PRs were validated together.
Configure
--conversation-cache-spill-dir DIRand--conversation-cache-disk-mib N, optionally--conversation-cache-disk-only; keep disposable validation state separate from deployed caches. Disk-only execution remains single-device. Defaults stay unchanged. Usage and reproducible token checks.Fresh validation: six native cache/file/memory/spill/session-reclaim tests, combined serving suite (750 tests, 12 skipped), and all six exact-token configurations: RAM, disk-only and RAM-to-disk fallback, each greedy or seeded sampling (temperature 0.7, seed 12345), MTP width 2. Fresh A, switched-away A-return and repeated A output IDs matched, and returned conversations confirmed saved-prefix reuse. Combined Responses lifecycle checks passed 33/33 with MTP disabled; #1667 records the 32K checkpoint/retention probe.
CUDA model measurements used RTX PRO 6000 Blackwell / ISTA IQ3_XXS. HIP gfx1012 builds/native cache tests and SYCL builds/host cache tests passed; those checks do not claim fresh model parity on those backends. Fresh report, complete token IDs, scope and reproduction. Historical timings retain their original source/settings.
The reproducible policy now also forces
STRATA_ROUTE_TAIL_SKIP=0; normal routing defaults remain unchanged. Policy version 2 is included only in reproducible saved-state fingerprints. Native tests verify ordinary old snapshot compatibility, refusal of unversioned reproducible snapshots without terminating the engine, and a new-policy save/restore roundtrip. Seeded disk/fallback parity and HIP/SYCL checks passed again after versioning. Old reproducible snapshots must be regenerated.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.