mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #52] [CLOSED] nvme kv cache #2431
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#2431
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/52
Author: @maedoc
Created: 9/28/2026
Status: ❌ Closed
Base:
main← Head:nvme-kv-cache📝 Commits (10+)
a7578f9NVMe KV cold tier for warm sessions (docs/nvme-kv-cache-design.md)4152c79kv-nvme: snapshot at the chat turn boundary (nvme_dump_at)75c22e0docs: fold the NVMe tier design into a self-contained record; drop the review annexesb820600kv-nvme: payload-integrity footer on every snapshotcb7ebeekv-nvme: diagnose layout drift before integrity on restoref527caaWIP checkpoint: shared conversation core imported, tier retyped to it (step 2, unfinished)d53aaffdocs: write the section kv_nvme.hpp already pointed at4c7dd17kv-nvme: a turn-boundary snapshot stored the WRONG IMAGE LIST, so any conversation with a picture was unreachable2c7321akv-nvme: NvmeEntry::imgs was NEVER FILLED, so every image comparison in the tier compared against nothingc6756f3kv-nvme, generate: the shared core's diagnostic string was thrown away at every call site📊 Changes
48 files changed (+14500 additions, -164 deletions)
View changed files
📝
CMakeLists.txt(+76 -1)➕
docs/nvme-delta-cache-handoff.md(+824 -0)➕
docs/nvme-delta-restore-handoff.md(+262 -0)➕
docs/nvme-kv-cache-design.md(+648 -0)➕
docs/nvme-kv-cache-web-design.md(+430 -0)➕
docs/nvme-kv-cache-web-plan.md(+382 -0)➕
docs/nvme-kv-web-merge-handoff.md(+335 -0)➕
docs/nvme-restore-perf-evidence.md(+114 -0)➕
include/strata/core/conversation_cache.hpp(+162 -0)➕
include/strata/core/conversation_memory.hpp(+24 -0)➕
include/strata/core/conversation_snapshot.hpp(+66 -0)📝
include/strata/core/mtp.hpp(+3 -0)📝
include/strata/kernels/qsa.hpp(+19 -0)➕
include/strata/platform/kv_delta.hpp(+351 -0)➕
include/strata/platform/kv_nvme.hpp(+384 -0)➕
serve/kvcache.py(+475 -0)📝
serve/server.py(+122 -23)📝
serve/telemetry.py(+26 -3)📝
serve/test_server.py(+898 -1)📝
serve/web/app.css(+21 -2)...and 28 more files
📄 Description
An nvme kv cache avoids constant prefills across multiple sessions (#47) so I'm taking a stab at it, testing it right now. Once the tests on the live server come through I'll detail those tests.
Oracles: tools/nvme_p0_test.sh (bit-exact restore + negative control), tools/nvme_steps123_test.sh (cascade/supersede, promote-after-restart: 13 fresh tokens read in ~350 ms after a restart vs a full re-prefill; LRU cap evicts). Known engine property (documented): decode is run-to-run nondeterministic on v0.1.13 (pre-existing, reproduced with the old binary), so continuation token equality is informational; restore-exactness is the hard gate.
Design: docs/nvme-kv-cache-design.md; review: docs/nvme-kv-cache-critique.md (glm-5.3, design) and docs/nvme-kv-impl-review.md (glm-5.3, implementation, P1s addressed).
edit so for example, this is a round robin 110k needle-in-the-haystack example

where we see delicious ttft bc of reuse, across three different long prompts.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.