#6161st of 126 in Training and fine-tuning

setfit

Few-shot text classification by fine-tuning Sentence Transformers, no prompts

Stars
2.9k
License
Apache-2.0
Last commit
Oct 2026
Last release
Sep 2026
Language
Jupyter Notebook
Stars, last 30 weeks+168
2 May 2026: 2,706 stars9 May 2026: 2,712 stars16 May 2026: 2,719 stars23 May 2026: 2,724 stars30 May 2026: 2,728 stars6 Jun 2026: 2,729 stars13 Jun 2026: 2,732 stars20 Jun 2026: 2,738 stars27 Jun 2026: 2,742 stars4 Jul 2026: 2,748 stars11 Jul 2026: 2,756 stars18 Jul 2026: 2,758 stars25 Jul 2026: 2,764 stars1 Aug 2026: 2,765 stars8 Aug 2026: 2,766 stars15 Aug 2026: 2,767 stars22 Aug 2026: 2,769 stars29 Aug 2026: 2,773 stars5 Sept 2026: 2,786 stars12 Sept 2026: 2,796 stars19 Sept 2026: 2,803 stars26 Sept 2026: 2,815 stars3 Oct 2026: 2,823 stars10 Oct 2026: 2,830 stars17 Oct 2026: 2,839 stars24 Oct 2026: 2,850 stars31 Oct 2026: 2,856 stars7 Nov 2026: 2,864 stars14 Nov 2026: 2,866 stars21 Nov 2026: 2,867 stars28 Nov 2026: 2,874 stars

2,706 on 2 May 20262,874 on 28 Nov 2026

From GitHub's daily star counts.

Checked on GitHub.

Overview

SetFit fine-tunes a pretrained Sentence Transformer body plus a classification head (scikit-learn or a differentiable PyTorch SetFitHead) on a few labeled examples per class. It provides SetFitModel and Trainer classes integrated with the Hugging Face Hub for training, saving, pushing and inference. The README example trains on 8 samples per class on SST-2 and reports 0.869 accuracy.

Who it is for: ML engineers building text classifiers with very little labeled data

Strengths

  • No prompts or verbalizers needed; works from embeddings of the raw text
  • Trains on as few as 8 labeled examples per class
  • Works with any Sentence Transformer on the Hub, including multilingual checkpoints
  • Trainer and TrainingArguments API with Hub push and load, installed via pip

Weaknesses

  • Text classification only; not a general LLM fine-tuning tool
  • Built on Sentence Transformers, so results depend on the chosen base checkpoint
  • No hardware requirements documented in the README
  • README is brief; detailed guides live on the Hugging Face docs site

What it needs

  • Needs sentence-transformers, datasets, scikit-learn, PyTorch, Hugging Face Hub
  • Models: Sentence Transformers

What changed

From the release notes. No flag means the note does not say so, not that the upgrade is safe. Releases and problems by RSS

Also in Training and fine-tuning

See all 126
Also in Training and fine-tuning
RankProjectScore
#59automodelPyTorch-native fine-tuning and pretraining for Hugging Face LLMs, VLMs and diffusion1.1k starsApache-2.061 out of 100
#60rl-baselines3-zooTraining and tuning scripts with tuned hyperparameters for Stable Baselines3 Live demo ↗ (opens in a new tab)2.9k starsMIT60 out of 100
#62rllmRL training framework for language agents, on any harness or sandbox5.9k starsApache-2.058 out of 100
#63easyeditPython toolkit for editing facts and behavior in LLMs without retraining Live demo ↗ (opens in a new tab)2.9k starsMIT58 out of 100
#64gpt-neoxEleutherAI's Megatron/DeepSpeed library for pretraining large language models7.5k starsApache-2.056 out of 100