[ Bugfix ] Fix AutoFP8 fp8 marlin (#6609)
This commit is contained in:
parent
f952bbc8ff
commit
082ecd80d5
@ -76,7 +76,8 @@ def prepare_fp8_layer_for_marlin(layer: torch.nn.Module) -> None:
|
|||||||
# WEIGHT SCALES
|
# WEIGHT SCALES
|
||||||
# Currently Marlin doesn't support per-tensor scales, so we
|
# Currently Marlin doesn't support per-tensor scales, so we
|
||||||
# expand it to channelwise
|
# expand it to channelwise
|
||||||
is_channelwise = layer.weight_scale.shape[0] == part_size_n
|
is_channelwise = (len(layer.weight_scale.shape) > 0
|
||||||
|
and layer.weight_scale.shape[0] == part_size_n)
|
||||||
if is_channelwise:
|
if is_channelwise:
|
||||||
scales = layer.weight_scale
|
scales = layer.weight_scale
|
||||||
else:
|
else:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user