Skip to main content
QUICK REVIEW

[Paper Review] AutoDistill: an End-to-End Framework to Explore and Distill Hardware-Efficient Language Models

Xiaofan Zhang, Zongwei Zhou|arXiv (Cornell University)|Jan 21, 2022
Topic ModelingComputer Science5 citations
TL;DR

AutoDistill is an end-to-end framework that uses Bayesian Optimization for multi-objective neural architecture search and Flash Distillation for rapid model candidate evaluation to build hardware-efficient, task-agnostic NLP models. It achieves up to 3.2% higher pre-trained accuracy and 1.44× faster inference latency than MobileBERT, with a 20.6M-parameter model outperforming BERT BASE and other distilled models on GLUE and SQuAD benchmarks.

ABSTRACT

Recently, large pre-trained models have significantly improved the performance of various Natural LanguageProcessing (NLP) tasks but they are expensive to serve due to long serving latency and large memory usage. To compress these models, knowledge distillation has attracted an increasing amount of interest as one of the most effective methods for model compression. However, existing distillation methods have not yet addressed the unique challenges of model serving in datacenters, such as handling fast evolving models, considering serving performance, and optimizing for multiple objectives. To solve these problems, we propose AutoDistill, an end-to-end model distillation framework integrating model architecture exploration and multi-objective optimization for building hardware-efficient NLP pre-trained models. We use Bayesian Optimization to conduct multi-objective Neural Architecture Search for selecting student model architectures. The proposed search comprehensively considers both prediction accuracy and serving latency on target hardware. The experiments on TPUv4i show the finding of seven model architectures with better pre-trained accuracy (up to 3.2% higher) and lower inference latency (up to 1.44x faster) than MobileBERT. By running downstream NLP tasks in the GLUE benchmark, the model distilled for pre-training by AutoDistill with 28.5M parameters achieves an 81.69 average score, which is higher than BERT_BASE, DistillBERT, TinyBERT, NAS-BERT, and MobileBERT. The most compact model found by AutoDistill contains only 20.6M parameters but still outperform BERT_BASE(109M), DistillBERT(67M), TinyBERT(67M), and MobileBERT(25.3M) regarding the average GLUE score. By evaluating on SQuAD, a model found by AutoDistill achieves an 88.4% F1 score with 22.8M parameters, which reduces parameters by more than 62% while maintaining higher accuracy than DistillBERT, TinyBERT, and NAS-BERT.

Motivation & Objective

  • To address the lack of automated, scalable, and latency-aware model distillation in datacenter deployments.
  • To reduce the cost and time of exploring student model architectures for large pre-trained models.
  • To enable efficient identification of high-potential student models before full distillation.
  • To optimize for both prediction accuracy and inference latency on target hardware simultaneously.
  • To support end-to-end, automated, and production-ready distillation of NLP models for datacenter serving.

Proposed method

  • Employ Bayesian Optimization (BO) to perform multi-objective neural architecture search (NAS) that jointly optimizes for accuracy and inference latency on target hardware.
  • Introduce Flash Distillation, a model-agnostic technique that uses only 5% of the full distillation steps (37k steps vs. 740k) to early identify promising student model candidates.
  • Use a progressive knowledge transfer strategy in Flash Distillation with a fixed ratio (0.48) between progressive and pre-training distillation steps.
  • Evaluate candidate models early using a logarithmic accuracy growth curve to determine optimal stopping points for cost-effective selection.
  • Integrate BO with Flash Distillation to accelerate the search process while maintaining high-quality model discovery.
  • Conduct end-to-end distillation on TPUv4i hardware, evaluating on GLUE and SQuAD benchmarks for comprehensive performance assessment.

Experimental results

Research questions

  • RQ1Can an automated, end-to-end framework effectively explore and distill hardware-efficient NLP models with minimal human intervention?
  • RQ2How can multi-objective neural architecture search be efficiently applied to balance accuracy and inference latency in model distillation?
  • RQ3Can a short, progressive distillation phase (Flash Distillation) reliably identify high-potential student models before full training?
  • RQ4To what extent can Flash Distillation reduce the cost of model exploration without sacrificing final model performance?
  • RQ5Can the resulting distilled models outperform existing state-of-the-art distilled models in both accuracy and latency on standard benchmarks?

Key findings

  • AutoDistill discovered seven student model architectures with up to 3.2% higher pre-trained accuracy and up to 1.44× faster inference latency than MobileBERT on TPUv4i.
  • The 28.5M-parameter model achieved an 81.69 average GLUE score, outperforming BERT BASE (109M), DistillBERT (67M), TinyBERT (67M), NAS-BERT, and MobileBERT (25.3M).
  • The most compact model with 20.6M parameters achieved a higher average GLUE score than BERT BASE, DistillBERT, TinyBERT, and MobileBERT, despite an 81.1% reduction in size.
  • On the SQuAD benchmark, two AutoDistill models with under 23M parameters achieved higher F1 scores than DistillBERT, TinyBERT, and NAS-BERT, while reducing parameters by over 62%.
  • Flash Distillation with 37k steps successfully identified promising models with only 5% of the training cost, maintaining stable relative performance rankings compared to full distillation.
  • The integration of BO and Flash Distillation reduced the overall search cost significantly while enabling the discovery of models that outperform existing baselines in both accuracy and latency.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.