Skip to content

[Bugfix] Fixes for new marlin moe usage #18017

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

mgoin
Copy link
Member

@mgoin mgoin commented May 12, 2025

FIX #16850 (comment)

Found using failing tests in "Weight Loading Multiple GPU Test - Large Models" on buildkite: https://buildkite.com/vllm/ci/builds/19754/steps?jid=0196bd80-d187-4367-af2f-a8fada079333#/43-1306

Minimal reproductions

Issue: Passing in group_size=None for channelwise models in compressed-tensors format

vllm serve nm-testing/Mixtral-8x7B-Instruct-v0.1-W4A16-channel-quantized -tp 2 --load-format dummy
...
(VllmWorker rank=1 pid=2902434) ERROR 05-12 18:46:04 [multiproc_executor.py:487]   File "/home/mgoin/code/vllm/vllm/model_executor/layers/fused_moe/layer.py", line 498, in __init__
(VllmWorker rank=1 pid=2902434) ERROR 05-12 18:46:04 [multiproc_executor.py:487]     self.quant_method = quant_config.get_quant_method(self, prefix)
(VllmWorker rank=1 pid=2902434) ERROR 05-12 18:46:04 [multiproc_executor.py:487]                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(VllmWorker rank=1 pid=2902434) ERROR 05-12 18:46:04 [multiproc_executor.py:487]   File "/home/mgoin/code/vllm/vllm/model_executor/layers/quantization/compressed_tensors/compressed_tensors.py", line 101, in get_quant_method
(VllmWorker rank=1 pid=2902434) ERROR 05-12 18:46:04 [multiproc_executor.py:487]     return CompressedTensorsMoEMethod.get_moe_method(self, layer)
(VllmWorker rank=1 pid=2902434) ERROR 05-12 18:46:04 [multiproc_executor.py:487]            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(VllmWorker rank=1 pid=2902434) ERROR 05-12 18:46:04 [multiproc_executor.py:487]   File "/home/mgoin/code/vllm/vllm/model_executor/layers/quantization/compressed_tensors/compressed_tensors_moe.py", line 62, in get_moe_method
(VllmWorker rank=1 pid=2902434) ERROR 05-12 18:46:04 [multiproc_executor.py:487]     if not check_moe_marlin_supports_layer(layer,
(VllmWorker rank=1 pid=2902434) ERROR 05-12 18:46:04 [multiproc_executor.py:487]            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(VllmWorker rank=1 pid=2902434) ERROR 05-12 18:46:04 [multiproc_executor.py:487]   File "/home/mgoin/code/vllm/vllm/model_executor/layers/quantization/utils/marlin_utils.py", line 179, in check_moe_marlin_supports_layer
(VllmWorker rank=1 pid=2902434) ERROR 05-12 18:46:04 [multiproc_executor.py:487]     intermediate_size_per_partition % max(64, group_size) == 0 and \
(VllmWorker rank=1 pid=2902434) ERROR 05-12 18:46:04 [multiproc_executor.py:487]                                       ^^^^^^^^^^^^^^^^^^^
(VllmWorker rank=1 pid=2902434) ERROR 05-12 18:46:04 [multiproc_executor.py:487] TypeError: '>' not supported between instances of 'NoneType' and 'int'

Issue: The check for apply_router_weight_on_input in GPTQMarlinMoEMethod did not check boolean value

vllm serve TheBloke/Mixtral-8x7B-v0.1-GPTQ -tp 2 --load-format dummy --enforce-eager
...
(VllmWorker rank=0 pid=2933636) ERROR 05-12 19:06:21 [multiproc_executor.py:522]   File "/home/mgoin/code/vllm/vllm/model_executor/layers/fused_moe/layer.py", line 875, in forward_impl
(VllmWorker rank=0 pid=2933636) ERROR 05-12 19:06:21 [multiproc_executor.py:522]     final_hidden_states = self.quant_method.apply(
(VllmWorker rank=0 pid=2933636) ERROR 05-12 19:06:21 [multiproc_executor.py:522]                           ^^^^^^^^^^^^^^^^^^^^^^^^
(VllmWorker rank=0 pid=2933636) ERROR 05-12 19:06:21 [multiproc_executor.py:522]   File "/home/mgoin/code/vllm/vllm/model_executor/layers/quantization/gptq_marlin.py", line 614, in apply
(VllmWorker rank=0 pid=2933636) ERROR 05-12 19:06:21 [multiproc_executor.py:522]     raise NotImplementedError(
(VllmWorker rank=0 pid=2933636) ERROR 05-12 19:06:21 [multiproc_executor.py:522] NotImplementedError: Apply router weight on input is not supported forfused Marlin MoE method.

Signed-off-by: mgoin <mgoin64@gmail.com>
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.

🚀

@robertgshaw2-redhat robertgshaw2-redhat enabled auto-merge (squash) May 12, 2025 19:17
@github-actions github-actions bot added the ready ONLY add when PR is ready to merge/full CI is needed label May 12, 2025
@mgoin mgoin added the bug Something isn't working label May 12, 2025
@mgoin mgoin added this to the v0.9.0 milestone May 13, 2025
@robertgshaw2-redhat robertgshaw2-redhat merged commit 1df491c into vllm-project:main May 13, 2025
97 checks passed
mawong-amd pushed a commit to ROCm/vllm that referenced this pull request May 14, 2025
Signed-off-by: mgoin <mgoin64@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working 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.

2 participants