Content-Length: 256792 | pFad | https://github.com/huggingface/setfit/pull/463

3B Prepare SetFit for upcoming 2.3.0 release of SentenceTransformers by tomaarsen · Pull Request #463 · huggingface/setfit · GitHub
Skip to content

Prepare SetFit for upcoming 2.3.0 release of SentenceTransformers #463

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

Merged
merged 3 commits into from
Jan 11, 2024

Conversation

tomaarsen
Copy link
Member

@tomaarsen tomaarsen commented Dec 12, 2023

Hello!

Pull Request overview

  • Prepare SetFit for upcoming 2.3.0 release of SentenceTransformers
  • Store sentence transformer loading kwargs in the SetFitModel, required for loading the best checkpoint.
  • Add trust_remote_code to from_pretrained, required for custom models, such as jinaai/jina-embeddings-v2-base-en.

Details

Note: Sentence Transformers 2.3.0 will be backwards compatible, and not having these changes in your SetFit install just means that you get a warning that you won't get with these changes.

In short, Sentence Transformers 2.3.0 will fix the currently broken model_body.device, allowing us to actually use that one again instead of the hacky model_body._target_device.

We also add trust_remote_code, mirroring the upcoming support for Sentence Transformers. This PR also stores the loading kwargs from Sentence Transformers into the model, so that we can correctly load the best checkpoint (even if that requires trust_remote_code=True for example)


cc @bwanglzu If you're interested, this PR should allow Jina embeddings to be used for efficient text classification models :)

  • Tom Aarsen

Note: It's backwards compatible, and not having these changes in your SetFit install just means that you get a warning that you won't get with these changes.
@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.

@tomaarsen tomaarsen merged commit f387387 into huggingface:main Jan 11, 2024
@tomaarsen tomaarsen deleted the update/sbert_2.3_support branch January 11, 2024 14:28
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








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: https://github.com/huggingface/setfit/pull/463

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy