Skip to content

Conversation

@HDCharles
Copy link
Collaborator

@HDCharles HDCharles commented Oct 22, 2025

SUMMARY:
adding e2e tests for MoE

also small fix so scheme: None doesn't error

we ignore all but first N layers of int4 because in e2e run on one H100 it takes about 2.5 minutes per expert layer so running all 48 layers would result in ~ 2 hours of additional test time.

TEST PLAN:
in progress: https://github.com/neuralmagic/llm-compressor-testing/actions/runs/19169597134

local (after disabling the cadence skip)
export TEST_DATA_FILE="${REPOS}/llm-compressor/tests/e2e/vLLM/configs/fp8_dynamic_per_tensor_moe.yaml"
pytest tests/e2e/vLLM/test_vllm.py -vs 2>&1 | tee log-fp8.log

export TEST_DATA_FILE="${REPOS}/llm-compressor/tests/e2e/vLLM/configs/w4a16_grouped_quant.yaml"
pytest tests/e2e/vLLM/test_vllm.py -vs 2>&1 | tee log-int4.log

export TEST_DATA_FILE="${REPOS}/llm-compressor/tests/e2e/vLLM/configs/fp4_nvfp4_moe.yaml"
pytest tests/e2e/vLLM/test_vllm.py -vs 2>&1 | tee log-fp4.log

@HDCharles HDCharles marked this pull request as draft October 22, 2025 14:58
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @HDCharles, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request primarily focuses on expanding the test coverage for advanced model architectures by introducing new end-to-end tests for Mixture-of-Experts (MoE) models within the vLLM framework. These tests cover various quantization configurations, ensuring broader validation of model performance and stability. Additionally, a minor but important change was made to improve the robustness of a core utility function, allowing it to handle a wider range of model implementations without error.

Highlights

  • New MoE E2E Tests: Added three new end-to-end test configurations for Mixture-of-Experts (MoE) models, specifically targeting the Qwen3-Omni-30B-A3B-Instruct model with NVFP4, FP8_DYNAMIC, and W4A16 quantization schemes.
  • Robustness Improvement: Enhanced the untie_word_embeddings utility function to gracefully handle models that do not implement get_input_embeddings or get_output_embeddings, preventing potential crashes and logging a warning instead.
  • Test Cadence Logic Adjustment: Temporarily commented out the pytest.skip logic in test_vllm.py that previously skipped tests based on a mismatch with the CADENCE environment variable.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a 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 introduces new end-to-end (e2e) tests for MoE (Mixture of Experts) models and includes a modification to the untie_word_embeddings function to handle cases where get_input_embeddings and get_output_embeddings are not implemented. The new tests are defined in YAML configuration files, and the test_vllm.py file is updated to accommodate these new configurations. The untie_word_embeddings function is updated to handle NotImplementedError exceptions.

@github-actions
Copy link

👋 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.

@HDCharles HDCharles force-pushed the 02_moe_e2e branch 2 times, most recently from 3322e08 to 8b3ace7 Compare November 3, 2025 19:38
@HDCharles HDCharles changed the base branch from main to fix_qwen3 November 3, 2025 19:39
@HDCharles HDCharles force-pushed the 02_moe_e2e branch 2 times, most recently from a08b69f to d227968 Compare November 3, 2025 19:44
@HDCharles HDCharles marked this pull request as ready for review November 3, 2025 19:52
@HDCharles HDCharles changed the title Adding new MoE e2e tests [wip] Adding new MoE e2e tests Nov 3, 2025
@HDCharles HDCharles added ready When a PR is ready for review fp8 For any issue / PR related to FP8 support nvfp4 For any PR / issue related to NVFP4 support wNa16 Anything related to weight-only int-quantized support labels Nov 3, 2025
@HDCharles HDCharles requested review from dsikka and kylesayrs November 3, 2025 20:06
Base automatically changed from fix_qwen3 to main November 3, 2025 23:44
@HDCharles HDCharles force-pushed the 02_moe_e2e branch 3 times, most recently from f0c7d33 to a9d56db Compare November 5, 2025 18:36
kylesayrs
kylesayrs previously approved these changes Nov 5, 2025
Copy link
Collaborator

@kylesayrs kylesayrs left a comment

Choose a reason for hiding this comment

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

In the future can you explain in the PR description things like why you're ignoring the first 20 layers? I assume this is just to cut runtime (which is a good enough reason for me)

Copy link
Collaborator

@dsikka dsikka left a comment

Choose a reason for hiding this comment

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

Please add generated checkpoints to your PR description

Copy link
Collaborator

@dsikka dsikka left a comment

Choose a reason for hiding this comment

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

Do you have a run where the e2e test passed? The job you linked failed

@HDCharles
Copy link
Collaborator Author

Do you have a run where the e2e test passed? The job you linked failed

not yet, failures are due to being unable to upload the model, trying to get it to run

Copy link
Collaborator

@brian-dellabetta brian-dellabetta left a comment

Choose a reason for hiding this comment

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

nice! LGTM pending other comments

Summary

new e2e tests for MoE + various techniques

Signed-off-by: HDCharles <charlesdavidhernandez@gmail.com>
Summary

Signed-off-by: HDCharles <charlesdavidhernandez@gmail.com>
Summary

Signed-off-by: HDCharles <charlesdavidhernandez@gmail.com>
Summary

Signed-off-by: HDCharles <charlesdavidhernandez@gmail.com>
Title

Summary

Signed-off-by: HDCharles <charlesdavidhernandez@gmail.com>
Summary

Signed-off-by: HDCharles <charlesdavidhernandez@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fp8 For any issue / PR related to FP8 support nvfp4 For any PR / issue related to NVFP4 support ready When a PR is ready for review wNa16 Anything related to weight-only int-quantized support

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants