0628版本加载报错
bestpredicts opened this issue · comments
File /opt/conda/lib/python3.10/site-packages/transformers/modeling_utils.py:3903, in PreTrainedModel.from_pretrained(cls, pretrained_model_name_or_path, config, cache_dir, ignore_mismatched_sizes, force_download, local_files_only, token, revision, use_safetensors, *model_args, **kwargs)
3893 if dtype_orig is not None:
3894 torch.set_default_dtype(dtype_orig)
3896 (
3897 model,
3898 missing_keys,
3899 unexpected_keys,
...
--> 549 with safe_open(checkpoint_file, framework="pt") as f:
550 metadata = f.metadata()
551 if metadata.get("format") not in ["pt", "tf", "flax", "mlx"]:
SafetensorError: Error while deserializing header: InvalidHeaderDeserialization