Hugging Face, working with Intel Labs and the UKP Lab, has released SetFit — a framework that makes few-shot text classification dramatically cheaper and simpler than the prompt-based methods that have dominated the field. The core trick: skip prompts entirely. SetFit fine-tunes a Sentence Transformer on a handful of labeled examples using contrastive training, then trains a lightweight classification head on the resulting embeddings. No GPT-3. No handcrafted verbalisers. Just dense vectors and a small model.
The numbers are genuinely striking. On the Customer Reviews sentiment dataset, SetFit trained on just 8 labeled examples per class matches RoBERTa Large fine-tuned on the full 3,000-example training set. Against the RAFT benchmark, SetFit Roberta — built on all-roberta-large-v1 with 355 million parameters — beats both PET and GPT-3, and lands just below the 11-billion-parameter T-Few. That’s a model roughly 30 times smaller staying competitive. SetFit also clears the human baseline on 7 of RAFT’s 11 tasks, which is the kind of result that makes you pause and reconsider what few-shot learning actually requires.
Speed is where this gets practical for everyday data scientists. Training SetFit on an NVIDIA V100 with 8 labeled examples takes about 30 seconds and costs $0.025. T-Few 3B needs an A100, takes 11 minutes, and runs around $0.70 for the same experiment — a 28x cost gap. SetFit even trains on CPU in minutes, which means Colab users can skip the GPU queue entirely. Inference is similarly lean, and distilling the model can yield speed-ups of 123x.
There’s also a multilingual angle worth watching. Because SetFit works with any Sentence Transformer on the Hub, switching to a multilingual checkpoint gives you classification in German, Japanese, Mandarin, French, and Spanish without changing the underlying approach. The paper reports promising results in both in-language and cross-lingual settings. For teams that have avoided few-shot methods because prompt engineering felt brittle or large models were too expensive, SetFit removes both objections at once. The question now is whether the approach holds up beyond the benchmark datasets — particularly on noisy, real-world text where contrastive pairs are harder to construct cleanly.