Skip to content

Conversation

@tywuAMD
Copy link
Contributor

@tywuAMD tywuAMD commented Mar 10, 2025

Issue Description
Observed the following error message when trying to deploy DeepSeek R1 Unsloth GGUF quantized model with MLA enabled on Triton MLA backend:

ERROR 03-10 04:33:58 [multiproc_worker_utils.py:242]   File "vllm/attention/layer.py", line 329, in unified_attention
ERROR 03-10 04:33:58 [multiproc_worker_utils.py:242]     return self.impl.forward(self, query, key, value, kv_cache, attn_metadata)
ERROR 03-10 04:33:58 [multiproc_worker_utils.py:242]   File "vllm/attention/backends/mla/common.py", line 1537, in forward
ERROR 03-10 04:33:58 [multiproc_worker_utils.py:242]     decode_q_nope = self._q_proj_and_k_up_proj(decode_hs_or_q_c)
ERROR 03-10 04:33:58 [multiproc_worker_utils.py:242]   File "vllm/attention/backends/mla/common.py", line 1089, in _q_proj_and_k_up_proj
ERROR 03-10 04:33:58 [multiproc_worker_utils.py:242]     if is_fp8(self.W_Q_UK):
ERROR 03-10 04:33:58 [multiproc_worker_utils.py:242] AttributeError: 'TritonMLAImpl' object has no attribute 'W_Q_UK'

Fix
It turns out that W_Q_UK never got initialized. To fix it, call _process_weights_after_loading() right after model loading to properly process the weight attributes.

Local Verification
With this PR, the mentioned error message cannot be reproduced anymore, and the DeepSeek GGUF model can be deployed successfully.

@github-actions
Copy link

👋 Hi! Thank you for contributing to the vLLM project.

💬 Join our developer Slack at https://slack.vllm.ai to discuss your PR in #pr-reviews, coordinate on features in #feat- channels, or join special interest groups in #sig- channels.

Just a reminder: PRs would not trigger full CI run by default. Instead, it would only run fastcheck CI which starts running only a small and essential subset of CI tests to quickly catch errors. You can run other CI tests on top of those by going to your fastcheck build on Buildkite UI (linked in the PR checks section) and unblock them. If you do not have permission to unblock, ping simon-mo or khluu to add you in our Buildkite org.

Once the PR is approved and ready to go, your PR reviewer(s) can run CI to test the changes comprehensively before merging.

To run CI, PR reviewers can either: Add ready label to the PR or enable auto-merge.

🚀

@cjackal
Copy link
Contributor

cjackal commented Mar 12, 2025

Don't know why but bot failed to ping vLLM maintainers; I guess @Isotr0py is the right person here.

@Isotr0py Isotr0py enabled auto-merge (squash) March 12, 2025 17:12
@github-actions github-actions bot added the ready ONLY add when PR is ready to merge/full CI is needed label Mar 12, 2025
Copy link
Member

@mgoin mgoin left a comment

Choose a reason for hiding this comment

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

LGTM!

@mgoin mgoin changed the title [BugFix][TritonMLA] Process weights after model loading [BugFix][TritonMLA] Process weights after model loading for GGUF Mar 13, 2025
@vllm-bot vllm-bot merged commit 128bf75 into vllm-project:main Mar 13, 2025
43 of 45 checks passed
richardsliu pushed a commit to richardsliu/vllm that referenced this pull request Mar 14, 2025
lulmer pushed a commit to lulmer/vllm that referenced this pull request Apr 7, 2025
shreyankg pushed a commit to shreyankg/vllm that referenced this pull request May 3, 2025
RichardoMrMu pushed a commit to RichardoMrMu/vllm that referenced this pull request May 12, 2025
@tywuAMD tywuAMD deleted the FIX_MLA_NO_ATTR branch June 3, 2025 07:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready ONLY add when PR is ready to merge/full CI is needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants