Skip to main content
QUICK REVIEW

[Paper Review] A Survey on Transformer Compression

Yehui Tang, Yunhe Wang|arXiv (Cornell University)|Feb 5, 2024
Power Transformer Diagnostics and InsulationEngineering13 citations
TL;DR

This survey surveys transformer compression methods (pruning, quantization, knowledge distillation, and efficient architecture design) and their NLP/CV applications, highlighting principles, relationships, and future directions.

ABSTRACT

Transformer plays a vital role in the realms of natural language processing (NLP) and computer vision (CV), specially for constructing large language models (LLM) and large vision models (LVM). Model compression methods reduce the memory and computational cost of Transformer, which is a necessary step to implement large language/vision models on practical devices. Given the unique architecture of Transformer, featuring alternative attention and feedforward neural network (FFN) modules, specific compression techniques are usually required. The efficiency of these compression methods is also paramount, as retraining large models on the entire training dataset is usually impractical. This survey provides a comprehensive review of recent compression methods, with a specific focus on their application to Transformer-based models. The compression methods are primarily categorized into pruning, quantization, knowledge distillation, and efficient architecture design (Mamba, RetNet, RWKV, etc.). In each category, we discuss compression methods for both language and vision tasks, highlighting common underlying principles. Finally, we delve into the relation between various compression methods, and discuss further directions in this domain.

Motivation & Objective

  • Motivate the need to compress large transformer models for practical deployment on resource-constrained devices.
  • Provide a structured taxonomy of transformer compression methods.
  • Discuss how compression techniques apply to both NLP and CV tasks and identify shared principles.
  • Highlight challenges and future research directions in transformer compression.

Proposed method

  • Categorize compression methods into quantization, knowledge distillation, pruning, and efficient architecture design.
  • Discuss architecture-preserving vs. architecture-breaking compression approaches.
  • Analyze NLP and CV applications separately while noting shared underlying principles.
  • Summarize quantitative performance trends and practical considerations for large-scale transformers.
  • Outline potential future directions and open problems in transformer compression.

Experimental results

Research questions

  • RQ1What are the main categories of transformer compression and how do they differ in NLP vs. CV applications?
  • RQ2How do architecture-preserving and architecture-agnostic compression methods compare in terms of performance, efficiency, and training cost?
  • RQ3What are the key challenges and open questions for deploying compressed transformer models on real-world devices and large-language-model ecosystems?
  • RQ4How can different compression techniques be combined to achieve maximal efficiency without sacrificing accuracy?

Key findings

  • Transformer compression is organized around four main categories: quantization, knowledge distillation, pruning, and efficient architecture design.
  • Transformer-specific characteristics drive tailored compression strategies for attention and FFN modules.
  • Quantization and training-efficient methods are crucial for very large models, with many PTQ and QAT approaches discussed for NLP and CV.
  • Knowledge distillation enables smaller, fast student models to approach teacher performance, including API-based (black-box) settings for LLMs.
  • Pruning and architecture design techniques offer structured reductions in computation and parameters, with cross-domain insights between NLP and CV.
  • The survey emphasizes the need for post-training compression and practical deployment considerations for edge and resource-constrained environments.

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.