-
Notifications
You must be signed in to change notification settings - Fork 266
Adding new MoE e2e tests [wip] #1960
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
base: main
Are you sure you want to change the base?
Conversation
Summary of ChangesHello @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
Using Gemini Code AssistThe 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
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 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
|
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 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.
| # if os.environ.get("CADENCE", "commit") != eval_config.get("cadence"): | ||
| # pytest.skip("Skipping test; cadence mismatch") |
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.
The code that skips tests based on cadence is commented out. This means that all tests will run regardless of the CADENCE environment variable. If the intention is to temporarily disable this check, consider adding a comment explaining why it's disabled and when it should be re-enabled. If the intention is to remove the check entirely, remove the commented code.
| # if os.environ.get("CADENCE", "commit") != eval_config.get("cadence"): | |
| # pytest.skip("Skipping test; cadence mismatch") | |
| # pytest.skip("Skipping test; cadence mismatch") |
| input_embed = model.get_input_embeddings() | ||
| output_embed = model.get_output_embeddings() | ||
| except NotImplementedError as e: | ||
| logger.warning(f"cannot untie model of type {model.__class__} which doesn't have get_input_embeddings and get_output_embeddings implmented\n{e}") |
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.
The logging message includes the exception e but it's not very readable. Consider including the model's class name and a simplified error message for better clarity. Also, the word "implmented" is misspelled, it should be "implemented".
| logger.warning(f"cannot untie model of type {model.__class__} which doesn't have get_input_embeddings and get_output_embeddings implmented\n{e}") | |
| logger.warning(f"cannot untie model of type {model.__class__.__name__} which doesn't have get_input_embeddings and get_output_embeddings implemented: {type(e).__name__}") |
|
👋 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. |
SUMMARY:
adding e2e tests
TEST PLAN: