Unverified Commit c02e3139 authored by Ke Bao's avatar Ke Bao Committed by GitHub
Browse files

Fix block wise fp8 torch compile (#3232)

parent 734daedd
......@@ -290,6 +290,13 @@ class Fp8LinearMethod(LinearMethodBase):
weight_scale, requires_grad=False
)
layer.input_scale = None
else:
layer.weight = torch.nn.Parameter(
layer.weight.data, requires_grad=False
)
layer.weight_scale_inv = torch.nn.Parameter(
layer.weight_scale_inv.data, requires_grad=False
)
return
layer.weight = torch.nn.Parameter(layer.weight.data, requires_grad=False)
# If checkpoint not serialized fp8, quantize the weights.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment