huggingface / setfit

Efficient few-shot learning with Sentence Transformers
https://hf.co/docs/setfit
Apache License 2.0
2.25k stars 223 forks source link

Can we use Setfit just for finetuning ST Embedding model to create embeddings #508

Closed kjoth closed 7 months ago

kjoth commented 7 months ago

Hello,

According to the documentation, SetFit is described as "a model framework to efficiently train text classification models with surprisingly little training data." Does this imply that using SetFit is only meaningful when applied to classification tasks, rather than generating embeddings? Or can we leverage SetFit to train a Sentence Transformer - Embedding model specifically for generating embeddings, without engaging in text classification?

https://huggingface.co/docs/setfit/en/conceptual_guides/setfit

tomaarsen commented 7 months ago

Hello!

Yes, this is completely possible. However, at some point it might make some more sense to directly use Sentence Transformers.

kjoth commented 7 months ago

Thanks @tomaarsen for clarifying. We conclude that it's suitable to utilize the Sentence Transformer for training Embedding models for embedding tasks and to employ SetFit for training Embedding models for classification tasks.