Skip to content

[Example] Add Mixed W2A16 and W4A16 MoE Example - #2940

Merged
dsikka merged 4 commits into
vllm-project:mainfrom
yiliu30:w2a16-moe
Sep 1, 2026
Merged

dsikka merged 4 commits into
vllm-project:mainfrom
yiliu30:w2a16-moe

Conversation

@yiliu30

@yiliu30 yiliu30 commented Jul 20, 2026

Copy link
Copy Markdown
Collaborator

Signed-off-by: yiliu30 yi4.liu@intel.com

SUMMARY:
"please provide a brief summary"

# vllm ({'pretrained': '/home/yiliu7/workspace/llmc-ds/examples/autoround/quantization_wNa16/Qwen3-30B-A3B-Instruct-2507-Attn4bits-Mlp2bits-AutoRound-200iters', 'tensor_parallel_size': 1, 'max_model_len': 8192, 'max_num_batched_tokens': 32768, 'max_num_seqs': 128, 'add_bos_token': True, 'gpu_memory_utilization': 0.4, 'dtype': 'bfloat16', 'max_gen_toks': 2048, 'enable_prefix_caching': False}), gen_kwargs: ({}), limit: 1000.0, num_fewshot: None, batch_size: 128
# |Tasks|Version|     Filter     |n-shot|  Metric   |   |Value|   |Stderr|
# |-----|------:|----------------|-----:|-----------|---|----:|---|-----:|
# |gsm8k|      3|flexible-extract|     5|exact_match|↑  |0.909|±  |0.0091|
# |     |       |strict-match    |     5|exact_match|↑  |0.909|±  |0.0091|

The evluation is depends on vllm's PR vllm-project/vllm#48918

@github-actions

Copy link
Copy Markdown

👋 Hi! Thank you for contributing to llm-compressor. Please add the ready label when the PR is ready for review.

Note: This is required to complete the testing suite, please only add the label once the PR is code complete and local testing has been performed.

@coderabbitai

coderabbitai Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: a26e80aa-808b-4014-8cc4-834ddb17615e

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@yiliu30 yiliu30 changed the title add mixed w2a16 w4a16 moe example [Example] Add Mixed W2A16 and W4A16 MoE Example Jul 20, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

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 introduces a new example script, qwen3_moe_example_mixed_w2a16_w4a16.py, demonstrating mixed-precision quantization (W2A16 and W4A16) using AutoRound on a Qwen MoE model. The feedback suggests three key improvements: replacing the non-public model ID with a publicly available one, loading the model with torch_dtype="auto" to prevent potential out-of-memory errors, and increasing the number of calibration iterations from 2 to a standard value like 200 to ensure high-quality quantization.

Comment thread examples/autoround/quantization_wNa16/qwen3_moe_example_mixed_w2a16_w4a16.py Outdated
Comment thread examples/autoround/quantization_wNa16/qwen3_moe_example_mixed_w2a16_w4a16.py Outdated
@mergify mergify Bot added documentation Improvements or additions to documentation two-reviews When a PR requires two reviews labels Jul 20, 2026
@mergify

mergify Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Merge Protections

🟢 All 2 merge protections satisfied — ready to merge.

Show 2 satisfied protections

🟢 Require one maintainer review

All PRs must have at least one approving review from a maintainer before merging.

  • #changes-requested-reviews-by = 0
  • any of:
    • approved-reviews-by=dsikka
    • approved-reviews-by=kylesayrs
    • approved-reviews-by=HDCharles
    • approved-reviews-by=brian-dellabetta
    • approved-reviews-by=yiliu30

🟢 Require two reviews

PRs labelled "two-reviews" must have at least two approving reviews before merging.

  • #approved-reviews-by >= 2
  • #changes-requested-reviews-by = 0

@yiliu30 yiliu30 added the ready When a PR is ready for full CI testing before merge label Aug 25, 2026
Comment thread examples/autoround/quantization_wNa16/qwen3_moe_example_mixed_w2a16_w4a16.py Outdated
@mergify

mergify Bot commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

The quality checks have failed. Please run make style and make quality under
the root directory to adddress the lint failures. You will need to install the
dev optional install to get the required linting packages:
https://github.com/vllm-project/llm-compressor/blob/main/CONTRIBUTING.md

yiliu30 and others added 4 commits August 31, 2026 16:33
Signed-off-by: yiliu30 <yi4.liu@intel.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Signed-off-by: Yi Liu <yi4.liu@intel.com>
…w2a16_w4a16.py

Co-authored-by: Kyle Sayers <kylesayrs@gmail.com>
Signed-off-by: Yi Liu <yi4.liu@intel.com>
Signed-off-by: yiliu30 <yi4.liu@intel.com>
@dsikka
dsikka merged commit b5e4677 into vllm-project:main Sep 1, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation ready When a PR is ready for full CI testing before merge two-reviews When a PR requires two reviews

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants