mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #275] [CLOSED] Add bounded disk persistence for evicted conversations #2541
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#2541
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/275
Author: @jeremiahritchey
Created: 9/30/2026
Status: ❌ Closed
Base:
main← Head:feat/conversation-cache-disk-v0.1.30📝 Commits (3)
b0dac1aAdd bounded eviction-only conversation disk cache on v0.1.301b26ecfPreserve session ranges and diagnose disk identity mismatches9b3d141Document Windows OpenSSL setup and ignore v2 snapshot files📊 Changes
20 files changed (+2369 additions, -45 deletions)
View changed files
📝
.gitignore(+3 -0)📝
CMakeLists.txt(+24 -0)📝
docs/DETAILS.md(+48 -2)📝
include/strata/core/conversation_cache.hpp(+39 -17)📝
include/strata/core/conversation_snapshot.hpp(+2 -0)➕
include/strata/platform/conversation_file.hpp(+66 -0)➕
include/strata/platform/conversation_store.hpp(+45 -0)📝
include/strata/program/conv_cache.hpp(+16 -0)📝
serve/server.py(+16 -4)📝
serve/test_server.py(+21 -0)📝
src/core/conversation_cache_test.cpp(+29 -0)📝
src/core/conversation_state.cpp(+7 -8)➕
src/platform/conversation_file.cpp(+462 -0)➕
src/platform/conversation_file_test.cpp(+328 -0)➕
src/platform/conversation_store.cpp(+307 -0)➕
src/platform/conversation_store_test.cpp(+303 -0)📝
src/program/conv_cache_test.cpp(+22 -0)📝
src/program/generate.cpp(+262 -14)➕
tools/conversation_cache_disk.py(+243 -0)➕
tools/test_conversation_cache_disk.py(+126 -0)📄 Description
RAM-evicted conversations can retain reusable state on disk and return after an engine restart. This adds an opt-in disk tier with byte/entry quotas, using the snapshot representation and GPU restore path released in #189.
Replaces #190 following the request to rebase onto the shipped core. Based on v0.1.30 (
30ec18e), includinge46ccca's session carve. The diff contains only the dependent disk changes; #189 has shipped. Refs #57 and #52. Delta writes remain a possible follow-up from #265.STRATA_ENABLE_CONVERSATION_DISK=ON. This remains single-GPU, matching the released RAM cache.Validation at
1b26ecf(the final commit only adds Windows setup documentation and the v2 ignore rule):-O; 53 server tests passwindows-2022: all five CPU-only C++ suites; run and logsLinux model testing used one RTX 4090, IQ3_S, CUDA 13.4, CPUs 0–31 with NUMA interleaving, fixed expert residency, and diagnostic state/draft read-back. All ten GPU/model jobs passed. These are correctness gates, not throughput measurements. The Windows workflow ran on a separate validation branch whose only addition to the tested code is that workflow; it is not part of this PR.
Remaining platform gate: Windows CUDA engine/model lifecycle execution is still needed. The hosted Windows run verifies OpenSSL/MSVC and CPU/file-store behavior, not GPU restore.
docs/DETAILS.mdnow includes Windows OpenSSL discovery, build and runtime-DLL requirements.Full asset hashing adds startup I/O; path/settings binding is intentionally strict. Disk files contain conversation content. Older draft v1 snapshots are not reused and their directory is left untouched. Windows GPU/HIP execution, power-loss survival and full-model weight-swap/cross-quant cache exchange are not established by the local tests. No multi-GPU disk support, page deduplication, planning files or general Pi benchmark tooling is included.
The streaming-envelope approach follows Marmaduke Woodman's (@maedoc) NVMe work in #52 (
6648be7), adapted to the shared snapshot core. The RAM admission work from @midhatn is in the released base; the identity diagnostics address the owner/@QilinWan review in #57.Reproduction (Linux, CUDA 13.4, RTX 4090, IQ3_S)
Build with the setup-pinned llama.cpp checkout and OpenSSL development headers available:
GPU/model tests require an exclusive GPU window. Use absolute asset paths in the engine configs, a fixed
--expert-cache 6000and--pcie-frac 0.55. The tested modes are:int8-batched.jsonk8v4-batched.jsonint8-ring.jsonEach output directory must be new. Each lifecycle starts six private engines and changes only copied tokenizer files/generated snapshots beneath that directory:
The lifecycle gate requires actual batched/ring evidence, restart draft read-back, exact output/main-state parity, known answers, quota bounds, cold fallback and the named tokenizer-identity rejection.
docs/DETAILS.mddocuments the serving configuration and persistence limits.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.