paper-with-me

Papers

Specialized Transformers: Faster, Smaller and more Accurate NLP Models

2021-09-29 · Amrit Nagarajan, Sanchari Sen, Jacob R. Stevens, Anand Raghunathan

Transformers have greatly advanced the state-of-the-art in Natural Language Processing (NLP) in recent years, but are especially demanding in terms of their computation and storage requirements. Transformers are first pre-trained on a large dataset, and subsequently fine-tuned for different downstream tasks. We observe that this design process leads to models that are not only over-parameterized for downstream tasks, but also contain elements that adversely impact accuracy of the downstream tasks. We propose a Specialization framework to create optimized transformer models for a given downstream task. Our framework systematically uses accuracy-driven pruning, i.e., it identifies and prunes parts of the pre-trained Transformer that hinder performance on the downstream task. We also replace the dense soft-attention in selected layers with sparse hard-attention to help the model focus on the relevant parts of the input. In effect, our framework leads to models that are not only faster and smaller, but also more accurate. The large number of parameters contained in Transformers presents a challenge in the form of a large pruning design space. Further, the traditional iterative prune-retrain approach is not applicable to Transformers, since the fine-tuning data is often very small and re-training quickly leads to overfitting. To address these challenges, we propose a hierarchical, re-training-free pruning method with model- and task- specific heuristics. Our experiments on GLUE and SQUAD show that Specialized models are consistently more accurate (by up to 4.5\%), while also being up to 2.5$\times$ faster and up to 3.2$\times$ smaller than the conventional fine-tuned models. In addition, we demonstrate that Specialization can be combined with previous efforts such as distillation or quantization to achieve further benefits. For example, Specialized Q8BERT and DistilBERT models exceed the performance of BERT-Base, while being up to 3.7$\times$ faster and up to 12.1$\times$ smaller.

📄 PDF Abstract BibTeX

Code (0)

등록된 구현이 없습니다.

Tasks

Hard AttentionQuantization

Methods 이 논문이 사용한 방법론

Multi-Head Attention 설명 없음
Attention 설명 없음
Pruning 설명 없음
Linear Layer A Linear Layer is a projection $\mathbf{XW + b}$.
WordPiece 설명 없음
Attention Dropout Attention Dropout is a type of dropout used in attention-based architectures, where elements are randomly dropped out of the…
Linear Warmup With Linear Decay Linear Warmup With Linear Decay is a learning rate schedule in which we increase the learning rate linearly for $n$ updates and then linearly decay afterwards.
Refunds@Expedia|||How do I get a full refund from Expedia? “How do I get a full refund from Expedia? How do I get a full refund from Expedia? – Call ☎️ +1-(888) 829 (0881) or +1-805-330-4056 or +1-805-330-4056 for Quick Help &…

Similar Papers 제목 키워드 기반

AxFormer: Accuracy-driven Approximation of Transformers for Faster, Smaller and more Accurate NLP Models

2020-10-07 · Amrit Nagarajan, Sanchari Sen, Jacob R. Stevens, Anand Raghunathan

Transformers have greatly advanced the state-of-the-art in Natural Language Processing (NLP) in recent years, but present very large computation and storage requirements. We observe that the design process of Transformer…

Hard AttentionQuantizationTransfer Learning

Towards Fast, Specialized Machine Learning Force Fields: Distilling Foundation Models via Energy Hessians

2025-01-15 · Ishan Amin, Sanjeev Raja, Aditi Krishnapriyan

The foundation model (FM) paradigm is transforming Machine Learning Force Fields (MLFFs), leveraging general-purpose representations and scalable training to perform a variety of computational chemistry tasks. Although M…

Computational chemistryKnowledge Distillation

Wide Attention Is The Way Forward For Transformers?

2022-10-02 · Jason Ross Brown, Yiren Zhao, Ilia Shumailov, Robert D Mullins

The Transformer is an extremely powerful and prominent deep learning architecture. In this work, we challenge the commonly held belief in deep learning that going deeper is better, and show an alternative design approach…

CPUtext-classificationText Classification

Learning to Grow Pretrained Models for Efficient Transformer Training

2023-03-02 · Peihao Wang, Rameswar Panda, Lucas Torroba Hennigen, Philip Greengard 외

Scaling transformers has led to significant breakthroughs in many domains, leading to a paradigm in which larger versions of existing models are trained and released on a periodic basis. New instances of such models are …

IBiT: Utilizing Inductive Biases to Create a More Data Efficient Attention Mechanism

2025-09-24 · Adithya Giri arxiv

In recent years, Transformer-based architectures have become the dominant method for Computer Vision applications. While Transformers are explainable and scale well with dataset size, they lack the inductive biases of Co…

Knowledge Distillation