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

Flavio Di Palo, Prateek Singhi, Bilal Fadlallah
11/7/2024
cs.CL

No official code found. Best implementation: glass1720/pgkd (0 stars, last commit 2025-05-03).

Abstract

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.

View on arXivView PDF

Code Implementations(1)

glass1720/pgkdCommunity65%

unofficial implementation of Performance-Guided LLM Knowledge Distillation for Efficient Text Classification at Scale (Di Palo et al., 2024)

00Python, Jupyter NotebookMay 3, 20251 years ago

Similar Papers

Cite this paper

@article{palo2024performanceguided,
  title  = {Performance-Guided LLM Knowledge Distillation for Efficient Text Classification at Scale},
  author = {Flavio Di Palo and Prateek Singhi and Bilal Fadlallah},
  year   = {2024},
  eprint = {2411.05045},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2411.05045v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2411.05045.svg)](https://codeofpaper.com/paper/2411.05045)

Discussion