Revert "[Feature] GLM5.2 rotation v2 Dspark support" - #15564
Revert "[Feature] GLM5.2 rotation v2 Dspark support"#15564Tflowers-0129 wants to merge 1 commit into
Conversation
This reverts commit 89df31d.
|
👋 Hi! Thank you for contributing to the vLLM Ascend project. The following points will speed up your PR merge:
If CI fails, you can run linting and testing checks locally according Contributing and Testing. Tip 💡 Consider Linking a Related Issue or RFCYour PR title contains the [Feature] tag, indicating a bug fix or new feature. Linking a related issue or RFC in the PR description is strongly encouraged — it gives reviewers helpful context and speeds up the review. You can use any of these keywords:
🙏 Thanks for helping us keep the project well-organized! |
Summary of ChangesHello, 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 reverts the previously implemented 'GLM5.2 rotation v2 Dspark support' feature. The changes involve removing DSpark-specific test suites and associated logic, while refactoring core rotation utility functions to a more appropriate location within the llama_eagle3 model module to maintain better code organization and dependency management. Highlights
New Features🧠 You can now enable Memory (public preview) to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. 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 the 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 counterproductive. 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. Footnotes
|
There was a problem hiding this comment.
Code Review
Suggested PR Title:
[Test][Misc] Refactor rotation utility functions and clean up dspark speculator testsSuggested PR Summary:
### What this PR does / why we need it?
This pull request refactors the `get_rotation_path` and `get_rotation_matrix` utility functions by moving them from `vllm_ascend/utils.py` to `vllm_ascend/models/llama_eagle3.py` and updating all corresponding imports. Additionally, it removes the `load_draft_model` override in `AscendDSparkSpeculator` and cleans up related DSpark speculative decoding tests and configurations.
Feedback:
- In `vllm_ascend/models/llama_eagle3.py`, the `get_rotation_path` function should catch `TypeError` and `AttributeError` in addition to `KeyError` when accessing nested dictionary keys in `quant_description` to prevent potential runtime crashes if the configuration structure is unexpected.
### Does this PR introduce _any_ user-facing change?
No.
### How was this patch tested?
The changes are tested by updating existing unit and end-to-end tests, including refactoring `test_glm5_2_mtp_full_decode_only` to directly assert metrics.| try: | ||
| quant_description = quant_config.quant_description | ||
| rotation_relative_path = quant_description["optional"]["quarot"]["rotation_map"]["global_rotation"] | ||
| except KeyError: | ||
| return None |
There was a problem hiding this comment.
If quant_description is None or contains nested values that are not dictionaries (e.g., if "optional" is None), subscripting them will raise a TypeError or AttributeError. Since only KeyError is caught, this can lead to an unhandled exception and runtime crash.
To make this defensively robust, catch TypeError and AttributeError in addition to KeyError.
| try: | |
| quant_description = quant_config.quant_description | |
| rotation_relative_path = quant_description["optional"]["quarot"]["rotation_map"]["global_rotation"] | |
| except KeyError: | |
| return None | |
| try: | |
| quant_description = quant_config.quant_description | |
| rotation_relative_path = quant_description["optional"]["quarot"]["rotation_map"]["global_rotation"] | |
| except (KeyError, TypeError, AttributeError): | |
| return None |
|
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
Reverts #15210