UKPLab / sentence-transformers

State-of-the-Art Text Embeddings
https://www.sbert.net
Apache License 2.0
15.21k stars 2.47k forks source link

Question: fine-tuning transformers always requires data to be in the form [sentence1, sentence2, label]? #1714

Open andreamorgar opened 2 years ago

andreamorgar commented 2 years ago

Can I train a sentence-transformer in the form [sentence1, label]? Would it be correct? Can't find neither in the documentation or hugging face nothing related to this specific way of fine-tuning SBERT. It always relate to two sentences per training item!

sarthak91-debug commented 2 years ago

I had the same doubt, I want to experiment with models using SBERT and pass only a text through an encoder with fewer lines of code.

TheTamT3 commented 1 year ago

@andreamorgar No, You can choose another ways. https://www.sbert.net/docs/package_reference/losses.html#mseloss