[Misc][Quantization] Clarify the intent of GGUF FusedMoE weight materialization
#30310
+5
−2
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.
Purpose
This is a refactoring PR with no functional changes (unless the GGUF file is broken).
In the process of
FusedMoEweight data materialization from GGUF files, there is a magic number and some intents are not clear enough.This commit clarifies some of them:
full_load) forFusedMoElayer weights.w1andw3are merged per expert, i.e. the next dimension after the expert ID is to be doubled to store bothw1andw3.if is_gguf_weight...block).final_shape[1]) should be doubled forw1andw3, improving the clarity.... and makes some minor adjustments.
Essential Elements of an Effective PR Description Checklist
supported_models.mdandexamplesfor a new model.