Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix safetensors contiguous #2145

Merged
merged 1 commit into from
Nov 13, 2023

Conversation

SunMarc
Copy link
Member

@SunMarc SunMarc commented Nov 13, 2023

What does this PR do

THis fixes the safetensors saving in case the state_dict contains other object (e.g. str). In that case, we can't use .contiguous() as it only works for Tensor

@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Nov 13, 2023

The documentation is not available anymore as the PR was closed or merged.

Copy link
Collaborator

@muellerzr muellerzr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Beat me by seconds, was about to submit a similar PR 😉

@SunMarc SunMarc merged commit a0a16e1 into huggingface:main Nov 13, 2023
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants