Repository navigation
Add bounded disk persistence for evicted conversations - #275
jeremiahritchey wants to merge 3 commits into
Conversation
Carry the NVMe-only changes from PR Niko1221#190 onto the released shared snapshot core. Preserve upstream session layer-range validation and argument parsing. The streaming envelope approach follows @maedoc’s Niko1221#52; the disk tier uses the shared GPU restore path.
Version the disk envelope for the v0.1.30 session carve. Bind resolved RoPE and expert quantization settings alongside full asset hashes, compare bounded named fingerprints before reading state, and log the first mismatching field. Add codec rejection tests and require the tokenizer mismatch diagnostic in the model lifecycle gate.
|
Thanks! Please rebase onto 0.1.31 (after #309, which touches park_current); with STRATA_ENABLE_CONVERSATION_DISK=OFF the build must stay byte-identical, and we can run the Windows lifecycle gate on our 5070. Planned for 0.1.33. Closing until the rebase. |
|
@Niko1221 @jeremiahritchey - the Windows lifecycle gate you planned to run on your 5070: I ran it on #275 rebased onto 0.1.36, on Windows 11 with an RTX 4080 SUPER (sm_89, 32 GB), CUDA 13.3, MSVC 14.44 and IQ3_S. All of it passes, so you may not need to repeat it; or run it on the 5070 as well, as you prefer. Since then the branch has moved onto 0.1.37, where the ctest suites and the OFF and ON comparison against the untouched 0.1.37 pass again. The branch:
OpenSSL is linked as Jeremiah has it, as a DLL (OpenSSL 4.0.3 from The gate on 0.1.36, as the PR describes it (absolute asset paths, a fixed
The conversation ctest suites, including the GPU snapshot test, pass 7 of 7. On Linux, on 0.1.37: the five CPU-only suites, the 41 cache-harness tests (also with Faster, separately:
One thing the rebase turned up: 0.1.36's opt-in @jeremiahritchey - would you like to take the branch into #275 or a new PR yourself, or should I open it with your commits (you stay their author) and link it here? If I haven't heard from you by Tuesday, I'll open it. |
|
@Niko1221 @jeremiahritchey - I won't open the PR I offered above after all. 0.1.40 has session files (#668): a file format of its own (v1) with model and config fingerprints and no OpenSSL. Rebased onto 0.1.40, #275 would add a second format and a second identity next to it. What #275 still adds over 0.1.40 is the automatic part: a conversation the RAM cache evicts goes to disk and comes back on a prefix match, also after a restart, without the client saving it. If you still want that, should it write v1 session files? Then I'd build it on 0.1.40 with #275's rules (written only on eviction, a bounded folder, the longest prefix across the live session, RAM and disk) and the Windows gate. If #718, #751 or #1090 is closer to what you want, I'll leave it there. |
Observation-only STRATA_CACHE_MUTATION_TRACE=<jsonl> at the three real victim sites plus publication take/refund/return and post-reset materialization subjects. Bounded, allocation-free install, inert when disabled; transfer work is collected independently of prefix-choice policy with work_known/subject_complete validity. No policy, authorization, pin or default change; real-model total-cost evidence remains missing, so Niko1221#275 stays blocked with eligible LRU.
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.