Skip to content

Error: cannot import name 'split_torch_state_dict_into_shards' from 'huggingface_hub' #14605

Answered by dosubot bot
ArijitSinghEDA asked this question in Q&A
Discussion options

You must be logged in to vote

The error you're encountering is due to the split_torch_state_dict_into_shards function not being available in huggingface-hub version 0.20.3. This function is included starting from version 0.23.0.

To resolve this issue, update the huggingface-hub library to version 0.23.0 or later:

pip install --upgrade huggingface-hub

This should include the required function and resolve the import error [1].

To continue talking to Dosu, mention @dosu.

Replies: 2 comments 5 replies

Comment options

You must be logged in to vote
3 replies
@ArijitSinghEDA
Comment options

@dosubot
Comment options

Answer selected by ArijitSinghEDA
@heyomy
Comment options

Comment options

You must be logged in to vote
2 replies
@JiafengDu
Comment options

@IIIskiplikIII
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
5 participants