diff --git a/neural_compressor/torch/algorithms/weight_only/gptq.py b/neural_compressor/torch/algorithms/weight_only/gptq.py index 2efb08c25d4..4e2c19a8815 100644 --- a/neural_compressor/torch/algorithms/weight_only/gptq.py +++ b/neural_compressor/torch/algorithms/weight_only/gptq.py @@ -118,7 +118,7 @@ def find_layers(module, layers=SUPPORTED_LAYERS, name=""): return {name: module} else: # use string type to find name: - if type(module).__name__ in ["Linear"]: + if isinstance(module, tuple(layers)): return {name: module} else: pass