Primer: Searching for Efficient Transformers for Language Modeling
Not on the map. Why?
Abstract (arXiv)
Large Transformer models have been central to recent advances in natural language processing. The training and inference costs of these models, however, have grown rapidly and become prohibitively expensive. Here we aim to reduce the costs of Transformers by searching for a more efficient variant. Compared to previous approaches, our search is performed at a lower level, over the primitives that define a Transformer TensorFlow program. We identify an architecture, named Primer, that has a smaller training cost than the original Transformer and other variants for auto-regressive language modeling. Primer's improvements can be mostly attributed to two simple modifications: squaring ReLU activations and adding a depthwise convolution layer after each Q, K, and V projection in self-attention. Experiments show Primer's gains over Transformer increase as compute scale grows and follow a power law with respect to quality at optimal model sizes. We also verify empirically that Primer can be dropped into different codebases to significantly speed up training without additional tuning. For example, at a 500M parameter size, Primer improves the original T5 architecture on C4 auto-regressive language modeling, reducing the training cost by 4X. Furthermore, the reduced training cost means Primer needs much less compute to reach a target one-shot performance. For instance, in a 1.9B parameter configuration similar to GPT-3 XL, Primer uses 1/3 of the training compute to achieve the same one-shot performance as Transformer. We open source our models and several comparisons in T5 to help with reproducibility.
Key facts. Cited by 162 papers in the map (data through 7 Oct 2026). Builds on 48 of its 60 references that are in the map. First posted on arXiv 17 Sep 2021.
Builds on
48 of 60 references.
References · 48
- 2017Attention Is All You Needcited by 59,932
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
- 2020Language Models are Few-Shot Learnerscited by 32,199
- 2019Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformercited by 14,491
- 2019RoBERTa: A Robustly Optimized BERT Pretraining Approachcited by 13,266
- 2019EfficientNet: Rethinking Model Scaling for Convolutional Neural Networkscited by 6,415
- 2020Scaling Laws for Neural Language Modelscited by 6,411
- 2016Layer Normalizationcited by 5,579
- 2021Switch Transformers: Scaling to Trillion Parameter Models with Simple and Efficient Sparsitycited by 3,014
- 2014Sequence to Sequence Learning with Neural Networkscited by 2,974
- 2019XLNet: Generalized Autoregressive Pretraining for Language Understandingcited by 2,801
- 2018SentencePiece: A simple and language independent subword tokenizer and detokenizer for Neural Text Processingcited by 1,973
36 more
- 2020Conformer: Convolution-augmented Transformer for Speech Recognitioncited by 1,838
- 2020GLU Variants Improve Transformercited by 1,724
- 2019Root Mean Square Layer Normalizationcited by 1,425
- 2020Making Pre-trained Language Models Better Few-shot Learnerscited by 1,255
- 2018Self-Attention with Relative Position Representationscited by 1,112
- 2021CvT: Introducing Convolutions to Vision Transformerscited by 946
- 2018MnasNet: Platform-Aware Neural Architecture Search for Mobilecited by 937
- 2020On Layer Normalization in the Transformer Architecturecited by 906
- 2018Regularized Evolution for Image Classifier Architecture Searchcited by 902
- 2018Adafactor: Adaptive Learning Rates with Sublinear Memory Costcited by 896
- 2019Compressive Transformers for Long-Range Sequence Modellingcited by 699
- 2016Hyperband: A Novel Bandit-Based Approach to Hyperparameter Optimizationcited by 688
- 2016Language Modeling with Gated Convolutional Networkscited by 688
- 2020It's Not Just Size That Matters: Small Language Models Are Also Few-Shot Learnerscited by 668
- 2018ProxylessNAS: Direct Neural Architecture Search on Target Task and Hardwarecited by 666
- 2021Carbon Emissions and Large Neural Network Trainingcited by 561
- 2020Towards a Human-like Open-Domain Chatbotcited by 467
- 2017Large-Scale Evolution of Image Classifierscited by 348
- 2013One Billion Word Benchmark for Measuring Progress in Statistical Language Modelingcited by 302
- 2019Random Search and Reproducibility for Neural Architecture Searchcited by 253
- 2016Dense Associative Memory for Pattern Recognitioncited by 230
- 2018Adaptive Input Representations for Neural Language Modelingcited by 226
- 2020Synthesizer: Rethinking Self-Attention in Transformer Modelscited by 204
- 2015Semi-supervised Sequence Learningcited by 198
- 2017Hierarchical Representations for Efficient Architecture Searchcited by 188
- 2019The Evolved Transformercited by 180
- 2018QANet: Combining Local Convolution with Global Self-Attention for Reading Comprehensioncited by 164
- 2018Efficient Multi-objective Neural Architecture Search via Lamarckian Evolutioncited by 151
- 2020AutoML-Zero: Evolving Machine Learning Algorithms From Scratchcited by 137
- 2021Entailment as Few-Shot Learnercited by 122
- 2019Evaluating the Search Phase of Neural Architecture Searchcited by 120
- 2021Do Transformer Modifications Transfer Across Implementations and Applications?cited by 87
- 2019Lingvo: a Modular and Scalable Framework for Sequence-to-Sequence Modelingcited by 86
- 2018Tensor2Tensor for Neural Machine Translationcited by 85
- 2020Can weight sharing outperform random architecture search? An investigation with TuNAScited by 68
- 2020Evolving Normalization-Activation Layerscited by 45
Built on by
Citing papers per year: 2021: 5; 2022: 35; 2023: 32; 2024: 28; 2025: 30; 2026: 32.
162 papers.
Sort:
By area:
- 2022Flamingo: a Visual Language Model for Few-Shot Learningcited by 4,337
- 2022Scaling Instruction-Finetuned Language Modelscited by 2,997
- 2022Fast Inference from Transformers via Speculative Decodingcited by 1,615
- 2023RWKV: Reinventing RNNs for the Transformer Eracited by 814
- 2022ST-MoE: Designing Stable and Transferable Sparse Expert Modelscited by 391
- 2023SqueezeLLM: Dense-and-Sparse Quantizationcited by 285
- 2022Zero-Shot Video Question Answering via Frozen Bidirectional Language Modelscited by 229
- 2021Efficient Training of Audio Transformers with Patchoutcited by 222
- 2023Multimodal C4: An Open, Billion-scale Corpus of Images Interleaved with Textcited by 208
- 2022Transformer Quality in Linear Timecited by 189
- 2022The Carbon Footprint of Machine Learning Training Will Plateau, Then Shrinkcited by 183
- 2022Mega: Moving Average Equipped Gated Attentioncited by 178
38 more
- 2023Speculative Decoding with Big Little Decodercited by 163
- 2022Compute Trends Across Three Eras of Machine Learningcited by 161
- 2022A Fast Post-Training Pruning Framework for Transformerscited by 161
- 2023Neural Architecture Search: Insights from 1000 Paperscited by 136
- 2022MetaFormer Baselines for Visioncited by 131
- 2023EvoPrompting: Language Models for Code-Level Neural Architecture Searchcited by 129
- 2024Transformers are Multi-State RNNscited by 120
- 2021The Efficiency Misnomercited by 98
- 2025NVIDIA Nemotron Nano 2: An Accurate and Efficient Hybrid Mamba-Transformer Reasoning Modelcited by 94
- 2025Nemotron-H: A Family of Accurate and Efficient Hybrid Mamba-Transformer Modelscited by 88
- 2021NormFormer: Improved Transformer Pretraining with Extra Normalizationcited by 83
- 2024Transformers Can Achieve Length Generalization But Not Robustlycited by 82
- 2022Cramming: Training a Language Model on a Single GPU in One Daycited by 81
- 2023Full Stack Optimization of Transformer Inference: a Surveycited by 79
- 2023MatFormer: Nested Transformer for Elastic Inferencecited by 79
- 2022Tranception: protein fitness prediction with autoregressive transformers and inference-time retrievalcited by 78
- 2023OtterHD: A High-Resolution Multi-modality Modelcited by 72
- 2023Conditional Adapters: Parameter-efficient Transfer Learning with Fast Inferencecited by 69
- 2025Don't be lazy: CompleteP enables compute-efficient deep transformerscited by 69
- 2024ReLU2 Wins: Discovering Efficient Activation Functions for Sparse LLMscited by 66
- 2025Dion: Distributed Orthonormalized Updatescited by 64
- 2024Model Compression and Efficient Inference for Large Language Models: A Surveycited by 62
- 2022General-purpose, long-context autoregressive modeling with Perceiver ARcited by 60
- 2022VeLO: Training Versatile Learned Optimizers by Scaling Upcited by 57
- 2024Mechanistic Design and Scaling of Hybrid Architecturescited by 57
- 2024Training-Free Activation Sparsity in Large Language Modelscited by 51
- 2025Baichuan-M1: Pushing the Medical Capability of Large Language Modelscited by 41
- 2022Machine Learning Model Sizes and the Parameter Gapcited by 39
- 2022Compute-Efficient Deep Learning: Algorithmic Trends and Opportunitiescited by 38
- 2023A Survey of Techniques for Optimizing Transformer Inferencecited by 35
- 2021NLP From Scratch Without Large-Scale Pretraining: A Simple and Efficient Frameworkcited by 34
- 2023AutoML in the Age of Large Language Models: Current Challenges, Future Opportunities and Riskscited by 34
- 2025Scaling Behavior of Discrete Diffusion Language Modelscited by 32
- 2025Physics of Language Models: Part 4.1, Architecture Design and the Magic of Canon Layerscited by 32
- 2023Brainformers: Trading Simplicity for Efficiencycited by 31
- 2024Multi-Candidate Speculative Decodingcited by 30
- 2023Prismer: A Vision-Language Model with Multi-Task Expertscited by 28
- 2023Gradient-Free Structured Pruning with Unlabeled Datacited by 26
50 most cited of 162 All 162 (JSON)
- 2026Beyond Compression: Training Latent Representations for Stable Long-Horizon Rollout in Neural Surrogate Solvers24 Sep 2026
- 2026Musec: MomentUm SpEctral Clipping for Stable Muon-type Training10 Sep 2026
- 2026Can Transformers Really Do It All? On the Compatibility of Inductive Biases Across Tasks20 Jul 2026
- 2026Parameter Golf: What Really Works?1 Jul 2026
- 2026Beyond a Single Explanation of the Adam--SGD Gap12 Jun 2026
- 2026Dynamic Short Convolutions Improve Transformers2 Jun 2026
- 2026Energy-Gated Attention and Wavelet Positional Encoding: Complementary Inductive Biases for Transformer Attention25 May 2026
- 2026Mapping the Schedule x Bit-Width Boundary in Sub-100M Quantisation-Aware Training25 May 2026
- 2026Towards the Connection between Activation Sparsity and Flat Minima25 May 2026
- 2026Multi-Gate Residuals22 May 2026
- 2026Same Architecture, Different Capacity: Optimizer-Induced Spectral Scaling Laws20 May 2026
- 2026Most Transformer Modifications Still Do Not Transfer at 1-3B: A 2020-2026 Update to Narang et al. (2021) with Downstream Evaluation and a Noise Floor20 May 2026
38 more
- 2026Introspective X Training: Feedback Conditioning Improves Scaling Across all LLM Training Stages19 May 2026
- 2026DynMuon: A Dynamic Spectral Shaping View of Muon16 May 2026
- 2026Domyn-Small: A European 10B Reasoning Language Model13 May 2026
- 2026Can Muon Fine-tune Adam-Pretrained Models?11 May 2026
- 2026Revisiting Transformer Layer Parameterization Through Causal Energy Minimization8 May 2026
- 2026ELAS: Efficient Pre-Training of Low-Rank Large Language Models via 2:4 Activation Sparsity5 May 2026
- 2026Carbon-Taxed Transformers: A Green Compression Pipeline for Overgrown Language Models28 Apr 2026
- 2026How Much Is One Recurrence Worth? Iso-Depth Scaling Laws for Looped Language Models22 Apr 2026
- 2026Three-Phase Transformer15 Apr 2026
- 2026Beyond Linearity in Attention Projections: The Case for Nonlinear Queries11 Mar 2026
- 2026Mousse: Rectifying the Geometry of Muon with Curvature-Aware Preconditioning10 Mar 2026
- 2026NOBLE: Accelerating Transformers with Nonlinear Low-Rank Branches6 Mar 2026
- 2026ActTail: Global Activation Sparsity in Large Language Models18 Feb 2026
- 2026Variable-Length Semantic IDs for Recommender Systems18 Feb 2026
- 2026HyperMLP: An Integrated Perspective for Sequence Modeling13 Feb 2026
- 2026On State Reduction in Linear Attention4 Feb 2026
- 2026From Competition to Collaboration: Designing Sustainable Mechanisms Between LLMs and Online Forums4 Feb 2026
- 2026No Generation without Representation: Efficient Causal Protein Language Models Enable Zero-Shot Fitness Estimation2 Feb 2026
- 2026Shaping capabilities with token-level data filtering29 Jan 2026
- 2026Closed-Loop LLM Discovery of Non-Standard Channel Priors in Vision Models13 Jan 2026
- 2025Yggdrasil: Bridging Dynamic Speculation and Static Runtime for Latency-Optimal Tree-Based LLM Decoding29 Dec 2025
- 2025Physics of Language Models: Part 4.1, Architecture Design and the Magic of Canon Layers19 Dec 2025
- 2025Resting Neurons, Active Insights: Robustifying Activation Sparsity in LLMs via Spontaneity14 Dec 2025
- 2025CurvaDion: Curvature-Adaptive Distributed Orthonormalization13 Dec 2025
- 2025Speedrunning ImageNet Diffusion13 Dec 2025
- 2025Scaling Behavior of Discrete Diffusion Language Models11 Dec 2025
- 2025BitSkip: An Empirical Analysis of Quantization and Early Exit Composition in Transformers27 Oct 2025
- 2025Sequence Modeling with Spectral Mean Flows17 Oct 2025
- 2025Predicting Training Re-evaluation Curves Enables Effective Data Curriculums for LLMs29 Sep 2025
- 2025Beyond Outliers: A Study of Optimizers Under Quantization27 Sep 2025
- 2025FastGRPO: Accelerating Policy Optimization via Concurrency-aware Speculative Decoding and Online Draft Learning26 Sep 2025
- 2025NVIDIA Nemotron Nano 2: An Accurate and Efficient Hybrid Mamba-Transformer Reasoning Model20 Aug 2025
- 2025DistrAttention: An Efficient and Flexible Self-Attention Mechanism on Modern GPUs23 Jul 2025
- 2025Fast and Simplex: 2-Simplicial Attention in Triton3 Jul 2025
- 2025La RoSA: Enhancing LLM Efficiency via Layerwise Rotated Sparse Activation2 Jul 2025
- 2025TriADA: Massively Parallel Trilinear Matrix-by-Tensor Multiply-Add Algorithm and Device Architecture for the Acceleration of 3D Discrete Transformations28 Jun 2025
- 2025Why Neural Network Can Discover Symbolic Structures with Gradient-based Training: An Algebraic and Geometric Foundation for Neurosymbolic Reasoning26 Jun 2025
- 2025Guidelines for the Quality Assessment of Energy-Aware NAS Benchmarks21 May 2025
50 newest of 162 All 162 (JSON)
- 2022Fast Inference from Transformers via Speculative Decodingcited by 1,615
- 2023Speculative Decoding with Big Little Decodercited by 163
- 2024Transformers are Multi-State RNNscited by 120
- 2024Training-Free Activation Sparsity in Large Language Modelscited by 51
- 2024Multi-Candidate Speculative Decodingcited by 30
- 2025Yggdrasil: Bridging Dynamic Speculation and Static Runtime for Latency-Optimal Tree-Based LLM Decodingcited by 4
- 2025BitSkip: An Empirical Analysis of Quantization and Early Exit Composition in Transformerscited by 1
- 2025Yggdrasil: Bridging Dynamic Speculation and Static Runtime for Latency-Optimal Tree-Based LLM Decoding29 Dec 2025
- 2025BitSkip: An Empirical Analysis of Quantization and Early Exit Composition in Transformers27 Oct 2025
- 2024Training-Free Activation Sparsity in Large Language Models26 Aug 2024
- 2024Multi-Candidate Speculative Decoding12 Jan 2024
- 2024Transformers are Multi-State RNNs11 Jan 2024
- 2023Speculative Decoding with Big Little Decoder15 Feb 2023
- 2022Fast Inference from Transformers via Speculative Decoding30 Nov 2022
- 2025NVIDIA Nemotron Nano 2: An Accurate and Efficient Hybrid Mamba-Transformer Reasoning Modelcited by 94
- 2025Nemotron-H: A Family of Accurate and Efficient Hybrid Mamba-Transformer Modelscited by 88
- 2025FastGRPO: Accelerating Policy Optimization via Concurrency-aware Speculative Decoding and Online Draft Learningcited by 7
- 2024Decoding at the Speed of Thought: Harnessing Parallel Decoding of Lexical Units for LLMscited by 2
- 2025FFN Fusion: Rethinking Sequential Computation in Large Language Modelscited by 1
- 2025Why Neural Network Can Discover Symbolic Structures with Gradient-based Training: An Algebraic and Geometric Foundation for Neurosymbolic Reasoningcited by 1
- 2026Domyn-Small: A European 10B Reasoning Language Modelcited by 0
- 2026Domyn-Small: A European 10B Reasoning Language Model13 May 2026
- 2025FastGRPO: Accelerating Policy Optimization via Concurrency-aware Speculative Decoding and Online Draft Learning26 Sep 2025
- 2025NVIDIA Nemotron Nano 2: An Accurate and Efficient Hybrid Mamba-Transformer Reasoning Model20 Aug 2025
- 2025Why Neural Network Can Discover Symbolic Structures with Gradient-based Training: An Algebraic and Geometric Foundation for Neurosymbolic Reasoning26 Jun 2025
- 2025Nemotron-H: A Family of Accurate and Efficient Hybrid Mamba-Transformer Models4 Apr 2025
- 2025FFN Fusion: Rethinking Sequential Computation in Large Language Models24 Mar 2025
- 2024Decoding at the Speed of Thought: Harnessing Parallel Decoding of Lexical Units for LLMs24 May 2024
- 2025Scaling Behavior of Discrete Diffusion Language Modelscited by 32
- 2024Improving Musical Accompaniment Co-creation via Diffusion Transformerscited by 11
- 2025Speedrunning ImageNet Diffusioncited by 1
- 2025Speedrunning ImageNet Diffusion13 Dec 2025
- 2025Scaling Behavior of Discrete Diffusion Language Models11 Dec 2025
- 2024Improving Musical Accompaniment Co-creation via Diffusion Transformers30 Oct 2024
- 2022Flamingo: a Visual Language Model for Few-Shot Learningcited by 4,337
- 2023Prismer: A Vision-Language Model with Multi-Task Expertscited by 28
- 2023Prismer: A Vision-Language Model with Multi-Task Experts4 Mar 2023
- 2022Flamingo: a Visual Language Model for Few-Shot Learning29 Apr 2022
- 2024Affordable Generative Agentscited by 8
- 2024Affordable Generative Agents3 Feb 2024
- 2022Scaling Instruction-Finetuned Language Modelscited by 2,997
- 2023RWKV: Reinventing RNNs for the Transformer Eracited by 814
- 2023SqueezeLLM: Dense-and-Sparse Quantizationcited by 285
- 2022Zero-Shot Video Question Answering via Frozen Bidirectional Language Modelscited by 229
- 2021Efficient Training of Audio Transformers with Patchoutcited by 222
- 2023Multimodal C4: An Open, Billion-scale Corpus of Images Interleaved with Textcited by 208
- 2022Transformer Quality in Linear Timecited by 189
- 2022The Carbon Footprint of Machine Learning Training Will Plateau, Then Shrinkcited by 183
- 2022Mega: Moving Average Equipped Gated Attentioncited by 178
- 2022Compute Trends Across Three Eras of Machine Learningcited by 161
- 2022A Fast Post-Training Pruning Framework for Transformerscited by 161
- 2023Neural Architecture Search: Insights from 1000 Paperscited by 136
12 most cited of 138 All 138 (JSON)
- 2026Beyond Compression: Training Latent Representations for Stable Long-Horizon Rollout in Neural Surrogate Solvers24 Sep 2026
- 2026Musec: MomentUm SpEctral Clipping for Stable Muon-type Training10 Sep 2026
- 2026Can Transformers Really Do It All? On the Compatibility of Inductive Biases Across Tasks20 Jul 2026
- 2026Parameter Golf: What Really Works?1 Jul 2026
- 2026Beyond a Single Explanation of the Adam--SGD Gap12 Jun 2026
- 2026Dynamic Short Convolutions Improve Transformers2 Jun 2026
- 2026Energy-Gated Attention and Wavelet Positional Encoding: Complementary Inductive Biases for Transformer Attention25 May 2026
- 2026Mapping the Schedule x Bit-Width Boundary in Sub-100M Quantisation-Aware Training25 May 2026
- 2026Towards the Connection between Activation Sparsity and Flat Minima25 May 2026
- 2026Multi-Gate Residuals22 May 2026
- 2026Same Architecture, Different Capacity: Optimizer-Induced Spectral Scaling Laws20 May 2026
- 2026Most Transformer Modifications Still Do Not Transfer at 1-3B: A 2020-2026 Update to Narang et al. (2021) with Downstream Evaluation and a Noise Floor20 May 2026
12 newest of 138 All 138 (JSON)