Reproduce “Primer: Searching for Efficient Transformers for Language Modeling” on OpenResearch
Run Claude Code, Codex or any coding agent as a research agent: literature, hypotheses and experiments on your laptop, cluster or cloud GPUs.
Universal app for Apple silicon and Intel. Requires macOS 11 or later.
About this paper
David R. So, Wojciech Mańke, Hanxiao Liu, Zihang Dai, Noam Shazeer, Quoc V. Le
Researchers at Google Research, Brain Team, developed Primer-EZ, a Transformer architecture derived from neural architecture search, which reduces training compute by 2.12X to 4.2X while maintaining or improving performance on auto-regressive language modeling tasks. This efficiency comes from two simple modifications: squared ReLU activations and multi-depthwise convolution head attention, which are robust across diverse settings.
Key insights
- Substantial compute efficiency gains for Transformer models can be achieved by performing Neural Architecture Search at a low granularity, exploring fundamental TensorFlow primitives.
- An implicit efficiency objective, which prioritizes validation loss under a fixed compute budget, is crucial for discovering architectures that are genuinely more training-efficient.
- Two simple architectural changes – squared ReLU activations and depthwise convolutions placed after Q/K/V projections in attention (MDHA) – account for most of Primer's robust efficiency improvements.
Summary by alphaXiv.
Tip: change arxiv.org to autoarxiv.org in any arXiv abstract link to open the paper here.