-
Notifications
You must be signed in to change notification settings - Fork 624
[Bugfix] fix kv nz accuracy bug #2988
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Signed-off-by: realliujiaxu <[email protected]>
|
👋 Hi! Thank you for contributing to the vLLM Ascend project. The following points will speed up your PR merge:
If CI fails, you can run linting and testing checks locally according Contributing and Testing. |
There was a problem hiding this 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 addresses a critical bug causing invalid output for Deepseek R1 models when enable_kv_nz is active. The root cause was an incorrect cache_mode ("PA_BLK_NZ") used during the prefill stage in vllm_ascend/attention/mla_v1.py and vllm_ascend/torchair/torchair_mla.py. The fix correctly changes this to "PA_NZ", aligning it with the cache_mode used in the decode stage. This change is correct and effectively resolves the accuracy issue as demonstrated in the pull request description.
|
It seems this introduce the break on main: Retry: https://github.com/vllm-project/vllm-ascend/actions/runs/17817506855 to confirm @jianzs BTW, please make sure every PR merged before label with |
when `enable_kv_nz` is true, output of Deepseek R1 is invalid. - vLLM version: v0.10.2 - vLLM main: vllm-project/vllm@2b85697 Signed-off-by: realliujiaxu <[email protected]>
when `enable_kv_nz` is true, output of Deepseek R1 is invalid. - vLLM version: v0.10.2 - vLLM main: vllm-project/vllm@2b85697 Signed-off-by: realliujiaxu <[email protected]> Signed-off-by: nsdie <[email protected]>
What this PR does / why we need it?
when
enable_kv_nzis true, output of Deepseek R1 is invalid.The reason is that the decode stage incorrectly usage of
torch_npu.npu_kv_rmsnorm_rope_cache. After fix:run server:
curl:
Does this PR introduce any user-facing change?
No
How was this patch tested?