Scale Efficiently: Insights from Pre-training and Fine-tuning Transformers

Yi Tay, Mostafa Dehghani, Jinfeng Rao, William Fedus, Samira Abnar +5 more
9/22/2021
165 citations
cs.CLcs.AIcs.CV
transformer-attention

Official code: google-research/google-research (39,251 stars, Jupyter Notebook, Apache-2.0, last commit 2026-04-30).

Abstract

There remain many open questions pertaining to the scaling behaviour of Transformer architectures. These scaling decisions and findings can be critical, as training runs often come with an associated computational cost which have both financial and/or environmental impact.

Show full abstract

The goal of this paper is to present scaling insights from pretraining and finetuning Transformers. While Kaplan et al. presents a comprehensive study of the scaling behaviour of Transformer language models, the scope is only on the upstream (pretraining) loss. Therefore, it is still unclear if these set of findings transfer to downstream task within the context of the pretrain-finetune paradigm. The key findings of this paper are as follows: (1) we show that aside from only the model size, model shape matters for downstream fine-tuning, (2) scaling protocols operate differently at different compute regions, (3) widely adopted T5-base and T5-large sizes are Pareto-inefficient. To this end, we present improved scaling protocols whereby our redesigned models achieve similar downstream fine-tuning quality while having 50\% fewer parameters and training 40\% faster compared to the widely adopted T5-base model. We publicly release over 100 pretrained checkpoints of different T5 configurations to facilitate future research and analysis.

View on arXivView PDF

Code Implementations(1)

Apache-2.0

Google Research

39,2518,516Jupyter Notebook, PythonOct 4, 20187 months agoApache-2.0
aimachine-learningresearch

Similar Papers

Cite this paper

@article{tay2021scale,
  title  = {Scale Efficiently: Insights from Pre-training and Fine-tuning Transformers},
  author = {Yi Tay and Mostafa Dehghani and Jinfeng Rao and William Fedus and Samira Abnar and Hyung Won Chung and Sharan Narang and Dani Yogatama and Ashish Vaswani and Donald Metzler},
  year   = {2021},
  eprint = {2109.10686},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2109.10686}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2109.10686.svg)](https://codeofpaper.com/paper/2109.10686)

Discussion