Repository navigation
standalone-indexer: hash a vLLM cache_salt into its sequence's first block - #53
Merged
Merged
Conversation
…block vLLM mixes a request's cache_salt into the hash of the sequence's first block and publishes it in that block's BlockStored extra_keys, but the normalizer kept only 64-hex MM ids. Salted and unsalted chains with the same tokens then shared tree edges while carrying different engine hashes: the tree keeps one engine hash per edge position, so the second chain's children were rejected as ParentBlockNotFound, and probes scored salted prefixes as reusable by anyone. In a BlockStored with no parent, a bare string in block 0 that is neither an MM id nor the event's LoRA name is the salt. It joins that block's MM ids as cache_salt_extra_hash(salt): a 64-hex salt parses like an MM id, any other salt is its XXH3-64. Non-root events and other blocks are unchanged, as is extra_keys_to_block_mm_infos for existing callers. deepapi's probe hashes the salt the same way under the per-model kv_probe_cache_salt flag; the tests pin vectors shared with it. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Shang-Pin
marked this pull request as ready for review
October 19, 2026 21:46
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
vLLM mixes a request's
cache_saltinto the hash of the sequence's first block and publishes it in that block's BlockStoredextra_keys. The normalizer kept only 64-hex MM ids, which caused two problems:ParentBlockNotFound. This is the same failure plain image hashing caused in standalone-indexer: hash image blocks from tokens only #43/standalone-indexer (h24 line): hash image blocks from tokens only #44.This change:
lora_nameis the salt. vLLM's key order islora + mm + [cache_salt only when start_token_idx == 0] + prompt_embeds.cache_salt_extra_hash(salt). A 64-hex salt parses like an MM id; any other salt hashes to its XXH3-64. A salted block therefore hashes asxxh3(tokens LE ++ sorted(mm ids + salt) LE, seed), with no new hash scheme.extra_keys_to_block_mm_infos(used bylib/llm) are unchanged. Unsalted traffic hashes exactly as before.kv_probe_cache_saltflag (deepinfra/backend PR linked below). Tests pin hash vectors shared with deepapi's tests.Known gap, same as for images:
/kv_recoverTreeDumps carry token-only hashes, so salted blocks restored at startup stay plain until evicted.Validation
cargo test -p dynamo-kv-router --lib: 555 passed on both lines (rustc 1.93.1). This includes 5 newzmq_wiretests:xxhash.Rollout
Roll per model, together with the deepapi flag: indexer images first, then
i models -n <model> feature-flags kv_probe_cache_salt.🤖 Generated with Claude Code