Skip to content

[#17723][fix] Normalize packed compressed-tensors NVFP4 names - #17726

Draft
mihai-chiorean wants to merge 2 commits into
NVIDIA:mainfrom
mihai-chiorean:fix/17723-compressed-tensors-nvfp4-names
Draft

mihai-chiorean wants to merge 2 commits into
NVIDIA:mainfrom
mihai-chiorean:fix/17723-compressed-tensors-nvfp4-names

Conversation

@mihai-chiorean

@mihai-chiorean mihai-chiorean commented Aug 14, 2026 •

Copy link
Copy Markdown
Contributor

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_2 with a reciprocal
  • .input_global_scale -> .input_scale with a reciprocal
  • .weight_scale remains .weight_scale

Related to #17723.

Motivation

unsloth/Qwen3.8-27B-NVFP4 uses compressed-tensors packed names, while TRT-LLM NVFP4 Linear modules consume ModelOpt-style names. Ad-hoc substring replacement can corrupt .weight_scale or 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 -> 0 behavior for uncalibrated MoE experts that its fused loader can leave inactive.

Testing

  • pre-commit run --files on all changed files
  • Focused normalization and Qwen mapper tests included in a 200-pass integrated Spark run
  • Positive, zero, negative, non-finite, scalar, vector, collision, and lazy-slice cases covered
  • Full Qwen3.8-27B NVFP4 SM121 smoke loaded all packed weights and generated coherent output

Dependencies 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.

@mihai-chiorean
mihai-chiorean force-pushed the fix/17723-compressed-tensors-nvfp4-names branch from d326068 to 0a995f7 Compare October 2, 2026 15:41
@svc-trtllm-gh-bot svc-trtllm-gh-bot added the Community want to contribute PRs initiated from Community label Oct 2, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Community want to contribute PRs initiated from Community

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants