Repository navigation
Conversation
… the first request
…ectory in the docs A slot snapshot holds the prompt tokens, so it is the conversation itself.
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.
OME B51PJKA. README "Next: v0.3.x": KV snapshots wired into the drain and start paths.
Opt-in per engine with
kv_snapshots(the directory the engine's--slot-save-pathpoints at) andkv_snapshots_mib(16 GiB by default). An engine without it is unchanged.internal/runner/kvsave.go): after the slot boundary, before the park step or anything stops the engine, the runner saves each idle slot's prompt cache, records it in the ledger, and evicts down to the budget. It is bounded at 60 s, keeps the library free floor, and stops at once if the engine exits. A failure is one line, and the stop ladder runs as before.internal/gateway/kvrestore.go): only a start this gateway ran restores. The snapshots are warmed into the page cache while the start waits; once the engine answers, its empty slots restore the newest snapshot of that model beforeensurereturns. Bounded at 30 s./v1/models. An engine that lists none or several (llama-swap) never snapshots, so nothing crosses models.api_key_env/api_key_file), never the node key.Proof:
go test ./...,go test -raceon kvsnap/runner/gateway, Windows build and vet, golangci-lint (0 issues).Not done here: a live save and restore against a real llama-server on aphotic. That check gates the release notes for this feature.