mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2026-04-23 08:21:53 +08:00
[Others] remove add_bias option (#5425)
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user