From 6defcb8bee2d7446391affa76282a883b7c80869 Mon Sep 17 00:00:00 2001 From: Kaihui-intel Date: Mon, 17 Jun 2024 12:07:45 +0800 Subject: [PATCH] fix layer match Signed-off-by: Kaihui-intel --- neural_compressor/torch/algorithms/weight_only/gptq.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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