Closed Wauplin closed 23 hours ago
Partially resolve https://github.com/huggingface/huggingface_hub/issues/2065. Follow-up PR after https://github.com/huggingface/huggingface_hub/pull/2314.
In https://github.com/huggingface/huggingface_hub/pull/2314, we introduce save_torch_state_dict. This new PR:
save_torch_state_dict
save_torch_model
nn.Module
get_tf_storage_size
get_torch_storage_size
A last follow-up PR should had load_torch_state_dict / load_torch_model helpers as well to correctly reload those files, including the shared layers.
load_torch_state_dict
load_torch_model
I'm pinging transformers/accelerate/diffusers cores maintainers for visibility as well. Feel free to comment if someone should be done differently.
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.
Thanks for the reviews! Let's ship it yes :smile:
Partially resolve https://github.com/huggingface/huggingface_hub/issues/2065. Follow-up PR after https://github.com/huggingface/huggingface_hub/pull/2314.
In https://github.com/huggingface/huggingface_hub/pull/2314, we introduce
save_torch_state_dict
. This new PR:save_torch_model
to directly save a torchnn.Module
get_tf_storage_size
/get_torch_storage_size
and make them public + documentedA last follow-up PR should had
load_torch_state_dict
/load_torch_model
helpers as well to correctly reload those files, including the shared layers.I'm pinging transformers/accelerate/diffusers cores maintainers for visibility as well. Feel free to comment if someone should be done differently.