SetFit

Few-shot text classification framework using Sentence Transformers.

Open SourceSelf HostedOffline Capable
0.0 (0)

About

Few-shot text classification without prompt engineering is the focus of SetFit, an open-source framework from Hugging Face. Instead of wrapping examples in handcrafted prompts for a large language model, it fine-tunes a pretrained Sentence Transformer with contrastive learning on a small number of labeled pairs, then trains a lightweight classification head, either a scikit-learn classifier or a PyTorch alternative, on the resulting embeddings. With as few as eight labeled examples per class it can match models trained on far larger datasets, and because the underlying encoder is small, both training and inference are fast and cheap compared with LLM-based approaches. Multilingual classification works by swapping in a multilingual Sentence Transformer checkpoint. The library exposes two main components, SetFitModel and Trainer, integrates with the Hugging Face Hub for sharing checkpoints, and installs with pip. It suits teams that need production text classifiers for tasks like sentiment, intent, or topic labeling but have little labeled data.

Reviews (0)

Leave a Review

No reviews yet. Be the first to review!

Details

Price
Free
Platform
Local/Desktop
Difficulty
Easy (2/5)
License
Apache-2.0
Added
Apr 3, 2026

Related Tools

Topic modeling library leveraging transformer embeddings and c-TF-IDF.

Open SourceSelf HostedOffline
Easy
0.0 (0)

Simple framework for state-of-the-art NLP by Zalando Research.

Open SourceSelf HostedOffline
Easy
0.0 (0)

Library for efficient text classification and word representation by Meta.

Open SourceSelf HostedOffline
Easy
0.0 (0)

Topic modeling and document similarity library for unsupervised NLP.

Open SourceSelf HostedOffline
Easy
0.0 (0)

Generalist model for named entity recognition using bidirectional transformer.

Open SourceSelf HostedOffline
Easy
0.0 (0)

Research library for NLP by AI2 built on PyTorch.

Open SourceSelf HostedOffline
Intermediate
0.0 (0)
Browse all Natural Language Processing tools