Repository navigation
server : shared context checkpoints, no zero-fill of state buffers (port of upstream #30137) - #70
Merged
Merged
Conversation
…ill of state buffers (port of upstream #30137) Checkpoints become shared_ptr<const>, so saving a slot to the prompt cache no longer deep-copies them; state buffers (checkpoints, cache entries, NVMe reload) use a no-init allocator; prompt_save drops an entry whose state read came back short. Lab sidecar save/restore adapted. Assisted-by: Claude Opus 5.5
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Port of upstream ggml-org/llama.cpp#30137.
shared_ptr<const>.server_prompt_cache::alloc()used to deep-copy every checkpoint of the slot on every save, about 150 MiB of 27B GDN state each.It doesn't conflict with the lab's NVMe tier: checkpoints stay in RAM before and after. Upstream #26004 (checkpoints across slot save/restore) is already covered by the lab's
KCPTsidecar, so it is not ported.Measured with the 27B on both XTX:
-cram 0 --cache-disk 16384 -ctxcp 4, prod-1006 (A) vs this (B), alternated ABAB.prompt cache update took X ms.Assisted-by: Claude Opus 5.5
🤖 Generated with Claude Code
https://claude.ai/code/session_013XBY17SSRKGmDXc2YFsrmp