huggingface/setfit
Efficient few-shot learning with Sentence Transformers observed · 2026-08-28
Health v2 · maintenance only
64/100
- Activity 84
- Release rhythm 17
- Longevity 100
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-02. Adoption (stars, forks) is never an input.
- gap_med: 116
- age_days: 1525
- days_rel: 393
- days_push: 99
- n_releases_24m: 4
Adoption not part of the score
2784 stars · 264 forks observed · 2026-08-28
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-29, confidence not recorded
SetFit is a Python library for efficient, prompt-free few-shot fine-tuning of Sentence Transformers for text classification. It achieves high accuracy with as few as 8 labeled examples per class while training and inferring much faster than large language model approaches.
Use cases
- train a text classifier with only a handful of labeled examples
- classify customer reviews as positive or negative sentiment
- do zero-shot text classification without labeled training data
- fine-tune multilingual sentence transformers for classification
- compress and speed up classification models with ONNX for production
- perform knowledge distillation and hyperparameter optimization for classifiers
When to choose
- you have very little labeled data but need an accurate text classifier
- you want fast, cheap training and inference without large LLMs or prompt engineering
- you need multilingual classification using any Sentence Transformer checkpoint
- you want a lightweight model deployable on CPU or optimized via ONNX
When to avoid
- you need generative tasks like summarization or question answering
- you have abundant labeled data and can fine-tune a full transformer for maximum accuracy
- you need state-of-the-art performance on complex reasoning tasks that require large language models
Facets
library · maturity active
machine-learning nlp llm-training machine-learning deep-learning python cross-platform few-shot-learning sentence-transformers text-classification zero-shot-classification embeddings hugging-face onnx natural-language-processing gpu
10 sources
- readme: https://github.com/huggingface/setfit · fetched 2026-08-28 · 5a9d18e49f92
- homepage: https://hf.co/docs/setfit · fetched 2026-08-29 · 77d523a9a7ef
- site_page: https://huggingface.co/docs · fetched 2026-08-29 · bdec26667b98
- site_page: https://huggingface.co/docs/setfit/quickstart · fetched 2026-08-29 · ed01fe48fcdf
- site_page: https://huggingface.co/docs/setfit/installation · fetched 2026-08-29 · 5b8224d205af
- site_page: https://huggingface.co/docs/setfit/tutorials/overview · fetched 2026-08-29 · b894041df304
- site_page: https://huggingface.co/docs/setfit/tutorials/zero_shot · fetched 2026-08-29 · ecb1eb4bce9f
- site_page: https://huggingface.co/docs/setfit/tutorials/onnx · fetched 2026-08-29 · 962d319980f1
- site_page: https://huggingface.co/docs/setfit/how_to/overview · fetched 2026-08-29 · c79f8b699a3a
- registry_pypi: https://pypi.org/pypi/setfit/json · fetched 2026-08-29 · 77335cc238e8
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| huggingface/setfit | main | 64 |
For agents
markdown · JSON · MCP: product_card(name="huggingface/setfit")
Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem