Repository navigation
Conversation
…ned vLLM nightly (ai-dynamo#160) ## Problem - `Dockerfile.quick-start-vllm` pins Dynamo v1.6.0 (`701da25`) with vLLM nightly `edad8b03`. Every worker built from it exits at import (`cannot import name 'get_engine_zmq_addresses'`), so the quick start cannot start a worker (ai-dynamo#159). - The build-time check imports `dynamo.vllm` but not the worker entry point, so the mismatch passes the build. ## Fix - `DYNAMO_REF` → `318ab039` (Dynamo main, 2026-11-02). Dynamo dropped the renamed import on 2026-10-23 (ai-dynamo/dynamo#16757); v1.6.0 and v1.6.1 both still have it. `VLLM_IMAGE` and `KVCR_VLLM_REF` are unchanged. - The compatibility check now also runs `import dynamo.vllm.main`, so a Dynamo/vLLM pair that cannot start a worker fails the build instead of the first `python -m dynamo.vllm`. ## Validation - Image built from this Dockerfile unchanged otherwise (`ghcr.io/luckyq/kvcr-phase1:qs-218c7816b34b`, 7 min); the new import check passes. - 2×H100 (dynamo-aws-dev-02), Qwen3-8B, Guard mode, Phase 1 harness TC-01/02/03: 3/3 PASS (`source_write == remote_deliver`, 0 token mismatches). - Same Dynamo revision with the full matrix earlier today: dense 6/6, 2P+1D 6/6, Qwen3.5-4B hybrid 6/6. Fixes ai-dynamo#159. Signed-off-by: doxu <doxu@nvidia.com>
…eyAdapter API (ai-dynamo#162) Signed-off-by: doxu <doxu@nvidia.com>
## Summary - Add an experimental SGLang Direct Linker quick start and Dockerfile. - Use KVCR-owned inventory and Dynamo router hints for peer KV reuse. - Scope the example to dense Qwen3-32B BF16 with TP1 workers. The recipe pins Dynamo [#17655](ai-dynamo/dynamo#17655) (`fe81cfd`) and SGLang [#45650](sgl-project/sglang#45650) (`5b65e08`); KVCR is installed from the build checkout. ## Validation - Built the Dockerfile from this PR and ran its import/version canary. - Two B200 nodes, one TP1 worker per node: ten 116K-token requests restored 115,968 tokens via router-generated hints and RDMA, with matching output IDs. Mooncake linker `local_first` and `random` ran against the same inputs. - The cross-node test used a harness and a chroot in retained GPU pods; the guide's same-host deployment was not run as written. Signed-off-by: linhu-nv <linhu@nvidia.com> Co-authored-by: Ziqi Fan <ziqif@nvidia.com>
Signed-off-by: Moein Khazraee <moein@nvidia.com>
Flasew
force-pushed
the
independent-hint
branch
from
November 5, 2026 02:03
c801c1e to
1cd447f
Compare
Keep kv.fetch as source advice for later framework fetch/deliver calls. Remove obsolete payload handling and clarify that hint hashes differ from full BlockKey inventory and transfer identities. Validation: hint parser/fetch suites, Ruff, and whitespace checks. Signed-off-by: Weiyang Wang <wafrank@nvidia.com>
Add metadata-only peer resolution through the adapter's reverse lookup, with complete keys, layouts, and per-hash failures. Reject self-addressed resolution by process incarnation. The integration owns the reverse index and ambiguity policy; lookup acquires no source-memory claims. Include the full client lifecycle: validate peer, hash set, reply rows, and deadline, then deliver completion on the owner thread through a callback. Neither endpoint depends on hint execution or move state. Extend the existing remote-source/target suites for lookup failures, owner-independent replies, malformed/late responses, and exactly-once completion. Validation: full unit suite, Ruff, and whitespace checks. Assisted-by: OpenAI Codex Assisted-by: Anthropic Claude Signed-off-by: Weiyang Wang <wafrank@nvidia.com>
Flasew
force-pushed
the
independent-hint
branch
from
November 6, 2026 04:14
1cd447f to
ca89731
Compare
Add internal full-key fetches from a named peer, with optional source removal. Keep the source through deferred admission and require managed source G2, without acquiring or borrowing framework pins. The public framework API and ordinary copying remain unchanged. Withdraw eligible source copies before transfer; successful writes leave removal pending until readers drain, while failure reopens admission. Honor no_evict, invalidate cached destination hits, and publish actual residency changes. Hash lookup excludes keys pending removal. Extend existing remote tests for exact bytes, cache hits, protection, partial failure, source validation, busy producers, readers, and pin exclusion. Validation: full unit suite, Ruff, and whitespace checks. Signed-off-by: Weiyang Wang <wafrank@nvidia.com>
Connect kv.prefetch and kv.move to hash resolution and named-source transfers. Actions outlive their carrier request, preserve request advice, validate local identity/layout compatibility, and aggregate per-hash results across layouts. Consume internal completions and release temporary destination claims. Extend the existing hint suite for carrier independence, copied bytes, cached moves, source disappearance, capacity waits, overlapping actions, layout groups, timeouts, and cleanup. Document the hint flow and source removal ordering, including the planned request-scoped kv.migrate hint for cold starts. Validation: full unit suite, native two-peer NIXL/UCX scenarios, Ruff, and whitespace checks. Assisted-by: OpenAI Codex Assisted-by: Anthropic Claude Signed-off-by: Weiyang Wang <wafrank@nvidia.com>
Flasew
force-pushed
the
independent-hint
branch
from
November 6, 2026 05:25
ca89731 to
c7f1f0e
Compare
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.
Depends on ai-dynamo/kvcr#154, which adds source-owned G2 removal for move hints, and should merge after it. Review only the three feature commits. The comparison against upstream
maincurrently also includes the parent PR's changes.Allow
kv.fetchhints to place blocks in managed destination G2 without waiting for a framework request for those keys. An unrelated request can carry the hint. Transfers continue to use completeBlockKeyvalues and the existing fetch/move machinery.The feature is split into three commits:
1. Hash resolution —
ea35bc4Add the source-side
resolve_hashes/hashes_resolvedexchange. The source resolves each uint64 hash throughKeyAdapter.decode_from_router()and returns its full key, ordered layout labels, and piece sizes. The adapter owns reverse lookup: return a full key, raiseKeyErrorfornot_found, orValueErrorforambiguous_hash. Lookup runs on progress and must not block; KVCR maintains no additional hash index.Resolution requires a managed G2 record with layout metadata. It neither reserves source memory nor transfers data; source admission revalidates residency later. A request from the same KVCR instance fails with
self_sourcebefore lookup, including through endpoint aliases. Framework-only lookup and remote G3 staging are unsupported.Ambiguity policy belongs to the integration. The companion vLLM adapter accepts inventory updates, tracks all colliding full keys, and rejects lookup until a hash becomes unique again. This includes collisions across KV cache groups. Its map requires KV cache events to be enabled. Request-scoped transfers retain exact keys supplied by the framework.
2. Independent hints —
70c41c7scopedefaults to"request": with a request ID, the hint records advice for later framework calls. Explicitscope: "independent", or submission without a request ID, starts placement immediately.moderemains"copy"or"move", defaulting to copy.The path is
submit_hint→_IndependentHintHandler→ hash resolution → destination key/layout validation → ordinarycore.fetch. Resolution adds one round trip before the existing transfer protocol._HashResolutionOptracks this exchange locally; only the resolution request and reply are wire messages. Both owners must continue callingpoll_completed().Independent work outlives its carrier request. Private advice IDs prevent collisions with request advice; completion releases temporary claims and advice. Per-hash outcomes allow partial success and are reported internally without entering framework completion results. There is no public hint-result polling API. Move inherits the base commit’s best-effort G2 removal, existing-reader protection, and
no_evictbehavior; completion can precede source cleanup.Nonfatal fetch-admission exceptions fail the affected group and discard its private advice; unexpected exceptions warn once. Fatal progress errors continue to propagate to the caller.
3. Framework fallback policy —
1cd447fAdd boolean
allow_framework, defaulting totruein both scopes. If source G2 disappears after resolution, the transfer may obtain the same full key from framework memory, preserving existing behavior.falserequires complete managed G2 at source admission: missing/incomplete keys fail without acquiring or reusing framework pins. The policy survives retries and deferred admission, and applies to subsequent request-scoped fetch/deliver operations too.This provides a managed-memory-only policy without pinning during resolution. It does not make framework-only hashes resolvable.
Validation
Core unit and native KVCR tests run without vLLM or Dynamo:
no_evictprotection, source/destination collisions, collision recovery, cached destinations, mixed batches, disappearance/rebinding races, and drained claims/pins/advice.Separate integration validation uses the companion vLLM adapter and temporary Dynamo composer. vLLM units check inventory/tier/collision transitions. The two-manager runner and local Dynamo-driven extension exercise production adapter callbacks, unchanged composed envelopes, unrelated carriers, ordinary loads, partial failures, rebinding, and overlapping actions. The Dynamo-driven scenarios were rerun after review. A corrected live Qwen/A100 test submits known/unknown self-addressed copy/move actions through
LLMEngine.add_request: all fail withself_sourcebefore lookup or transfer, preserving cached bytes and carrier output.Native/component transfers use CPU buffers. The live test covers rejection on one engine, superseding the earlier self-copy success claim. Full frontend HTTP/discovery transport, two complete serving workers, GPU-to-GPU transfer, and throughput are outside this validation. Unit/native checks cover the reviewed code; the independent-hint commit was also rechecked without the later framework-policy commit.