File size: 1,028 Bytes
06697d0
 
434e86f
06697d0
 
 
dacc526
 
1136c5f
bce8f3a
ceb603e
bce8f3a
 
 
 
 
c7472e3
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
---
title: README
emoji: 
colorFrom: red
colorTo: indigo
sdk: static
pinned: true
license: apache-2.0
short_description: Fast and Effective Text Classification with Many Classes
---
![image/png](https://cdn-uploads.huggingface.co/production/uploads/5fc0292de45c5468456e022b/A-XcHLZlq2QYckIckA_d8.png)

FastFit, a method, and a Python package design to provide fast and accurate few-shot classification, especially for scenarios with many semantically similar classes. FastFit utilizes a novel approach integrating batch contrastive learning and token-level similarity score.  Compared to existing few-shot learning packages, such as SetFit, Transformers, or few-shot prompting of large language models via API calls, FastFit significantly improves multi-class classification performance in speed and accuracy across FewMany, our newly curated English benchmark, and Multilingual datasets. FastFit demonstrates a 3-20x improvement in training speed, completing training in just a few seconds.

```bash
pip install fast-fit
```