Files
Model-Optimizer/tests/gpu
Wei-Ming Chen 1d0ee0443e [OMNIML-2932] Fusing pre_quant_scale for NVFP4 AWQ (#421)
## What does this PR do?

**Type of change:** ? <!-- Use one of the following: Bug fix, new
feature, new example, new tests, documentation. -->

**Overview:** 

This PR and https://github.com/NVIDIA/TensorRT-LLM/pull/8698 enable
NVFP4 AWQ deployment for TRT-LLM. Specifically, this PR fuses
pre_quant_scale in following two cases:
* For MLP, pre_quant_scale of gate_proj layer is fused into up_proj's
weight, so we don't need an extra handle in downstream fused moe
kernels.
* For attention, we will try to fuse the pre_quant_scale of o_proj to
v_proj if their dimensions match, which means we will skip fusion for
MQA/GQA models.

## Usage
<!-- You can potentially add a usage example below. -->

```python
# Add a code snippet demonstrating how to use this
```

## Testing
<!-- Mention how have you tested your change if applicable. -->
unit test, e2e test for Qwen3 dense and moe models.

## Before your PR is "*Ready for review*"
<!-- If you haven't finished some of the above items you can still open
`Draft` PR. -->

- **Make sure you read and follow [Contributor
guidelines](https://github.com/NVIDIA/TensorRT-Model-Optimizer/blob/main/CONTRIBUTING.md)**
and your commits are signed.
- **Is this change backward compatible?**: Yes/No <!--- If No, explain
why. -->
- **Did you write any new necessary tests?**: Yes/No
- **Did you add or update any necessary documentation?**: Yes/No
- **Did you update
[Changelog](https://github.com/NVIDIA/TensorRT-Model-Optimizer/blob/main/CHANGELOG.rst)?**:
Yes/No <!--- Only for new features, API changes, critical bug fixes or
bw breaking changes. -->

## Additional Information
<!-- E.g. related issue. -->

---------

Signed-off-by: weimingc <17592131+meenchen@users.noreply.github.com>
2025-11-19 21:16:30 +00:00
..
2025-04-03 10:31:41 +05:30