Unverified Commit 24b4272a authored by xiao-llm's avatar xiao-llm Committed by GitHub
Browse files

Fix infinite recursive search issue in quark.py (#32779)


Signed-off-by: default avatarYanwen Lin <lyw1124278064@gmail.com>
Signed-off-by: default avatarXiao Yu <xiao.yu.dc@outlook.com>
Signed-off-by: default avatarkimheesu <wlskaka4@gmail.com>
Co-authored-by: default avatarYanwen Lin <lyw1124278064@gmail.com>
Co-authored-by: default avatarKim Hee Su <wlskaka4@gmail.com>
parent 8a680463
......@@ -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
):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment