Small fixes for torchao quant (#2476)
This commit is contained in:
@@ -26,11 +26,12 @@ def apply_torchao_config_to_model(
|
||||
quantize_,
|
||||
)
|
||||
from torchao.quantization.observer import PerRow, PerTensor
|
||||
from torchao.quantization.quant_api import _is_linear
|
||||
|
||||
if filter_fn is None:
|
||||
|
||||
def filter_fn(module, fqn):
|
||||
return "proj" in fqn
|
||||
return _is_linear(module) and "proj" in fqn
|
||||
|
||||
if torchao_config == "" or torchao_config is None:
|
||||
return model
|
||||
|
||||
Reference in New Issue
Block a user