fix(qwen3_5): skip GDN input-projection fusion on mixed projection dt… - #182
Open
potoior wants to merge 1 commit into
Open
fix(qwen3_5): skip GDN input-projection fusion on mixed projection dt…#182potoior wants to merge 1 commit into
potoior wants to merge 1 commit into
Conversation
…ypes Anti-compressed NVFP4 checkpoints can quantize only some GDN input projections (e.g. in_proj_qkv/in_proj_z -> NVFP4 FP8 weights) while leaving others (in_proj_b/in_proj_a) FP16. fuse_gdn_input_projections checked only the first projection's quant type and then concat weights of all four projections, so these checkpoints crashed with 'Promotion for Float8 Types is not supported, attempted to promote Float8_e4m3fn and Half'. Verify all four projections share the same weight dtype before fusing; when they differ, log a warning and keep the unfused path (which is already supported in forward()). Pure FP16 / pure NVFP4 models still fuse. Verified: tensorrt-edgellm-export Qwen3.8-27B-NVFP4 --skip-audio completes, with 'GDN fusion skipped' warnings logged per layer. Signed-off-by: potoior <2986485901@qq.com>
potoior
force-pushed
the
fix/gdn-mixed-dtype-fusion
branch
from
August 17, 2026 07:20
a3ac7b4 to
e44d305
Compare
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.
…ypes
Anti-compressed NVFP4 checkpoints can quantize only some GDN input projections (e.g. in_proj_qkv/in_proj_z -> NVFP4 FP8 weights) while leaving others (in_proj_b/in_proj_a) FP16. fuse_gdn_input_projections checked only the first projection's quant type and then concat weights of all four projections, so these checkpoints crashed with 'Promotion for Float8 Types is not supported, attempted to promote Float8_e4m3fn and Half'.
Verify all four projections share the same weight dtype before fusing; when they differ, log a warning and keep the unfused path (which is already supported in forward()). Pure FP16 / pure NVFP4 models still fuse.
Verified: tensorrt-edgellm-export Qwen3.8-27B-NVFP4 --skip-audio completes, with 'GDN fusion skipped' warnings logged per layer.
What does this PR do?
Type of change: ?
Overview: ?
Usage
# Add a code snippet demonstrating how to use this🚀 Pull Request Checklist
Thank you for contributing to TensorRT Edge-LLM! Before we review your pull request, please make sure the following items are complete.
Please also refer to Contributor guidelines for general guidelines.
✅ Pre-commit Checks
pre-commitby runningpip install pre-commit.pre-commit install.pre-commit run --all-filesand fixed any reported issues.🧪 Tests
📄 Documentation
⚙️ Compatibility
Additional Information