fix: allow HMA with KV events when explicitly enabled#39269
Open
sara4dev wants to merge 1 commit into
Open
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request modifies the configuration logic in vllm/config/vllm.py to allow the hybrid KV cache manager to be used with KV events if explicitly enabled via the scheduler configuration. Previously, the hybrid KV cache manager was automatically disabled whenever KV events were configured. I have no feedback to provide.
b13133f to
944b63e
Compare
The Hybrid Memory Allocator (HMA) is unconditionally disabled when kv_events_config is set, even when the user explicitly passes --no-disable-hybrid-kv-cache-manager. This blocks disaggregated serving for hybrid models (Mamba+attention) like Nemotron-H, despite NixlConnector already implementing SupportsHMA with full Mamba support (_has_mamba detection, MAMBA2_ATTN backend handling). Fix: Only auto-disable HMA for KV events when the user has not explicitly opted in. When --no-disable-hybrid-kv-cache-manager is passed (disable_hybrid_kv_cache_manager=False), respect it. Tested with: - NVIDIA Nemotron-3-Super-120B-A12B-NVFP4 (hybrid Mamba+attention) - Disaggregated prefill/decode via NixlConnector with CUDA-aware UCX - 200/200 requests successful in production benchmark Signed-off-by: sara4dev <saravanakumar.periyasamy@gmail.com>
944b63e to
c5b75ec
Compare
Contributor
|
This pull request has merge conflicts that must be resolved before it can be |
4 tasks
Contributor
|
This pull request has merge conflicts that must be resolved before it can be |
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
Allow the Hybrid Memory Allocator (HMA) to work alongside KV events when explicitly enabled via
--no-disable-hybrid-kv-cache-manager. This unblocks disaggregated serving for hybrid models (Mamba + attention) like NVIDIA Nemotron-H.The problem: HMA is unconditionally disabled when
kv_events_configis set (line 1226-1228 ofvllm/config/vllm.py), even when the user explicitly passes--no-disable-hybrid-kv-cache-manager. This blocks disaggregated serving for hybrid models despiteNixlConnectoralready implementingSupportsHMAwith full Mamba support (_has_mambadetection,MAMBA2_ATTNbackend handling).The fix: Only auto-disable HMA for KV events when the user hasn't explicitly opted in. When
--no-disable-hybrid-kv-cache-manageris passed (disable_hybrid_kv_cache_manager=False), respect it.Changes
vllm/config/vllm.py: Add check for explicit user opt-in before disabling HMA due to KV events config (+8 lines, -2 lines)Test Plan
Tested with:
Context
NixlConnector already:
SupportsHMA(kv_connector/v1/base.py)_has_mamba(nixl_connector.py:576)MAMBA2_ATTNattention backend (nixl_connector.py:1216)The config guard at line 1226 was added conservatively but creates a conflict: disaggregated mode auto-enables KV events, which then blocks HMA, making hybrid disagg impossible even though the connector supports it.
🤖 Generated with Claude Code