当LLM不适用时使用FastFit:多类别快速有效的文本分类
When LLMs are Unfit Use FastFit: Fast and Effective Text Classification with Many Classes
AI总结:
FastFit通过批量对比学习和token级相似度评分,在少样本多类分类中实现快速高精度,训练速度提升3-20倍。
摘要:
我们提出了FastFit,一种方法和Python包,旨在提供快速且准确的少样本分类,尤其适用于许多语义相似类别的场景。FastFit采用了一种新颖的方法,整合了批量对比学习和token级相似度评分。与现有的少样本学习包(如SetFit、Transformers)或通过API调用对大型语言模型进行少样本提示相比,FastFit在我们新整理的英文基准FewMany和多语言数据集上,显著提高了多类分类性能的速度和准确性。FastFit展示了3-20倍的训练速度提升,仅需几秒即可完成训练。FastFit包现已在GitHub和PyPi上提供,为NLP从业者呈现了一个用户友好的解决方案。
英文摘要:
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.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。