add support for MiMo-V2-Flash#1718
Merged
Merged
Conversation
Signed-off-by: n1ck-guo <heng.guo@intel.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Adds compatibility patches to support loading/running MiMo-V2-Flash (and some legacy remote-code RoPE behaviors) under newer transformers, plus improves FP8 block dequant handling when scale tensors are over-provisioned.
Changes:
- Relax FP8 block scale shape assumptions by rejecting undersized scales and padding weights when scales are over-provisioned.
- Apply model-instance monkey patches immediately after
llm_load_model()loads/evals the model. - Add
transformerscompatibility shims for legacy RoPE default init and MiMo-V2-Flash attention helper call signatures.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| auto_round/utils/weight_handler.py | Accept over-provisioned FP8 scale tensors by padding weights; raise early for undersized scales. |
| auto_round/utils/model.py | Invoke monkey_patch_model(model) after model load to apply instance-level compatibility patches. |
| auto_round/utils/common.py | Add RoPE default init compatibility, patch _init_weights for legacy RotaryEmbedding, and patch MiMo attention helper. |
Contributor
Author
|
/azp run Unit-Test-CUDA-AutoRound |
|
Azure Pipelines successfully started running 1 pipeline(s). |
yiliu30
approved these changes
Apr 24, 2026
Contributor
Author
|
/azp run Unit-Test-CUDA-AutoRound |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Contributor
Author
|
/azp run Unit-Test-CUDA-AutoRound |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Contributor
Author
|
/azp run Unit-Test-CUDA-AutoRound |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Contributor
Author
|
/azp run Unit-Test-CUDA-AutoRound |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Contributor
Author
|
/azp run Unit-Test-CUDA-AutoRound |
|
Azure Pipelines successfully started running 1 pipeline(s). |
lvliang-intel
pushed a commit
that referenced
this pull request
May 12, 2026
Signed-off-by: n1ck-guo <heng.guo@intel.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Please briefly describe your main changes, the motivation.
Type of Change
Related Issues
Fixes or relates to #
Checklist Before Submitting