[Refactor][Quantization] Make FP8 and MLA weight transforms reusable pure functions (#57732)

Signed-off-by: aoshen02 <aoshen@inferact.ai>
Co-authored-by: Yongye Zhu <zyy1102000@gmail.com>
This commit is contained in:
aoshen02
2026-09-23 01:16:20 -07:00
committed by GitHub
co-authored by Yongye Zhu
parent 9488318c6a
commit 973a3be780
6 changed files with 36 additions and 49 deletions
@@ -2129,7 +2129,7 @@ class KFp8StaticChannel(QuantKeyScheme):
weight, weight_scale, _ = process_fp8_weight_channel_strategy(
layer.weight, layer.weight_scale.data
)
layer.weight = Parameter(weight.t(), requires_grad=False)
layer.weight = Parameter(weight, requires_grad=False)
layer.weight_scale = Parameter(weight_scale, requires_grad=False)