T5 Pre-training › T5 Training Scale

Michael BrenndoerferAugust 15, 20253 min read
Language AI HandbookAll chapters
Part 25 of 67Encoder-Decoder Models
Chapter 178T5 Pre-training › T5 Training Scale
Reading section 7 of 11 · T5 Training Scale · 3 minSection 7 of 11 · 3 min

Book contents

Section 7 of 11 · 3 min read

T5 Pre-training › T5 Training ScaleOne section · Sections in this chapter7 / 11 ↓
Reading tools Definitions & inline links

Choose your expertise level to adjust how many terms are explained. Beginners see more tooltips, experts see fewer to maintain reading flow. Hover over underlined terms for instant definitions.

Article links

Make inline references clickable

The T5 paper introduced models at five different scales, letting systematic study of how performance varies with model size.

Model Variants

T5 was released in five sizes:

T5 model variants with architectural specifications.
ModelParametersEncoder LayersDecoder LayersHidden SizeAttention Heads
T5-Small60M665128
T5-Base220M121276812
T5-Large770M2424102416
T5-3B3B2424102432
T5-11B11B24241024128

As shown in Table t5-variants, the largest model (T5-11B) achieved state-of-the-art results on numerous benchmarks at the time of release. The size progression allowed researchers to study scaling laws and helped establish that larger models consistently perform better when trained appropriately.

Out[17]:
Visualization
Vertical bar chart comparing T5-Small, T5-Base, T5-Large, T5-3B, and T5-11B by parameter count on a logarithmic scale, showing exponential growth from 60M to 11B.
T5 model variants by parameter count. The exponential scaling from 60M to 11B parameters enabled systematic study of how model size affects performance.

Training Configuration

T5 models were trained with the following key hyperparameters:

  • Sequence length: 512 tokens for both encoder and decoder
  • Batch size: 128 sequences (65,536 tokens per batch for T5-Base)
  • Training steps: 1 million steps for the base setup
  • Optimizer: Adafactor, a memory-efficient variant of Adam
  • Learning rate: Inverse square root decay schedule

The total compute for T5-11B was substantial, requiring multiple TPU pods running for weeks. This level of investment established a new baseline for what's possible with sufficient resources.

Effective Training Tokens

With 1 million training steps and batch size 128, the model sees:

Total examples=1,000,000×128=128,000,000\text{Total examples} = 1{,}000{,}000 \times 128 = 128{,}000{,}000

With 512 tokens per sequence:

Total tokens seen=128,000,000×512≈65.5 billion tokens\text{Total tokens seen} = 128{,}000{,}000 \times 512 \approx 65.5 \text{ billion tokens}

This means T5 was trained for less than one epoch over C4, seeing each example on average less than once. This is common in large-scale pre-training: the dataset is so large that even partial coverage gives sufficient training signal.