Skip to content

Commit

Permalink
hqq - fix weight check in check_quantized_param (#30748)
Browse files Browse the repository at this point in the history
* hqq - fix weight check in check_quantized_param

* ruff format
  • Loading branch information
mobicham authored May 10, 2024
1 parent 8ce4fef commit e0c3cee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/transformers/quantizers/quantizer_hqq.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ def check_quantized_param(
) -> bool:
module, tensor_name = get_module_from_name(model, param_name)

return isinstance(module, torch.nn.Linear)
return isinstance(module, torch.nn.Linear) and (tensor_name == "weight")

def create_quantized_param(
self,
Expand Down

0 comments on commit e0c3cee

Please sign in to comment.