-
-
Notifications
You must be signed in to change notification settings - Fork 11.3k
[Fix] Fix llama4 modelopt weight loading error #22107
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
[Fix] Fix llama4 modelopt weight loading error #22107
Conversation
Signed-off-by: jiahanc <173873397+jiahanc@users.noreply.github.com>
|
👋 Hi! Thank you for contributing to the vLLM project. 💬 Join our developer Slack at https://slack.vllm.ai to discuss your PR in #pr-reviews, coordinate on features in #feat- channels, or join special interest groups in #sig- channels. Just a reminder: PRs would not trigger full CI run by default. Instead, it would only run Once the PR is approved and ready to go, your PR reviewer(s) can run CI to test the changes comprehensively before merging. To run CI, PR reviewers can either: Add 🚀 |
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 addresses a KeyError that occurs when loading weights from the updated modelopt Llama4-Maverick FP8 checkpoint. The fix involves updating the weight renaming logic in _rename_weight_for_modelopt_checkpoint to correctly handle weight names that may or may not already have the language_model.model. prefix.
The changes are well-targeted and effectively resolve the issue. The logic for creating the renamed variable is sound, and the subsequent refactoring to use this variable throughout the function simplifies the code and removes redundancy. The fix appears correct and robust for its intended purpose. I have no further comments.
|
Hi @mgoin , may you help review this fix PR? |
|
@jiahanc Could you run a test on https://huggingface.co/nvidia/Llama-4-Scout-17B-16E-Instruct-FP8 as well? |
Sure. |
Thanks - the scores are a bit lower than here: |
Signed-off-by: jiahanc <173873397+jiahanc@users.noreply.github.com> Co-authored-by: mgoin <mgoin64@gmail.com>
Signed-off-by: jiahanc <173873397+jiahanc@users.noreply.github.com> Co-authored-by: mgoin <mgoin64@gmail.com> Signed-off-by: Jinzhen Lin <linjinzhen@hotmail.com>
Signed-off-by: jiahanc <173873397+jiahanc@users.noreply.github.com> Co-authored-by: mgoin <mgoin64@gmail.com> Signed-off-by: Noam Gat <noamgat@gmail.com>
Signed-off-by: jiahanc <173873397+jiahanc@users.noreply.github.com> Co-authored-by: mgoin <mgoin64@gmail.com> Signed-off-by: Paul Pak <paulpak58@gmail.com>
Signed-off-by: jiahanc <173873397+jiahanc@users.noreply.github.com> Co-authored-by: mgoin <mgoin64@gmail.com> Signed-off-by: Diego-Castan <diego.castan@ibm.com>
Signed-off-by: jiahanc <173873397+jiahanc@users.noreply.github.com> Co-authored-by: mgoin <mgoin64@gmail.com>
Signed-off-by: jiahanc <173873397+jiahanc@users.noreply.github.com> Co-authored-by: mgoin <mgoin64@gmail.com>
Essential Elements of an Effective PR Description Checklist
supported_models.mdandexamplesfor a new model.Purpose
modelopt Llama4-Maverick FP8 checkpoint was updated and vLLM has error when using the latest checkpoint:
Fix the logic in weight loading and processing to fit the new checkpoint
Test Plan
Test Result
(Optional) Documentation Update