Repository navigation
[#17723][fix] Normalize packed compressed-tensors NVFP4 names - #17726
Draft
mihai-chiorean wants to merge 2 commits into
Draft
mihai-chiorean wants to merge 2 commits into
mihai-chiorean wants to merge 2 commits into
Conversation
This was referenced Aug 14, 2026
Signed-off-by: Mihai Chiorean <[email protected]>
Signed-off-by: Mihai Chiorean <[email protected]>
mihai-chiorean
force-pushed
the
fix/17723-compressed-tensors-nvfp4-names
branch
from
October 2, 2026 15:41
d326068 to
0a995f7
Compare
1 task done
This branch has not been deployed
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.
Summary
Add shared, suffix-safe normalization for packed compressed-tensors NVFP4 weights and scales, then use it from Laguna and Qwen3.5/3.8 checkpoint loading.
The mapping is:
.weight_packed->.weight.weight_global_scale->.weight_scale_2with a reciprocal.input_global_scale->.input_scalewith a reciprocal.weight_scaleremains.weight_scaleRelated to #17723.
Motivation
unsloth/Qwen3.8-27B-NVFP4uses compressed-tensors packed names, while TRT-LLM NVFP4 Linear modules consume ModelOpt-style names. Ad-hoc substring replacement can corrupt.weight_scaleor invert zero sentinels to infinity.Dense Qwen layers now reject non-positive/non-finite global scales because accepting zero would silently zero a dense layer. Laguna explicitly retains zero-safe
0 -> 0behavior for uncalibrated MoE experts that its fused loader can leave inactive.Testing
pre-commit run --fileson all changed filesDependencies and overlap
Independent of the multi-group parser. This generalizes the packed-weight renaming portion of #16447; the two implementations must not merge together. Its homogeneous MTP-regex change is intentionally not included here.