SetFit recap: 8 examples per class rivals RoBERTa-Large fine-tuned on 3k

tomaarsen · x · 2026-09-04

The author explains SetFit had fallen behind the ecosystem: it wouldn't import with transformers v5, couldn't load models with huggingfacehub v1, warned on every import with Sentence Transformers v5.4+, and crashed on datasets v4 columns — all fixed in v1.2.0 while old versions keep working. How it works: SetFit turns a few labeled sentences into positive/negative pairs, contrastively fine-tunes a Sentence Transformer, and fits a classifier on the embeddings; 8 examples per class rivals RoBERTa-Large fine-tuned on 3k examples.

Related event: SetFit v1.2.0 released: prompt-free few-shot classifier catches up with modern stack(9 posts)→

Original post →

More from coding & agent

coding & agent channel →