Closed NielsRogge closed 3 months ago
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.
same issue here
Friendly pinging @Narsil here
System Info
safetensors v0.4.2 huggingface_hub v0.22.0.dev0
Information
Reproduction
We recently switched to leveraging Safetensors by default for the
PyTorchModelHubMixin
class in huggingface_hub (https://github.com/huggingface/huggingface_hub/pull/2033), which is a minimal class that addsfrom_pretrained
andpush_to_hub
methods to any customnn.Module
.However, when trying out this class on the Gemma series of models by Google, I get the following error when calling
push_to_hub
(which first saves the tensors in the safetensors format before uploading the files to the hub):Here's a notebook for reproduction.
Expected behavior
This model has some tensors of type
torch.complex64
, would be great to save those.