[torchao] fix safetensors for sharding (#28169)

Signed-off-by: Angel Li <liangel@meta.com>
This commit is contained in:
liangel-02
2025-11-19 19:39:45 -05:00
committed by GitHub
parent 9ccef8e333
commit 1d642872a2
3 changed files with 23 additions and 11 deletions

View File

@@ -279,7 +279,7 @@ class DefaultModelLoader(BaseModelLoader):
if (
hasattr(quant_config, "is_checkpoint_torchao_serialized")
and quant_config.is_checkpoint_torchao_serialized
and torchao_version_at_least("0.14.0")
and torchao_version_at_least("0.15.0")
):
self.load_config.safetensors_load_strategy = "torchao"