SetFit is an efficient framework for few-shot text classification developed by Hugging Face, published on GitHub with about 2,800 stars. It fine-tunes Sentence Transformers with only a handful of labeled examples per class and still rivals models trained on thousands of examples.
SetFit works in two steps: it fine-tunes a Sentence Transformer on a small number of text pairs, then trains a lightweight classification head on the resulting embeddings. Because it needs no prompts or verbalizers, it avoids the brittleness of prompt-based few-shot methods while training an order of magnitude faster than approaches built on very large language models. It supports multilingual models, works well in low-data regimes common in real projects, and integrates with the Hugging Face Hub for sharing trained models. The project is Apache-2.0 licensed and still actively maintained in 2026. Trained SetFit models can be pushed to the Hugging Face Hub in one call, and the repo includes notebooks reproducing the paper’s benchmark results across classification datasets.
SetFit is completely free and open source under the Apache-2.0 license. There are no paid tiers or hosted versions; you train and run models entirely on your own infrastructure.
SetFit is for NLP practitioners and data teams who need accurate text classifiers but only have a small labeled dataset and limited compute budget.