HackerPapers

arXiv:2404.12365cs.CL

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

Asaf Yehudai, Elron Bendel

Early discovery. Linked by one identifiable commenter. This paper is outside the main ranking; a mention is not an endorsement.

Abstract

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.

arXiv comments
Accepted to NAACL
Journal reference
DOI
Subjects
cs.CLComputation and Language cs.AIArtificial Intelligence cs.IRInformation Retrieval cs.LGMachine Learning

On Hacker News

Linked by 1 identifiable commenter in 1 comment across 1 thread, from Jul 2024 to Jul 2024.

Comments linking this paper, per year.

Discussed in comments1 thread

  1. What happened to BERT and T5? 1 comment
    • Yes, no zero shot. Few shot is possible for some use cases with setfit: https://github.com/huggingface/setfit and the very recent Fastfit: https://github.com/IBM/fastfit ( https://arxiv.org/pdf/2404.12365 )

      byefruitView on HNParent context

Submitted to Hacker News

Connected through shared HN threads, not inferred similarity or a recommendation.