Skip to content

Conversation

@tomaarsen
Copy link
Member

Hello!

Pull Request overview

  • Replace the embedding finetuning training methods with the Sentence Transformers v3 Trainer

Details

In v1 of SetFit, I moved from the old model.fit training from Sentence Transformers (as it didn't have e.g. loss logging, etc.) to a custom training loop that does. However, since then, Sentence Transformers v3 has released, which also added all of the features that were previously lacking. To simplify the training moving forward, the training is now (once again) deferred to Sentence Transformers.

Because both the old and new training approach are based on the transformers Trainer, we don't need to make a lot of changes. I've worked to try and prevent breaking changes, e.g. updating the Sentence Transformers callbacks such that it still returns a SetFitModel like before.

  • Tom Aarsen

@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 fb91f67 into huggingface:main Sep 18, 2024
@tomaarsen tomaarsen deleted the feat/use_st_trainer branch September 18, 2024 10:42
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