Few-shot learning framework for Sentence Transformers
Top 18.9% on sourcepulse
SetFit is an efficient, prompt-free framework for few-shot fine-tuning of Sentence Transformers, targeting developers and researchers needing high-accuracy text classification with minimal labeled data. It offers faster training and multilingual capabilities compared to prompt-based methods.
How It Works
SetFit leverages Sentence Transformers to generate rich text embeddings directly, bypassing the need for handcrafted prompts or verbalizers. It employs a two-stage fine-tuning process: first, it trains a classification head on generated embeddings, and then it fine-tunes the entire Sentence Transformer model using these initial predictions. This approach yields competitive accuracy with significantly less data and computation.
Quick Start & Requirements
pip install setfit
pip install git+https://github.com/huggingface/setfit.git
Highlighted Details
Maintenance & Community
black
and isort
.Licensing & Compatibility
Limitations & Caveats
The project is primarily focused on text classification tasks. While it supports multilingual models, performance may vary across languages depending on the underlying Sentence Transformer checkpoint.
3 months ago
1 day