arXiv:2411.05045cs.CL2024-11EMNLP被引 29

用性能反馈循环提升小模型精度,让文本分类快130倍、省25倍

Performance-Guided LLM Knowledge Distillation for Efficient Text Classification at Scale

  • 让小模型和大模型动态协作,根据表现自动筛选训练数据
  • 在多分类任务上超越BERT-base,推理速度提升130倍,成本降25倍
  • 适合工业级文本分类,也适用于生成类任务的轻量化部署

大语言模型在推理时面临计算开销大的难题。为此,我们提出性能引导的知识蒸馏(PGKD),一种高效且高吞吐的生产级文本分类解决方案。PGKD通过师生知识蒸馏将大模型知识迁移到更小的任务专用模型中。它建立学生模型与大模型之间的主动学习循环:大模型利用难负样本挖掘、学生模型验证表现及早停策略,持续生成新训练数据。该循环式、性能感知的方法针对工业文本分类中常见的高类别、稀疏标注数据集,有效缓解训练难题,在多个多分类数据集上优于传统BERT-base模型及其他知识蒸馏方法。成本与延迟基准测试显示,经PGKD微调的模型在相同分类任务上,推理速度最高可达大模型的130倍,成本低至25分之一。尽管本文聚焦文本分类,其通用框架可扩展至任意大模型蒸馏任务,包括语言生成,是优化多种AI应用性能的强大工具。

原文摘要 · Abstract (English)

Large Language Models (LLMs) face significant challenges at inference time due to their high computational demands. To address this, we present Performance-Guided Knowledge Distillation (PGKD), a cost-effective and high-throughput solution for production text classification applications. PGKD utilizes teacher-student Knowledge Distillation to distill the knowledge of LLMs into smaller, task-specific models. PGKD establishes an active learning routine between the student model and the LLM; the LLM continuously generates new training data leveraging hard-negative mining, student model validation performance, and early-stopping protocols to inform the data generation. By employing a cyclical, performance-aware approach tailored for highly multi-class, sparsely annotated datasets prevalent in industrial text classification, PGKD effectively addresses training challenges and outperforms traditional BERT-base models and other knowledge distillation methods on several multi-class classification datasets. Additionally, cost and latency benchmarking reveals that models fine-tuned with PGKD are up to 130X faster and 25X less expensive than LLMs for inference on the same classification task. While PGKD is showcased for text classification tasks, its versatile framework can be extended to any LLM distillation task, including language generation, making it a powerful tool for optimizing performance across a wide range of AI applications.

知识蒸馏文本分类推理加速LLM优化

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。