Repository navigation
Route Nemotron Super prefix reuse through the coordinator (resident capability, receipts, cached-token usage) - #1586
Closed
jonathan308 wants to merge 2 commits into
Closed
jonathan308 wants to merge 2 commits into
jonathan308 wants to merge 2 commits into
Conversation
…ator The managed Super owner's resident checkpoint bank now advertises a protocol-v2 resident capability (prefix_cache_memory_models) bound to the aggregate the provider published for the loaded checkpoint and the checkpoint's PromptContractIdentity, the identity the prompt sidecar plans with. Coordinator requests on the Super route submit under the request's own usage signal, so lookup and ready receipts, prompt_tokens_details cached_tokens and inference_complete cache usage now reach the coordinator as on the generic engine, and the local endpoint reports the reused tokens. Without a capability the coordinator never prepared a cache attempt for Super, so no request carried a cache scope and the reserved bank served no coordinator hit. A publication whose post-load artifact hash differs from the advertised one closes the evidence; local reuse is unchanged.
Document the managed Super slot's resident capability, receipts and cached token usage, the local endpoint's cached_tokens, and add the changelog fragment.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This was referenced Oct 24, 2026
Collaborator
Author
|
Superseded by #1592; consolidated per owner request |
6 of 10 tasks
jonathan308
added a commit
that referenced
this pull request
Oct 25, 2026
Set ProviderCore.version to 0.10.2 and render the v0.10.2 changelog entry from the 27 fragments added since v0.10.1, ordered by theme behind an upgrade and rollout section: Nemotron 3.5 Super prefix caching (#1586, #1588); GLM-5.3-Flash prefix caching (#1587, #1589, #1590); 4-bit SSD checkpoints and the SSD prefix cache on every model (#1592 (mlx-swift-lm#363), #1584, #1592); Logprobs on Nemotron 3.5 Super and GLM-5.3-Flash (#1564); OpenRouter compatibility: GLM-5.3-Flash and MiMo-V2.6-Flash requests no longer refused (#1585, #1592); Speed: MTP and throughput (#1592 (mlx-swift-lm#360), #1593 (mlx-swift-lm#357), #1595 (mlx-swift-lm#359), #1594, #1595, #1598 (mlx-swift-lm#362), #1594); Provider diagnostics: refusal reasons and load memory (#1592, #1603); MLX stack (#1596); Desktop release workflow (#1580). Apply 12 corrections reviewed against the code. #1580 is already in the v0.10.1 tag but merged after the 0.10.1 preparation, so its fragment is rendered here. Mark v0.10.1 as published on 2026-10-24. Record in the provider release runbook the SDK pin check, the enablement order (darkbloom-platform#464 before any catalog logprobs change, the GLM allowlist tuple, then both models' logprobs after the rollout and Super's tuple after a signed restart check), the platform evidence and the published history. No tag, registration, upload, deployment or enablement is performed.
jonathan308
added a commit
that referenced
this pull request
Oct 25, 2026
Set ProviderCore.version to 0.10.2 and render the v0.10.2 changelog entry from the 27 fragments added since v0.10.1, ordered by theme behind an upgrade and rollout section: Nemotron 3.5 Super prefix caching (#1586, #1588); GLM-5.3-Flash prefix caching (#1587, #1589, #1590); 4-bit SSD checkpoints and the SSD prefix cache on every model (#1592 (mlx-swift-lm#363), #1584, #1592); Logprobs on Nemotron 3.5 Super and GLM-5.3-Flash (#1564); OpenRouter compatibility: GLM-5.3-Flash and MiMo-V2.6-Flash requests no longer refused (#1585, #1592); Speed: MTP and throughput (#1592 (mlx-swift-lm#360), #1593 (mlx-swift-lm#357), #1595 (mlx-swift-lm#359), #1594, #1595, #1598 (mlx-swift-lm#362), #1594); Provider diagnostics: refusal reasons and load memory (#1592, #1603); MLX stack (#1596); Desktop release workflow (#1580). Apply 14 corrections reviewed against the code. #1580 is already in the v0.10.1 tag but merged after the 0.10.1 preparation, so its fragment is rendered here. Mark v0.10.1 as published on 2026-10-24. Record in the provider release runbook the SDK pin check, the enablement order (darkbloom-platform#464 before any catalog logprobs change, the GLM allowlist tuple, then both models' logprobs after the rollout and Super's tuple after a signed restart check), the platform evidence and the published history. No tag, registration, upload, deployment or enablement is performed.
Gajesh2007
pushed a commit
that referenced
this pull request
Oct 25, 2026
Set ProviderCore.version to 0.10.2 and render the v0.10.2 changelog entry from the 20 fragments added since v0.10.1, ordered by theme behind an upgrade and rollout section: Nemotron 3.5 Super prefix caching (#1586, #1588); GLM-5.3-Flash prefix caching (#1587, #1589, #1590); 4-bit SSD checkpoints and the SSD prefix cache on every model (#1592 (mlx-swift-lm#363), #1584, #1592); Logprobs on Nemotron 3.5 Super and GLM-5.3-Flash (#1564); GLM-5.3-Flash OpenRouter request controls (#1585, #1592); Speed: MTP and throughput (#1592 (mlx-swift-lm#360), #1593 (mlx- swift-lm#357), #1595 (mlx-swift-lm#359), #1594, #1595, #1598 (mlx-swift- lm#362), #1594); Provider diagnostics (#1592); MLX stack (#1596); Desktop release workflow (#1580). Apply 12 corrections reviewed against the code. #1580 is already in the v0.10.1 tag but merged after the 0.10.1 preparation, so its fragment is rendered here. Mark v0.10.1 as published on 2026-10-24. Record in the provider release runbook the SDK pin check, the enablement order (darkbloom-platform#464 before any catalog logprobs change, the GLM allowlist tuple, then both models' logprobs after the rollout and Super's tuple after a signed restart check), the platform evidence and the published history. No tag, registration, upload, deployment or enablement is performed. Co-authored-by: Jonathan Spangler <5055076+jonathan308@users.noreply.github.com>
This branch was successfully 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.
Summary
Nemotron 3.5 Super never took part in coordinator prefix caching. The managed slot reserves a resident checkpoint bank (up to 16 GiB of its KV grant), but it advertised no prefix-cache capability, so the coordinator never prepared a cache attempt and never sent a
cache_scope: the bank served no coordinator request. The Super route also submitted under its own usage signal, so it sent no lookup/ready receipts, nocached_tokens, and cached tokens were never billed atcache_read_price.With this PR the bank advertises a resident capability (
prefix_cache_memory_models). The capability is bound to the aggregate the provider published for the loaded checkpoint and to the checkpoint'sPromptContractIdentity, which is the identity the prompt sidecar plans with. The Super text route now runs under the coordinator request's usage signal.Before:
sequenceDiagram participant C as Coordinator participant P as Provider (Super slot) participant B as Resident bank P->>C: heartbeat (no Super prefix-cache capability) Note over C: no capability, so no cache attempt C->>P: inference_request (no cache_scope, no receipt nonce) P->>B: submit, cacheEnabled = false Note over B: reserved, never consulted P-->>C: inference_complete (no cache usage) Note over C: every prompt token billed at the input priceAfter:
sequenceDiagram participant C as Coordinator participant P as Provider (Super slot) participant B as Resident bank P->>C: heartbeat: prefix_cache_memory_models[super] = {aggregate, prompt_contract_id, epoch} C->>P: inference_request + cache_scope + receipt nonce (sent to the holder) P->>B: lookup / restore under the request's usage signal P-->>C: prefix_cache_lookup_v2, prefix_cache_ready_v2 P-->>C: inference_complete usage {hit, memory, cached_tokens, prefill_tokens_saved} Note over C: cached tokens billed at cache_read_price; repeats go to the holderNo protocol, coordinator or persistent-format change. Media requests carry no coordinator cache scope, so they are unchanged.
Evidence
Before (master): the managed-slot test asserted that a coordinator request on Super reports no cache use (
usage.cacheOutcome == nil && usage.cachedTokens == nil), andowner.bridge.residentPrefixCacheEvidencewas always nil. On a coordinator this meansmemory_ready_modelsis 0 for Super, so no request gets acache_scope.After:
New tests on tiny synthetic Super installs, plain and speculating (MTP) owner:
NemotronSuperPrefixCacheEvidenceTests:cached_tokensNemotronSuperManagedSlotTests.coordinatorRequestsReportTheBanksReuse: an encrypted coordinator request → v2 receipts,inference_completeusagehit/memory/512, SSEcached_tokens: 512, and a miss for another tenant.miss_absent/memory/0for a prompt shorter than one chunk.InferenceHandler|PrefixCache|NemotronSuper|UsageSignal|Receipt|LocalInferenceHTTP|ResidentPrefixalso passes: 480 Swift Testing tests in 77 suites, plus 7 XCTest cases.Real hardware, M3 Ultra. Pinned checkpoint
2026-10-20-nvfp4-r2through the production loader and the encrypted coordinator path, using the gatedNemotronSuperManagedSlotLiveTests+PrefixCachetest. The advertised capability isnvidia-nemotron-3.5-super/56a1f05e…dceca6/ed2891bc…eb885; the prompt sidecar computes the same identity from the published manifest.Greedy output is identical between restored and cold runs, with and without MTP.
Local coordinator end to end. Real Go coordinator, real prompt sidecar, cache routing on, an allowlist containing only the Super tuple. Two real providers (M3 Ultra, M5 Ultra) run this branch's release binary.
Rates{60000, 350000, 10000}.CostWithMinimum(billed tokens). Short warm prompts hit the 100 µUSD request minimum.Limitations
min(TTL, 30 s). Turns spaced further apart lose routing affinity, although the bank still restores if the turn lands on the same provider. Durable SSD checkpoints (25-minute holders, restart survival) are the stacked follow-up, Keep Nemotron Super prefix reuse as durable SSD checkpoints (stacked on #1586) #1588.cached_tokens: 0.Rollout
Coordinator config. With the production allowlist (
EIGENINFERENCE_CACHE_ROUTING_ALLOWED_ARTIFACTS, see the platform cache-routing rollout runbook), this release changes nothing on coordinator traffic until an operator appends the tuple (procedure: Layr-Labs/darkbloom-platform#463). No coordinator code change is needed. A coordinator with no allowlist (unrestricted eligibility) admits Super as soon as providers run this release. Tuple:{"model_id":"nvidia-nemotron-3.5-super","model_aggregate_sha256":"56a1f05e980a602ebc09a64203689a656198069e1c9dd4c6698af833f2dceca6","prompt_contract_id":"ed2891bc3bbe767c3b8a73bcf15bc3b5833948bf4a1e2aa972f21c55468eb885"}Overlaps.
logprobs:parameter to the same signatures (NemotronSuperLocalBinding.Execute/run/executeBridge,NemotronSuperSlotOwner.chatEngine,NemotronSuperLocalImageHTTP.engine, the handler call). The conflict is mechanical (keep both parameters), with no semantic overlap.Refactor pass: done, no change; see Refactor pass.
Refactor pass
Done: no change. The head stays
9e627ae8f, and nothing was pushed. A dedicated refactor pass reviewed this PR's whole diff againstmaster(9034a5a0f): runtime code, tests and docs.Reviewed and kept:
usageSignalrunsNemotronSuperLocalBinding.run→runAcquired→executeAcquired→Execute→executeBridge, the same pathcacheScopealready took. Keep Nemotron Super prefix reuse as durable SSD checkpoints (stacked on #1586) #1588 addsdonationDemandalong it, and Logprobs follow-up: GLM-5.3-Flash and Nemotron 3.5 Super #1564 addslogprobs. One per-request value would read better, but it would rewrite the binding's fixture seam (Execute), which Logprobs follow-up: GLM-5.3-Flash and Nemotron 3.5 Super #1564 also changes, and the morning conflict would stop being mechanical. That cleanup belongs after both land, as its own change.SuperHTTPEnginealways hands the binding a signal (self.usageSignal ?? EngineV2RequestUsageSignal()) so that the relay can readprefixCacheHitTokens. The binding keeps its own fallback for direct callers (the tests). Both are needed.RoutingIdentity. Resolving the identity and making one evidence source per bridge is small, and it lives with the prefix-cache type. Closing the evidence on hash drift is one line at publication.NemotronSuperPrefixCacheEvidenceTests.memoryKeyrepeatsPrefixCachePolicy.memoryEnvironmentFlag, as the neighbouring master suiteNemotronSuperLocalPrefixCacheTestsdoes. It is kept for consistency.inference.mdandprefix-cache.mdcome from this PR, but Keep Nemotron Super prefix reuse as durable SSD checkpoints (stacked on #1586) #1588 rewrites those paragraphs, so they are rewrapped there.Validation: nothing changed here, so this PR's own evidence and green CI on
9e627ae8fstand. Its code also runs in #1588's refactor-pass validation (515 Swift tests and the real checkpoint) and in the local morning integration below.Merge readiness (
git merge-treeonmaster9034a5a0f):NemotronSuperLocalBinding.swift,NemotronSuperSlotOwner.swift,ProviderLoop+InferenceHandler.swiftandNemotronSuperLocalImageHTTP.swift. Keep both parameters,logprobsthenusageSignal, at every hop and inSuperImageHTTPRelay.init.There is also one semantic conflict that git does not flag. Both PRs change the two
fixtureExecution: { _, … in }closures inNemotronSuperLocalBindingTests.swiftto 7 arguments, so that hunk merges cleanly, but the mergedExecutetakes 8, so the closures need an eighth_. A local, signed integration (not pushed) of master + #1585 + #1564 + #1586 + #1588 + #1587 with exactly this resolution builds and passes. The results and the full order are in #1588.Merge Danger
Door: two-way
Reverting stops the capability. Coordinators then stop sending Super a cache scope, which is today's behavior. No persistent state or protocol field is added.
Blast Radius: Super-only
This affects routing and billing for
nvidia-nemotron-3.5-superonce a coordinator admits its tuple: cached tokens bill atcache_read_price, and repeats prefer the holder. Other models and the generic engine are untouched.Components touched
Protocol / interface changes
prefix_cache_lookup_v2/prefix_cache_ready_v2receipts andinference_completecache usage.Documentation impact
docs/architecture/inference.md(managed Super slot),docs/architecture/prefix-cache.md(resident evidence),docs/provider/direct-mode.md(localcached_tokens), and the changelog fragmentchangelog.d/nemotron-super-prefix-cache-routing.md.make docs-checkandmake docs-impact-check BASE=origin/masterpass.