[PD][Bugfix] Fix KV Cache sharing with HMA#44629
Open
NickLucche wants to merge 3 commits into
Open
Conversation
Contributor
|
Hi @NickLucche, the pre-commit checks have failed. Please run: uv pip install pre-commit>=4.5.1
pre-commit install
pre-commit run --all-filesThen, commit the changes and push to your branch. For future commits, Tip Is
|
1 similar comment
Contributor
|
Hi @NickLucche, the pre-commit checks have failed. Please run: uv pip install pre-commit>=4.5.1
pre-commit install
pre-commit run --all-filesThen, commit the changes and push to your branch. For future commits, Tip Is
|
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.
HMA is now the default way to serve models even when a connector is provided as of #41847.
Unfortunately we missed covering an important feature that is layers that share the same KV cache tensor, which currently crashes on main when attempting to fetch the corresponding
layer_spec.The fix is straightforward, as we ensure that layers that do not need a kv cache are not present in the kv_cache_spec at setup time
vllm/vllm/v1/worker/gpu_model_runner.py
Lines 7441 to 7459 in 3da29aa
All we have to do in the PD connector is skip registration for those layers, like we did before supporting HMA.
Tested with a
google/gemma-4-E2B-itPD deploymentand added test case to our eval suite