Merged
Conversation
5 tasks
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.
What does this PR do?
I encountered the following error after trying out the latest commit in this branch to load a bf16 GGUF file of the Qwen3-30B-A3B model:
Upon investigation, I found that the issue arises because the code is not reading the config in this code. Thus, it uses the default
Qwen3MoeConfigto instantiate the Qwen3Moe model in Transformers, which sets num_hidden_layers to 24 by default. This does not match the actual number of layers in the GGUF files.The reason for not loading the correct config is because the code reads
GGUF_CONFIG_MAPPINGwith the architecture name updated here, butGGUF_CONFIG_MAPPINGhas its keys with the old architecture name (qwen3moe), thus is not correctly reading the necessary config.To address this, I updated L105 to reflect the updated architecture name in the
GGUF_CONFIG_MAPPINGas shown in this commit. I believe qwen2moe should be updated similarly, but I left it unchanged since I have not personally tested the Qwen2Moe architecture. I also noticed a missing parameter (head_dim) and added it at L112 in the same commit.After these changes, I confirmed that the output is generated without any issues, tested with the following code:
Thank you.
Fixes huggingface#39638
Before submitting
Pull Request section?
to it if that's the case.
documentation guidelines, and
here are tips on formatting docstrings.
Who can review?
Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.