Skip to content

Repair prefix cache retention - #38

Merged
lukealonso merged 3 commits into
NVIDIA:mainfrom
yatesdr:feat/prefix-cache-retention
Oct 23, 2026
Merged

lukealonso merged 3 commits into
NVIDIA:mainfrom
yatesdr:feat/prefix-cache-retention

Conversation

@yatesdr

@yatesdr yatesdr commented Oct 23, 2026

Copy link
Copy Markdown
Collaborator

Problem

Under pressure from one long conversation, the prefix cache drops other conversations' recent checkpoints. The host tier then often recomputes them instead of restoring them. On DeepSeek V4.1 Flash TP4, an 855k-token session beside a ~170k-token classifier transcript turned 2 s classifier calls into 16–17 s full prefills.

Change

  • Eviction: reclaims by actual backing pressure and recency across leaves and compactable ancestors, counting retiring snapshot backing once. Pins and fences are unchanged. Snapshot sizing is unchanged.
  • Restore: when the deepest host-tier match is too costly to restore, shallower matches are tried under the same cost rule.
  • Stores: a store refused for lack of space is retried while its GPU checkpoint is still valid. Duplicates are still skipped.
  • Compacted rows: compacted endpoints can be republished. Their rows are replaced atomically, without breaking ancestry.
  • Counters: lookup outcomes, store-skip reasons, retries, row refills, snapshot capacity, and the estimated transfer vs prefill cost behind each restore decision.

Tests

Helios 900, protocol 48, CLI 134 and package 98 pass on CPU. DeepSeek V4.1 TP4 concurrency-32 replay, memory/disk/composite isolation against the documented 2% limits, and multi-host qualification are still to do.

yatesdr and others added 3 commits October 22, 2026 23:08
Count retiring backing once, retry blocked stores, and refill compacted rows atomically.

CPU: Helios 900 passed, 22 ignored, 3 memlock failures; protocol 48 passed; CLI 134 passed, 1 ignored; package 98 passed, 1 missing-passwd-home failure. Release and extension builds and normal clippy passed. Strict clippy and full format have existing failures. GPU and integration checks are to run in the test round.

Design-Signed-Off-By: yatesdr; design-review=6aeb
Distinguish failed stores that replaced a file on some ranks from failures
that leave every prior file intact. Invalidate the damaged ancestor while
retaining descendant links, charge the full replacement size until reclaim,
and allow missing-file cleanup to complete successfully. Intact replacements
still roll back to their previous record.

Cover partial writes on either rank, cleanup failure, ancestor invalidation,
GPU-resident prefix bypass, reclamation, and all-rank write failure.

Validation: full Helios tests with server,runtime-package passed (953 passed,
34 ignored); the Flare release build and formatting checks passed. GPU
concurrency, isolation performance, and live multi-host qualification were
not run.

Design-Signed-Off-By: Codex GPT-6; design-review=6aeb
Include ARM package hashing dependencies and the Qwen recurrence documentation.
The prefix-cache changes retain their shared runtime interfaces and preserve
package compatibility.

Validation: full Helios suite with server,runtime-package passed (953 passed,
34 ignored), and the Flare release build passed on x86_64. GPU concurrency,
isolation performance, live multi-host qualification, and ARM execution were
not run.

Design-Signed-Off-By: Codex GPT-6; design-review=6aeb
@lukealonso
lukealonso merged commit 2a8ec90 into NVIDIA:main Oct 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants