Fix infinite recursive search issue in quark.py (#32779)
Signed-off-by: Yanwen Lin <lyw1124278064@gmail.com> Signed-off-by: Xiao Yu <xiao.yu.dc@outlook.com> Signed-off-by: kimheesu <wlskaka4@gmail.com> Co-authored-by: Yanwen Lin <lyw1124278064@gmail.com> Co-authored-by: Kim Hee Su <wlskaka4@gmail.com>
This commit is contained in:
co-authored by
Yanwen Lin
Kim Hee Su
parent
8a680463fa
commit
24b4272a8c
@@ -467,10 +467,17 @@ class QuarkConfig(QuantizationConfig):
|
||||
layer_name.replace(proj_name, shard_proj_name)
|
||||
for shard_proj_name in shard_proj_names
|
||||
]
|
||||
shard_configs = [
|
||||
self._find_matched_config(shard_name, module)
|
||||
for shard_name in shard_names
|
||||
]
|
||||
|
||||
shard_configs = []
|
||||
for shard_name in shard_names:
|
||||
if shard_name == layer_name:
|
||||
config = cast(
|
||||
dict[str, Any], self.quant_config.get("global_quant_config")
|
||||
)
|
||||
else:
|
||||
config = self._find_matched_config(shard_name, module)
|
||||
shard_configs.append(config)
|
||||
|
||||
if not all(
|
||||
deep_compare(q_config, shard_configs[0]) for q_config in shard_configs
|
||||
):
|
||||
|
||||
Reference in New Issue
Block a user