When LLMs are Unfit Use FastFit: Fast and Effective Text Classification with Many Classes

Fuente: arXiv
Gespeichert in:
Bibliographische Detailangaben
Hauptverfasser: Yehudai, Asaf, Bendel, Elron
Format: Preprint
Veröffentlicht: 2024
Schlagworte:
Online-Zugang:
Tags: Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
_version_ 1866917643842224128
author Yehudai, Asaf
Bendel, Elron
author_facet Yehudai, Asaf
Bendel, Elron
contents We present 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 multiclass 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. The FastFit package is now available on GitHub and PyPi, presenting a user-friendly solution for NLP practitioners.
format Preprint
id arxiv_https___arxiv_org_abs_2404_12365
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle When LLMs are Unfit Use FastFit: Fast and Effective Text Classification with Many Classes
Yehudai, Asaf
Bendel, Elron
Computation and Language
Artificial Intelligence
Information Retrieval
Machine Learning
We present 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 multiclass 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. The FastFit package is now available on GitHub and PyPi, presenting a user-friendly solution for NLP practitioners.
title When LLMs are Unfit Use FastFit: Fast and Effective Text Classification with Many Classes
topic Computation and Language
Artificial Intelligence
Information Retrieval
Machine Learning
url https://arxiv.org/abs/2404.12365