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

Add a use_safetensors arg to TFPreTrainedModel.from_pretrained() #28511

Merged
merged 3 commits into from
Jan 15, 2024

Conversation

Rocketknight1
Copy link
Member

PyTorch's from_pretrained() method has a use_safetensors argument. Our TF code doesn't, and just always tries safetensors if available. This PR adds the argument to match the PyTorch API.

@Rocketknight1 Rocketknight1 mentioned this pull request Jan 15, 2024
5 tasks
Copy link
Collaborator

@amyeroberts amyeroberts left a comment

Choose a reason for hiding this comment

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

Thanks for adding so quickly!

@HuggingFaceDocBuilderDev

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.

@Rocketknight1 Rocketknight1 merged commit 72db39c into main Jan 15, 2024
21 checks passed
@Rocketknight1 Rocketknight1 deleted the use_safetensors_tf_arg branch January 15, 2024 17:00
MadElf1337 pushed a commit to MadElf1337/transformers that referenced this pull request Jan 15, 2024
…gingface#28511)

* Add a use_safetensors arg to TFPreTrainedModel.from_pretrained()

* One more catch!

* One more one more catch
wgifford pushed a commit to wgifford/transformers that referenced this pull request Jan 21, 2024
…gingface#28511)

* Add a use_safetensors arg to TFPreTrainedModel.from_pretrained()

* One more catch!

* One more one more catch
AjayP13 pushed a commit to AjayP13/transformers that referenced this pull request Jan 22, 2024
…gingface#28511)

* Add a use_safetensors arg to TFPreTrainedModel.from_pretrained()

* One more catch!

* One more one more catch
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.

3 participants