Skip to content

Conversation

@sagiahrac
Copy link
Contributor

@sagiahrac sagiahrac commented Oct 27, 2025

Purpose

Currently, the BlockStored KV event records the lora_id associated with a cache block.
This PR replaces the use of lora_id with the lora_name in BlockStored events, aligning the event metadata with the new deterministic hashing scheme introduced in #27211.
With this change, the same block hash can be reliably reproduced across runs and instances, allowing cache lookups, routing, and sharing.

Test Plan

The relevant test files were updated.

Test Result

All updated tests pass.

Signed-off-by: Sage Ahrac <sagiahrak@gmail.com>
@mergify
Copy link

mergify bot commented Oct 27, 2025

Documentation preview: https://vllm--27577.org.readthedocs.build/en/27577/

@mergify mergify bot added documentation Improvements or additions to documentation v1 kv-connector labels Oct 27, 2025
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request replaces lora_id with lora_name in the BlockStored KV event to align with the deterministic hashing scheme. The code changes involve modifications in kv_events.py, kv_transfer/kv_connector/v1/offloading_connector.py, v1/core/block_pool.py, examples/online_serving/kv_events_subscriber.py, tests/v1/engine/test_engine_core_client.py, and tests/v1/kv_connector/unit/test_offloading_connector.py. The changes look correct and necessary for the intended purpose.

@vMaroon
Copy link
Contributor

vMaroon commented Oct 27, 2025

I think beyond reproducing KV-block hashes under the KV-cache interoperability work, the BlockStored event carries in it the vLLM hashes, and all the information used in cooking them: token-ids, block-size, and previously lora-id. After #27211, the latter changed to lora-name, therefore it must be changed here too.

@jeejeelee jeejeelee requested a review from zhuohan123 October 28, 2025 01:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation kv-connector v1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants