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

Allow 'device' on SetFitModel.from_pretrained() #445

Merged
merged 2 commits into from
Nov 24, 2023

Conversation

tomaarsen
Copy link
Member

Hello!

Pull Request overview

  • Allow 'device' on SetFitModel.from_pretrained()

Details

This definitely should have already been possible. You can now use:

from setfit import SetFitModel

model = SetFitModel.from_pretrained("...", device="cpu")

Note that the model is not strictly loaded on this device as well, it might just be loaded on whatever was used to save it, sadly. This is dependent on SentenceTransformers.

  • Tom Aarsen

@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint.

@tomaarsen tomaarsen merged commit c41b7c3 into huggingface:v1.0.0-pre Nov 24, 2023
18 checks passed
@tomaarsen tomaarsen deleted the feat/load_on_device branch November 24, 2023 15:20
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.

2 participants