SetFit v1.2.0 released: few-shot classifier catches up with modern ecosystem
Hugging Face's tomaarsen released SetFit v1.2.0 on Sep 4. SetFit is a prompt-free few-shot text classification framework: it builds positive/negative pairs from a few labeled sentences, contrastively fine-tunes a Sentence Transformer, then trains a classification head on the embeddings—needing only 8 samples per class to rival RoBERTa-Large fine-tuned on 3000 samples. This release is a major compatibility overhaul that makes SetFit usable again in the current ecosystem.
Confirmed
- Fixed ecosystem compatibility: import failures under transformers v5, inability to load Hub models under huggingfacehub v1, warnings on every import with Sentence Transformers v5.4+, and datasets-related issues
- Compatibility matrix covers transformers 4.41–5.16, Sentence Transformers 3.0–6.0, huggingfacehub 0.24–1.30, datasets 2.15–5.x, including warmup and logging parameter migration under transformers v5
- Export fixes: ONNX export works again on torch 2.9+ (requires explicitly requesting the legacy exporter, as the new dynamo default lacks needed opsets), supports skl2onnx 1.20, and OpenVINO 2026
- Added Python 3.13 support; fixed saving before training under codecarbon 3.x
- Requires evaluate>=0.4.6, as older versions cannot load metrics with huggingfacehub v1
- Docs, notebook updates, and dataset ID namespace fixes included
- The author notes SetFit has been one of the cheapest reliable text classification options since 2022, training small models in minutes with any Hub embedding model as backbone (e.g. ModernBERT)
Why it matters
SetFit lets teams without large labeled datasets—or those avoiding LLMs and prompt engineering—train competitive classifiers with 8 samples per class at very low cost, with ONNX/OpenVINO deployment support. Prior versions were nearly unusable in the current ecosystem; v1.2.0 restores compatibility with the latest transformers, huggingfacehub, and Sentence Transformers stacks.
2026-09-04 ~ 2026-09-04 · 9 related posts
Primary sources
- [source] SetFit v1.2.0 released with support for transformers v5, Sentence Transformers v6 — tomaarsen · 2026-09-04
- SetFit recap: 8 examples per class rivals RoBERTa-Large fine-tuned on 3k — tomaarsen · 2026-09-04
- SetFit overhauls CI to support transformers v5, huggingface_hub v1 and Python 3.13 — tomaarsen · 2026-09-04
- SetFit v1.2.0 tested across transformers 4.41-5.16, with v5 migration details — tomaarsen · 2026-09-04
- SetFit fixes ONNX export on torch 2.9+ and adds OpenVINO 2026 support — tomaarsen · 2026-09-04
- SetFit v1.2.0 adds Python 3.13 support and dataset ID namespace fixes — tomaarsen · 2026-09-04
- SetFit remains one of the cheapest ways to train solid text classifiers — tomaarsen · 2026-09-04
- [source] SetFit v1.2.0 fixes transformers v5 breakage and ONNX/OpenVINO export — tomaarsen · 2026-09-04
1 near-duplicate retellings: tomaarsen