[NIXL][TURBOQUANT] Support turboquant in NIXL KV connector - #40858
[NIXL][TURBOQUANT] Support turboquant in NIXL KV connector#40858skavulya wants to merge 19 commits into
Conversation
|
@xinyu-intel @jikunshang @xuechendi Please review |
There was a problem hiding this comment.
Code Review
This pull request adds support for TurboQuant (TQ) in the KV transfer connector, specifically for handling packed K+V tensors and per-layer block length validation in models with mixed layer types. The review feedback highlights a logic error in register_kv_caches where tensor_size_bytes validation could fail for mixed-layer models. Additionally, the reviewer suggests refactoring the tp_ratio scaling validation in _validate_remote_agent_handshake to remove redundant code between the TQ and standard execution paths.
83c9f52 to
8d53546
Compare
NickLucche
left a comment
There was a problem hiding this comment.
Hey thanks for the work.
Afaiu, the state of this feature is mostly useful for consumer/local deployments with very limited hbm, trading-off e2e perf @mgoin .
Therefore I am very hesitant to consider this feature here until we can prove benefits that target medium/large-scale high-end interconnected GPUs, which is the whole point of this connector.
Happy to re-evaluate when that's the case!
|
Thanks @NickLucche for your insight. We are working on this feature as part of our efforts to enable heterogeneous disaggregated serving with Intel XPUs and Nvidia GPUs. We would be happy to collect benchmarking data for your consideration. There is a request for this feature on Dynamo repo on ai-dynamo/dynamo#8271 |
652347f to
58380b5
Compare
|
Thanks, @skavulya , overall, I think this PR is clear and LGTM. Please provide background / tested_platform / test_script / accuracy check / coverage (full_attn, MLA, hybrid_attn) / perf impact @NickLucche , PTAL |
58380b5 to
066a2ec
Compare
066a2ec to
7e1c881
Compare
|
@NickLucche @mgoin @xuechendi @vibhavagarwal5 I ran a benchmark on H200 NVL with Qwen/Qwen3-30B-A3B-Thinking-2507 (TP=1, 8K ISL/1K OSL). At max-concurrency 256, turboquant_4bit_nc TTFT is lower because of smaller queuing delays. However, the issue is turboquant's decode latency where TPOT is 7x slower than FP8. _tq_decode_stage1 is the bottleneck based on the pytorch profiles below.
FP8 KV cache Decoder Profile — 8.29ms/step <style> </style>
TurboQuant 4-bit KV Cache Decoder Profile — 21.84ms/step <style> </style>
|
92c3ca3 to
2f12588
Compare
|
This pull request has merge conflicts that must be resolved before it can be |
| if tensor_size_bytes is None: | ||
| tensor_size_bytes = curr_tensor_size_bytes | ||
| # Track baseline sizes separately for TQ and non-TQ layers, | ||
| # since TQ packs K+V into a single region with a different | ||
| # size than standard FA's separate K/V regions. | ||
| if isinstance(layer_spec, TQFullAttentionSpec): | ||
| if tq_tensor_size_bytes is None: | ||
| tq_tensor_size_bytes = curr_tensor_size_bytes | ||
| else: | ||
| if tensor_size_bytes is None: | ||
| tensor_size_bytes = curr_tensor_size_bytes |
There was a problem hiding this comment.
@skavulya can we not specialize tq within the nixl connector? We also have nvfp4 kv cache in flashinfer and per-token int8 in triton attention, so it would be good to use a standard approach for all of these based on the block structure
There was a problem hiding this comment.
Hi @mgoin. Thanks for the review. I had implemented those changes to support scenarios with mixed full-attention and TurboQuant layers, since TurboQuant skips certain layers to preserve accuracy.
I rebased my PR and updated it to align with the recent NIXL connector changes in main, which have significantly simplified the implementation for your review
2f12588 to
f3a182c
Compare
Signed-off-by: Soila Kavulya <soila.p.kavulya@intel.com>
Signed-off-by: Soila Kavulya <soila.p.kavulya@intel.com>
|
Documentation preview: https://vllm--40858.org.readthedocs.build/en/40858/ |
TRITON_ATTN (forced on AMD CI) doesn't support turboquant kv_cache_dtype, and explicit --attention-backend selection has no fallback, so the AMD hybrid-SSM accuracy sweep failed. Turboquant needs its dedicated backend, which is only reachable via auto-selection, so skip that entry whenever a backend override is active. Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com> Signed-off-by: Soila Kavulya <soila.p.kavulya@intel.com>
|
Hi @skavulya, 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, |
Signed-off-by: Soila Kavulya <soila.p.kavulya@intel.com>
|
@mgoin @NickLucche The nixl kv connector in main no longer needs special handling for turboquant because it deleted the assertion that enforced that tensor bytes were identical across all layers. The only pending change from this PR the turboquant tests. I excluded AMD GPUs from the accuracy test the attention backend used by AMD CI for Hybrid SSM did not support turboquant kv_cache_dtype |
Add support for turboquant KV cache to NIXL workers
Purpose
Test Plan
Test Result
Essential Elements of an Effective PR Description Checklist
supported_models.mdandexamplesfor a new model.