[Others] remove add_bias option (#5425)

This commit is contained in:
Haonan Luo
2025-12-09 17:39:35 +08:00
committed by GitHub
parent 1f63000ef9
commit e397c4fba6
5 changed files with 6 additions and 30 deletions
@@ -107,7 +107,7 @@ class W4AFP8LinearMethod(QuantMethodBase):
layer.weight,
layer.weight_scale,
zero_points=None,
bias=layer.bias if layer.add_bias else None,
bias=layer.bias if layer.with_bias else None,
out_scale=self.quant_config.weight_scale_dict.get(layer.prefix + ".weight_scale")
/ (
self.quant_config.act_scale_dict.get(layer.prefix + ".activation_scale")
@@ -361,7 +361,7 @@ class WeightOnlyLinearMethod(QuantMethodBase):
linear_out = weight_only_linear(
x,
weight=layer.weight,
bias=layer.bias if layer.add_bias else None,
bias=layer.bias if layer.with_bias else None,
weight_scale=layer.weight_scale,
weight_dtype=("int8" if self.quant_config.name() == "wint8" else "int4"),
arch=self.quant_config.weight_only_linear_arch,