paper-with-me

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 Transformers (pre-train a foundation model on a large dataset in a self-supervised manner, and subsequently fine-tune it for different downstream tasks) leads to task-specific models that are highly over-parameterized, adversely impacting both accuracy and inference efficiency. We propose AxFormer, a systematic framework that applies accuracy-driven approximations to create optimized transformer models for a given downstream task. AxFormer combines two key optimizations -- accuracy-driven pruning and selective hard attention. Accuracy-driven pruning identifies and removes parts of the fine-tuned transformer that hinder performance on the given downstream task. Sparse hard-attention optimizes attention blocks in selected layers by eliminating irrelevant word aggregations, thereby helping the model focus only on the relevant parts of the input. In effect, AxFormer leads to models that are more accurate, while also being faster and smaller. Our experiments on GLUE and SQUAD tasks show that AxFormer models are up to 4.5% more accurate, while also being up to 2.5X faster and up to 3.2X smaller than conventional fine-tuned models. In addition, we demonstrate that AxFormer can be combined with previous efforts such as distillation or quantization to achieve further efficiency gains.

📄 PDF Abstract BibTeX arXiv:2010.03688

Code (1)

amrnag/specialized-transformers 공식 구현 pytorch

Tasks

Hard AttentionQuantizationTransfer Learning

Methods 이 논문이 사용한 방법론

Pruning 설명 없음
Linear Layer A Linear Layer is a projection $\mathbf{XW + b}$.
Absolute Position Encodings Absolute Position Encodings are a type of position embeddings for [Transformer-based models] where positional encodings are…
Position-Wise Feed-Forward Layer 설명 없음
WordPiece 설명 없음
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.
Attention Dropout Attention Dropout is a type of dropout used in attention-based architectures, where elements are randomly dropped out of the…
Weight Decay 설명 없음

Similar Papers 제목 키워드 기반

Vaxformer: Antigenicity-controlled Transformer for Vaccine Design Against SARS-CoV-2

2023-05-18 · Aryo Pradipta Gema, Michał Kobiela, Achille Fraisse, Ajitha Rajan 외

The SARS-CoV-2 pandemic has emphasised the importance of developing a universal vaccine that can protect against current and future variants of the virus. The present study proposes a novel conditional protein Language M…

Language ModelingLanguage ModellingProtein Language Model

TeamFormer: Shallow Parallel Transformers with Progressive Approximation

2025-10-17 · Wei Wang, Xiao-Yong Wei, Qing Li arxiv

The widespread 'deeper is better' philosophy has driven the creation of architectures like ResNet and Transformer, which achieve high performance by stacking numerous layers. However, increasing model depth comes with ch…

Model Compression

Linear Self-Attention Approximation via Trainable Feedforward Kernel

2022-11-08 · Uladzislau Yorsh, Alexander Kovalenko

In pursuit of faster computation, Efficient Transformers demonstrate an impressive variety of approaches -- models attaining sub-quadratic attention complexity can utilize a notion of sparsity or a low-rank approximation…

Armour: Generalizable Compact Self-Attention for Vision Transformers

2021-08-03 · Lingchuan Meng

Attention-based transformer networks have demonstrated promising potential as their applications extend from natural language processing to vision. However, despite the recent improvements, such as sub-quadratic attentio…

CodeGen: An Open Large Language Model for Code with Multi-Turn Program Synthesis

2022-03-25 · Erik Nijkamp, Bo Pang, Hiroaki Hayashi, Lifu Tu 외

Program synthesis strives to generate a computer program as a solution to a given problem specification, expressed with input-output examples or natural language descriptions. The prevalence of large language models adva…

Code GenerationHumanEvalLanguage ModelingLanguage Modelling+2