Repository navigation
feat(kv-hints): prefetch and pin hints in dynamo-kv-hints - #207
Draft
ishandhanani wants to merge 1 commit into
Draft
ishandhanani wants to merge 1 commit into
ishandhanani wants to merge 1 commit into
Conversation
ishandhanani
had a problem deploying
to
external_collaborator
November 11, 2026 11:25 — with
GitHub Actions
Failure
This was referenced Nov 11, 2026
ishandhanani
force-pushed
the
idhanani/dyn-kv-hints-prefetch-pin
branch
from
November 11, 2026 12:32
43826d1 to
8a321c9
Compare
ishandhanani
had a problem deploying
to
external_collaborator
November 11, 2026 12:32 — with
GitHub Actions
Failure
ishandhanani
force-pushed
the
idhanani/dyn-kv-hints-prefetch-pin
branch
from
November 12, 2026 05:19
8a321c9 to
6da4c7c
Compare
ishandhanani
had a problem deploying
to
external_collaborator
November 12, 2026 05:19 — with
GitHub Actions
Failure
Two KV cache hints, both fire and forget: - Wake-up prefetch: a chat request carrying x-dynamo-experimental-wakeup is a wake-up call, not a turn. The router selects the worker this prompt would get, without admission or booking, sends that worker's scheduler a KvHint with one kv.prefetch@1.0 action over ZMQ, and answers at once without running it. The worker loads the prompt from Mooncake into its device cache and radix tree, and the router learns of the pages from its KV events, which is how the real request is routed there. - Pin (DYN_KVM_PIN_ENDPOINT): when a response ends with a tool call, or the request announces one with x-dynamo-experimental-sim-tool-call, the prompt and response pages are pinned in the Mooncake master for the expected tool time with headroom, at a priority that grows with the tokens a miss would recompute. dynamo-kv-hints owns the kv.prefetch action, the pin slot, the Mooncake object keys, the TTL and priority rule, and the sockets (feature zmq, enabled only by dynamo-llm; the layering gate allows it). The SGLang sidecar publishes the scheduler hint socket and, for the direct Mooncake linker, the object layout SGLang reports in its server info. Signed-off-by: Ishan Dhanani <ishandhanani@gmail.com>
ishandhanani
force-pushed
the
idhanani/dyn-kv-hints-prefetch-pin
branch
from
November 12, 2026 08:08
6da4c7c to
86a5ca4
Compare
ishandhanani
had a problem deploying
to
external_collaborator
November 12, 2026 08:08 — with
GitHub Actions
Failure
This branch had an error being deployed
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.
Replaces #202. Rebuilt on current
mainindynamo-kv-hints, at the minimum that works end to end (about 550 lines, no tests).What
Two hints, both fire and forget.
Wake-up prefetch. A chat request carrying
x-dynamo-experimental-wakeupis a wake-up call ("the user opened the thread"), not a turn.KvHintwith onekv.prefetch@1.0action over ZMQ.A code comment at the hook records why there is no booking, and the burst risk: concurrent wake-ups see the same loads and can all pick one worker.
Pin (
DYN_KVM_PIN_ENDPOINT). When a response ends with a tool call, or the request announces one withx-dynamo-experimental-sim-tool-call, the prompt and response pages are pinned in the Mooncake master.Where the code lives
dynamo-kv-hints:kv.prefetchaction.pin: the slot, the Mooncake object keys, and the TTL and priority rule.sender(featurezmq): PUSH sockets to scheduler hint sockets and to the Mooncake master.dynamo-llm:hint_zmq_endpointand, for the direct Mooncake linker, theobject_layoutfrom SGLang's server info ([Feat] linker: Describe the direct linker's Mooncake objects in the L3 layout sgl-project/sglang#49434).dynamo-kv-hintsmay reachzmqthrough its feature (HOST_ALLOWED).Related
kv.prefetchon the linker's prefetch path).[away]profile table withwakeup = true)Validation
cargo fmt --checkpasses.cargo clippy -p dynamo-kv-hints -p dynamo-llm -p dynamo-sglang-sidecar --all-targets -D warningspasses.bash scripts/router_layering_check.sh --host: 55 checks, 0 failures.KvHintencoded here decodes with msgspec into SGLang'sKvHintsEnvelope.