Papers · 2019 · Reading: 23 min, plus 2 in closed details.
Paper · JMLR 21(140), 2020 · arXiv 1910.10683

Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformer (T5)

Colin Raffel, Noam Shazeer, Adam Roberts, Katherine Lee, Sharan Narang, Michael Matena, Yanqi Zhou, Wei Li, Peter J. Liu
Google · October 2019 (arXiv v1 23 October 2019; JMLR 2020; arXiv v4 September 2023)

In one line: Casts every NLP task as text in, text out so that objective, architecture, corpus, fine-tuning scheme and multi-task mixing become swappable ablations of one fixed pipeline: encoder-decoder plus span corruption wins, denoising beats language modelling while the denoising variants barely differ, unfiltered Common Crawl is worst on six of seven benchmarks (level with Wikipedia on SuperGLUE) despite being 8x larger, and multi-task pretraining then fine-tuning matches plain pretraining; scaled to 11B on 1T tokens of the new C4 corpus for 90.3 GLUE and 88.9 SuperGLUE against a human 89.8, though translation stayed out of reach on English-only pretraining.

88.9 SuperGLUE
T5-11B on the test server, against a human 89.8
the previous best was 84.6 (RoBERTa) · Table 14
18 of 24 tasks
state of the art at publication
every WMT pair missed: English-only pretraining · §3.7
745 GB
C4, one month of Common Crawl, cleaned and released
unfiltered (6.1 TB) is worst on every task · Table 8

How far to trust it: Believe the big gaps (denoising over language modelling, an encoder-decoder over a causal LM, cleaned over unfiltered web text, pretraining over multi-task training alone): they are 8 to 42 standard deviations of the paper’s own run-to-run noise. Read its many “no difference” findings as “none detectable with one run each at 220M”, not as proof of equality. The evidence, point by point.

The idea in one sentence: write every NLP task as text in, text out, so that one encoder-decoder with one loss and one decoding procedure turns objective, architecture, corpus, fine-tuning and scale into knobs moved one at a time against a fixed baseline; the winners (span corruption, an encoder-decoder, the cleaned C4 corpus), scaled to 11B, reached the state of the art on 18 of 24 tasks.

You need: the encoder-decoder Transformer with cross-attention (Attention Is All You Need; the decoder block itself on The transformer from zero), and what masked and causal objectives are (Families and objectives). New terms:

  • text to text: every task's input and output are strings; a short task prefix ("translate English to German:") says which task.
  • span corruption: drop random runs of tokens, put one sentinel token in each gap, train the decoder to emit only the dropped runs.
  • C4 (Colossal Clean Crawled Corpus): 745 GB of filtered English Common Crawl, built and released by the paper.
  • coordinate ascent: the paper's method, change one component of the baseline, keep the best, move to the next.
The paper's Figure 1: four input strings with task prefixes (translate English to German, cola sentence, stsb sentence1 and sentence2, summarize) go into one box labelled T5, which emits four output strings: Das ist gut., not acceptable, 3.8, and a one-line summary.
One model, one format, four kinds of task. Notice that the outputs are strings even where the task is classification ("not acceptable") or regression ("3.8"): that is what lets every ablation below share one loss and one decoder. Figure 1 of Raffel et al., JMLR 21(140), 2020, CC BY 4.0 (licence); credits in img/CREDITS.md.

Problem

§1 Introduction, §3 intro

By 2019 pretrain-then-fine-tune clearly worked, but the field had fragmented into variations nobody could compare. Papers differed at once in pretraining objective (BERT's masked language modelling, GPT's left-to-right language modelling, XLNet's permutation objective), architecture (encoder-only, decoder-only, prefix LM), corpus (Wikipedia plus BooksCorpus, WebText, CC-News), fine-tuning scheme and evaluation protocol, so no gain could be attributed to any one axis (§1).

The goal is explicitly not a new method ("our goal is not to propose new methods but instead to provide a comprehensive perspective on where the field stands", §1): make every one of those choices a swappable component of one fixed pipeline, move one at a time against a fixed baseline, and run the grid at a scale where the answers mean something.

The authors call it "coordinate ascent" and name its weakness: it can miss interactions, such as an objective that only wins on a bigger model (§3). A secondary problem fixed along the way: there was no standard large clean pretraining corpus, because data sets usually came out as a side effect of a model release and often were never published (§3.4). The answer is C4.

Idea: every task is text in, text out

§2.4, Figure 1, Appendix D

Every task feeds the model text and trains it to produce text, with plain maximum likelihood (teacher forcing, cross-entropy) and greedy decoding (§2.4, §3.1.2). A short task prefix selects the task: translate English to German: That is good. produces Das ist gut. Classification emits the label as a word, so MNLI outputs the literal string entailment; an output matching no label counts as wrong, which "we never observed". Prefix wording mattered little and was not studied.

STS-B, a regression task scoring similarity from 1 to 5, is rounded to the nearest 0.2 and written as a string ("2.57" becomes "2.6"), which "effectively recasts the STS-B regression problem as a 21-class classification problem". Try it:

The Winograd tasks (WNLI, WSC, DPR) mark the ambiguous pronoun with asterisks and the model generates the noun phrase it refers to: "The city councilmen refused the demonstrators a permit because *they* feared violence." becomes "The city councilmen". WNLI overlaps WSC's training set, so it is never trained on and is left out of validation GLUE averages (§2.4, Appendix B).

The payoff: one model, one loss, one decoding procedure and one hyperparameter set cover translation, summarisation, question answering and classification, which is the only reason the ablations that follow are comparable.

Pick a task: the paper's own preprocessed examples (Appendix D).
input text
target text

The baseline everything is measured against

§2.1, §3.1, Table 1

A standard encoder-decoder Transformer, encoder and decoder each sized like BERT-Base: 12 blocks, dmodel 768, dff 3072 (ReLU), 12 heads, dropout 0.1. "About 220 million parameters", roughly twice BERT-Base because there are two stacks; the configuration counts to 222.9 million, exactly the released checkpoint (recount). Three departures from Vaswani et al. 2017 outlived the paper (§2.1):

  • Rescale-only layer norm ("No bias and no subtraction of mean", the Hugging Face port), later standardised as RMSNorm, applied to each sub-layer's input with the residual adding the un-normalised input back: pre-norm, not the original post-norm. What either choice does to training is taught on Normalisation, residuals and stability.
  • A relative position bias in its cheapest form: one learned scalar per head added to each attention logit, chosen by the key-query offset from 32 buckets that grow logarithmically up to an offset of 128, shared across layers. A layer is blind beyond 128; stacked layers can combine local information. How it compares with sinusoids, ALiBi and RoPE is on Positional encodings.
T5's bucketing function, live

Computed with T5's own bucketing function (Hugging Face's _relative_position_bucket, from Mesh TensorFlow; in src/inputs/t5_code_extracts.py). The bidirectional encoder splits the 32 into 16 per direction (offsets 0 to 7 exact, then wider bins); the decoder looks back only and spends all 32 on the past.

Budget (§3.1.2): pretraining is 219 steps of 128 sequences of 512 tokens packed to about 216 tokens, so 235 ≈ 34B tokens with no repeats: about a quarter of BERT's 137B and a sixty-fourth of RoBERTa's 2.2T (137B / 235 = 4.0, 2.2T / 235 = 64.0), so dozens of variants are affordable.

The rest of the training recipe: optimiser, schedule, fine-tuning, vocabulary

Adafactor (Adam's second-moment matrix factorised into row and column vectors, to save memory) (§3.1.2, §3.1.3). The learning rate is 1/√max(n, 104): 0.01 for 104 steps, then an inverse square root decay (which the paper calls "exponential"). Fine-tuning is 218 steps per task at a constant 0.001, best validation checkpoint (every 5,000 steps). SentencePiece, 32,000 wordpieces shared by input and output, trained on English C4 mixed 10:1:1:1 with German, French and Romanian so translation targets are representable at all.

Noise floor (§3.1.5, Table 1): the baseline was trained 10 times; its spread (GLUE standard deviation 0.235, SuperGLUE 0.416, but 3.2 on CB's F1, whose validation set has 56 examples) is assumed for every variant, and every table bolds scores within two standard deviations of the best. Without pretraining the model scores 66.22 GLUE and 53.04 SuperGLUE against 83.28 and 71.36; only English to French, a big data set, barely moves.

Span corruption, the baseline objective

§3.1.4, Figure 2

Sample 15% of tokens; replace each consecutive run of corrupted tokens with one sentinel unique within the example; make the target only the dropped spans, each after its sentinel, closed by a final sentinel. Unlike BERT-style masking the target is the missing text, not the whole sequence, so decoder sequences stay short, a choice made "to reduce the computational cost of pre-training".

The baseline decides token by token, so spans happen by chance; the final recipe corrupts contiguous spans of mean length 3, which shortens sequences further (§3.3.4). Span corruption is now one of the standard objectives, compared with the others on Families and objectives; here is only what this paper built and measured.

The same sentence under the baseline, the objective it replaced and the one it chose

  1. The text. The paper's sentence, one token per word: 11 tokens on the back row.
  2. Pick tokens independently. Each token is picked for corruption on its own coin flip, with probability 15%. Here three are (red): "for", "inviting" and "last" (Figure 2).
  3. One sentinel per run. Each run of consecutive picked tokens becomes one sentinel, unique within the example: "for inviting" becomes <X>, "last" becomes <Y>. The input row shrinks from 11 tokens to 10.
  4. The target is only what was dropped. The dropped spans, each after the sentinel that replaced it, closed by a final sentinel <Z>: 6 tokens instead of 11. Computed here from the mask alone with the ported T5 functions, it matches Figure 2 token for token.
  5. The encoder reads, the decoder writes. The encoder reads all 10 input tokens, each seeing every other; the decoder writes the 6 target tokens one at a time, each reading the encoder's output through cross-attention. The decoder's work follows the target, not the text.
  6. At 512 tokens, to scale. Per 512 tokens of text the target averages about 144 tokens (77 corrupted words plus about 66 sentinels and EOS), against BERT-style's 512, for a higher score: SuperGLUE 71.36 (Table 5). This is the baseline objective.

Steps 1 to 4 use the paper's own corrupted examples: BERT-style from Table 3 (with "apple" as the random replacement), the i.i.d. baseline from Figure 2, random spans from Table 3 (an illustrative mask, heavier than 15%). Step 6 is to scale at 512 tokens of original text, with the expected lengths computed from the corruption rules (the lengths chart in Objectives). Scores are SuperGLUE from Tables 4, 5 and 7.

Run the T5 masking code on your own text

Every objective here is T5's own preprocessing (random_spans_noise_mask, noise_span_to_unique_sentinel, random_spans_helper, i.i.d. noise, BERT-style) ported line by line from t5/data/preprocessors.py (code; the excerpts are in src/inputs/t5_code_extracts.py) and checked against it by src/check_core.mjs.

Try: pick an objective and press Resample a few times: with i.i.d. noise the number of corrupted words changes from draw to draw, while random spans always corrupt exactly round(n × rate) words in exactly round(that / mean span) spans, because the T5 code fixes both counts and only shuffles where the boundaries fall. Raise the rate to 50% and watch the target catch up with the input.

input (encoder)
target (decoder)

Architectures: which stack, which mask

§3.2, Figures 3 and 4, Table 2

The variants differ mainly in their attention masks (Figure 3): fully visible (every position sees the whole input) or causal (position i sees only up to i). An encoder-decoder has a fully visible encoder, a causal decoder and cross-attention; a language model is one causal stack over input and target concatenated; a prefix LM is that stack made fully visible over the input, "similar to an encoder-decoder model with parameters shared across the encoder and decoder" (§3.2.1).

Making them comparable (§3.2.2): an L + L encoder-decoder has the parameters of a 2L-layer language model but the cost of an L-layer one, since each of its stacks sees only half the sequence (step times matched). Cross-attention is set aside as "about 10%" of the parameters (12.7% at the baseline size, recount). Five structures: encoder-decoder (2P, M), the same with shared parameters (P, M), half depth (P, M/2), language model (P, M) and prefix LM (P, M), each with the denoising and a language-modelling objective.

  1. Encoder-decoder, the baseline. The input "translate English to German: That is good." goes up a 12-block encoder whose mask is fully visible (blue square on the floor: every input word attends to every input word, before and after it, as in BERT). The target "Das ist gut." goes up a 12-block decoder: causal self-attention (orange triangle) plus cross-attention to every encoder output (green block); nothing flows from the target back into the input. Two stacks, so 2P parameters, but each word passes through only one of them, so the cost per example is M.
  2. Shared parameters. The same two stacks and the same mask, but the encoder and decoder use one set of weights (purple): P parameters at the same cost M.
  3. Half depth. 6 + 6 blocks: P parameters and half the cost, M/2.
  4. Language model. One 12-block stack over input and target concatenated with a "target:" marker, 11 tokens, all causal. "translate" cannot see "good.", so the beginning of the input is "unnecessarily limited", the frequently cited drawback the paper names (§3.2.1). The target continues the same triangle, predicted like the next words of a document, which is how GPT-2 did tasks zero-shot. P parameters, and the stack runs over input and target, so the cost is M.
  5. Prefix LM. The same stack and sequence; only the mask changes: fully visible over the prefix (everything up to "target:"), causal after it. Target words see the whole prefix: the same visible cells as the encoder-decoder, but one stack's weights for all of them and no separate cross-attention. For classification it "closely resembles BERT". P, M.
  6. Five structures, matched on cost. Four have half the encoder-decoder's parameters, and one of those also half its cost; each is trained with the denoising objective and with a language-modelling one. Which comes closest to the encoder-decoder? Predict below before you look at the scores.

The paper's example: 7 input words, 3 target words. Each plate on the floor is that structure's attention mask (row: the position attending; column: the position it reads), coloured by whose weights do it; each slab is one block. P is one BERT-Base-sized stack, M the FLOPs of the L + L encoder-decoder per example (§3.2.2). Masks in general, and the encoder-decoder's read-once cache, are drawn on Families and objectives (its Figs. 2 and 5).

four variants have half the encoder-decoder's parameters. Which comes closest to it on GLUE (denoising; encoder-decoder 83.28)?

So the encoder-decoder with denoising wins on every task, at matched compute and twice the parameters. Why it matters says why the field went decoder-only anyway.

Objectives: denoising wins, then nothing matters much

§3.3, Figure 5, Tables 3 to 7

A funnel (Figure 5), each step in the grid:

  • Three approaches (Table 4): BERT-style (corrupt 15%, 90% to a mask token and 10% to a random token, reconstruct everything) 82.96 GLUE, prefix language modelling 80.69, deshuffling 73.17. Denoising beats language modelling beats deshuffling, and that is the only large gap.
  • Simplifying BERT-style (Table 5): MASS-style masking, replacing spans with sentinels and dropping corrupted tokens all perform about the same.
  • Corruption rate (Table 6): 10%, 15% and 25% are indistinguishable; 50% hurts.
  • Span length (Table 7): mean spans of 2, 3 and 5 are indistinguishable, 10 slightly worse; 3 "slightly (but significantly)" beats i.i.d. corruption on most non-translation tasks.

The authors' conclusion (§3.3.5): choose among denoising variants on cost, not quality, and further tinkering here is unlikely to pay. That cost is mostly the target length: per 512 tokens of text, 512 for BERT-style, about 144 for the i.i.d. baseline, exactly 104 for spans of mean 3 (computed by the chart beside this text). The same gap-is-noise reading of objectives, and what decoder-only models train on instead, is on Pretraining.

A fifth of BERT-style's target, no worse a score: what each objective costs

The decoder's target length is that cost's clearest part (the decoder runs over the target, and its self-attention grows with the target's square). The chart puts every objective row of Tables 4 to 7 at its target length per 512 tokens of original text, against its measured score; the grey band is two baseline standard deviations below the best, the paper's own "no real difference" zone.

Target lengths are computed, not published: full reconstruction (BERT-style, MASS-style, deshuffling) is all 512; prefix LM about 256 (a uniform random split); i.i.d. noise at rate p is np corrupted tokens plus one sentinel per clean run, np + (1 − p) + (n − 1)p(1 − p) + 1 on average (dropping tokens: np + 1); random spans are round(np) + round(round(np) / span) + 1 exactly. Counting EOS as the T5 code does. Check against the T5 code:

Data: C4, and why filtering beats volume

§2.2, §3.4, Tables 8 and 9

C4 is about 750 GB of English (745 GB in Table 8) from one month of Common Crawl (April 2019), cleaned with blunt heuristics (§2.2): keep only lines ending in terminal punctuation and with at least 5 words; drop pages with fewer than 3 sentences; drop pages with a word from the "List of Dirty, Naughty, Obscene or Otherwise Bad Words", with "lorem ipsum", or with a curly bracket (a cheap code detector); drop lines mentioning Javascript or policy boilerplate ("terms of use", "cookie policy" and similar); strip Wikipedia citation markers; keep one copy of any repeated three-sentence span; keep pages langdetect calls English with probability at least 0.99. These rules run on real Common Crawl text, beside Gopher's and FineWeb's, on Extraction and filtering.

without those filters (language detection kept) the corpus is 6.1 TB, 8.2 times larger. Pretrained on it, the baseline does what?

Repetition (Table 9): truncating C4 and looping it for the same 235 tokens, 64 repeats is harmless, 1,024 repeats costs 3.7 GLUE points and 4.6 on SQuAD, and training loss falls as the set shrinks (Figure 6), the memorisation signature. Unlabelled data is cheap, so use a large set. How much repetition is safe at today's scale (about four epochs) is on Data mixing.

Fine-tuning and multi-task mixing

§3.5, Tables 10 to 12

Fine-tuning (Table 10): updating all parameters wins. Adapter layers (dense-ReLU-dense blocks after each feed-forward network, only they and the layer norms trained) work only with an inner size scaled to the task; gradual unfreezing costs a little accuracy and buys some speed. The main-text Table 10 has a misprint (checks).

Multi-task learning (§3.5.2): with no task-specific heads it is just mixing data sets, C4 included. Examples-proportional mixing samples task m with rm = min(em, K) / Σ min(en, K), the cap K stopping C4 and WMT English to French from crowding out everything; temperature-scaled mixing raises each rate to 1/T and renormalises; equal mixing samples every task alike. Runs last 219 + 218 steps.

Multi-task training alone loses to pretrain-then-fine-tune; equal mixing is a disaster (76.13 GLUE); examples-proportional mixing has a sweet spot in K; T = 2 is a reasonable single knob (temperature mixing as later multilingual models used it is on Data mixing). But multi-task pretraining then per-task fine-tuning matches plain pretraining (83.11 against 83.28, Table 12), and leaving a task out of the pretraining mix barely hurts it afterwards, so task interference is mild.

The rule is the paper's; the sizes are TensorFlow Datasets training-split counts for the sets it names (it used TFDS, §2.3; WSC plus DPR approximate). Passes assume one example per sequence, 128 per batch, 786,432 steps; packing raises them, so they are illustrative. Scores are the measured Table 11 row.

Scaling: given 4× the compute

§3.6, Table 13

"You were just given 4× more compute. How should you use it?" (§3.6): 4× steps, a 4× batch, a 2× model (BERT-Large-shaped) for 2× steps, a 4× model for the baseline's steps, or an ensemble of 4 separately trained models.

which single-model option scores highest on SuperGLUE (baseline 71.36)?

The question is answered as a fitted law, size against tokens for a fixed budget, on Pretraining (scaling laws) and the Chinchilla page.

Putting it all together: T5

§3.7, Table 15

Everything combined (§3.7): span corruption at mean length 3; C4; multi-task pretraining (C4 given an artificial size from 710,000 examples for Small to 133,000,000 for 11B) then per-task fine-tuning (GLUE and SuperGLUE task by task, batch 8); 1M steps at a batch of 211 sequences of 512 tokens, "about 1 trillion" tokens, "about 32×" the baseline; beam search (width 4, α = 0.6) for translation and summarisation. Five sizes: Small 60M, Base 220M, Large 770M, 3B and 11B. The two largest keep Large's 24 layers and dmodel 1024 and scale dff (16,384 and 65,536) and heads (32 and 128) instead, because TPUs are "most efficient for large dense matrix multiplications".

Two printed numbers that do not quite reproduce

"About 32×" is exactly 32× if the million steps are 220; 106 would give 30.5×. Large's configuration counts to 737.7M (770.6M only if its tied output layer is counted twice), and 3B to 2.85B (recount).

Was the study worth anything beyond scale? The baseline trained for the same 1T tokens ("baseline-1T") against T5-Base, which differs only in the "non-scaling" changes (Table 15): T5-Base wins on every task.

Gains over the baseline from 1T tokens, then from the non-scaling changes (Table 15, validation). Scale bought more on GLUE, SuperGLUE and EnRo; the changes bought more on CNN/DM, SQuAD, EnDe and EnFr.

Results

§3.7, Table 14
  • 18 of 24 tasks at the state of the art (as of 24 October 2019). Recounted from Table 14 independently: 18 of 24, counting a task only when all its metrics beat the previous best (QQP is split). The 11B model is best of the five sizes "across all tasks", except English to Romanian (3B 28.2 against 28.1).
  • GLUE 90.3, state of the art; SuperGLUE 88.9 against a previous best of 84.6 and a human 89.8, above humans on MultiRC and ReCoRD, well below on COPA and WSC (humans 100%).
  • SQuAD 91.26 exact match and 96.22 F1 (validation), over a point above ALBERT; CNN/Daily Mail state of the art, significantly only on ROUGE-2.
  • WMT translation: state of the art on no pair (EnDe 32.1 against 33.8, EnFr 43.4 against 43.8, EnRo 28.1 against 38.5), which the authors put down to English-only pretraining and to not using backtranslation, which the leading systems relied on. mT5 was the direct follow-up.

The benchmark numbers are the least durable part. What aged well is the ablation grid, a controlled same-pipeline measurement of what each choice is worth, which is why the paper is cited for its negative findings (corruption rate barely matters, denoising variants barely differ, multi-task alone underperforms) as often as for T5. The ablation grid rebuilds all of it.

How much of this to believe

§3.1.5, Tables 1 to 16

What holds up. The paper measured its own noise (10 runs of the baseline, Table 1) and changed one thing at a time against a fixed pipeline. The findings the field kept are many standard deviations wide (gap / Table 1's standard deviation): encoder-decoder over a causal LM (83.28 − 74.70) / 0.235 = 36.5 on GLUE (Table 2); BERT-style over deshuffling 41.7 and over prefix language modelling 9.7 (Table 4); C4 over unfiltered 7.7 on GLUE and 8.0 on SuperGLUE (Table 8); pretrain-then-fine-tune over equal mixing 30.4 (Table 11). Later work kept them: span corruption and C4's filters were reused for years, and FineWeb re-ablated each filter on a newer crawl and kept all but one (FineWeb §3.5).

Where to be careful.

  • One run per variant. Only the baseline was repeated; every other row is a single run assumed to be as noisy. The authors say so and why (cost), which counts in their favour (§3.1.5).
  • Most "no difference" findings sit inside the noise. 12 of the 56 non-baseline ablation rows are within two standard deviations of the baseline on GLUE, 8 on SuperGLUE. Span corruption's edge over i.i.d. noise, which chose the final objective, is 0.9 standard deviations on GLUE and 2.8 on SuperGLUE and SQuAD (Table 7), one run each. That these variants are about equal is well supported; which is best is not.
  • Selection on the reported set. Each score is the best of about 52 checkpoints chosen on the same validation set, per task (§3.1.2), and bold means "near the best single run", itself biased upwards; both inflate small tasks most (CB has 56 validation examples).
  • Matched on compute, not parameters. The winning encoder-decoder has twice the parameters of the language models it beats, as the paper states (§3.2.2).
  • Coordinate ascent. Winners chosen one axis at a time at 220M were combined at up to 11B without testing interactions (flagged by the authors, §3); the one check at scale (Table 15) bundles several changes.
  • Body against appendix. Three main-table cells disagree with Table 16 (one row of Table 10 is a copy of another), Large's "770M" does not match its configuration, and "best across all tasks" has an exception in Table 14 (checks).
  • Leaderboard wins compare unlike things, partly stated: single T5-11B models against ensembles, SQuAD on validation (§3.7). And "further tinkering is unlikely to pay" was revised by UL2's mixture of denoisers, which outperformed T5-like and GPT-like models (UL2).

Verdict. Trust the direction of the large effects and the C4 recipe. Treat the rankings among near-equal variants (objectives, corruption rates, span lengths, mixing settings) as unresolved, and the leaderboard numbers as a snapshot of October 2019.

Why it matters

beyond the paper: later work, each claim linked

C4 became infrastructure. Released with its pipeline (a TensorFlow Datasets build; AllenAI later hosted the files), it pretrained unrelated models such as LLaMA 1 (15% C4, per Dolma), and FineWeb calls it "one of the first large scale LLM training datasets". Its heuristics became the template later corpora argued with: RefinedWeb tabulates them (RefinedWeb), Dolma reuses some, FineWeb kept all but terminal punctuation, which helps most alone but removes around 30% of tokens (FineWeb §3.5). That filtering beats raw volume is now assumed.

Span corruption became the default encoder-decoder objective: kept by mT5 (mT5) and ByT5 (spans of 20 bytes on average, ByT5), and one of UL2's denoisers (UL2). Not LongT5, which the older version of this page listed: it uses PEGASUS-style principle-sentence generation instead (LongT5 §5.3).

Text to text prefigured instruction tuning. Task prefixes are a hard-coded ancestor of the natural-language instruction: FLAN fine-tuned on "tasks described via instructions" (FLAN) and Flan-T5 did it on T5 checkpoints across 1.8K tasks (Flan-T5), the direct line to how models are post-trained today.

The encoder-decoder finding lost, and why. T5 measured it above decoder-only at matched compute; the field went decoder-only regardless, for reasons T5 did not test: in-context learning arrived seven months later with GPT-3, "without any gradient updates or fine-tuning" (GPT-3), rewarding one causal stack; a decoder is simpler to serve (one KV cache, no encoder pass); prompt-and-continue unifies training and inference. Reruns: Ettin (2025) finds encoder-only against decoder-only task-dependent, without testing an encoder-decoder (Ettin); Encoder-Decoder Gemma, adapted from Gemma, is comparable in pretraining and substantially better after fine-tuning at a similar inference budget (arXiv 2504.06225).

Details leaked. Rescale-only norm outside the residual path, the shared relative position bias and Adafactor were popularised here; T5 1.1 then moved to GeGLU, no pretraining dropout, C4 only and untied embeddings (released checkpoints). The SuperGLUE human baseline held until January 2021, when a single 1.5B DeBERTa passed it, 89.9 against 89.8 (DeBERTa).

Where the checkpoints are used now (checked 2 October 2026)

The size ladder (Small to XXL) still names Flan-T5, and the frozen T5 encoder conditions image generators: Imagen (Imagen), Stable Diffusion 3 (SD3) and FLUX.1 (google/t5-v1_1-xxl, diffusers).

Connections. Attention Is All You Need: the architecture kept. BERT: the denoising objective is a modified BERT masked LM, and the architecture ablation largely a controlled test of BERT's encoder-only assumption. GPT-3: the opposite fork, seven months later. Switch Transformers: T5-Base and T5-Large with span corruption on C4 as its dense control, 7× faster against them (Switch). Ettin and Encoder-Decoder Gemma: the architecture question rerun. Chinchilla: the size-or-steps question answered with a fitted law. RAG: facts in a swappable index rather than in the weights. Topics: llm-training-and-post-training (objectives, multi-task mixing, transfer), data-curation-and-datasets (C4, filtering, repetition), llms (the encoder-decoder lineage).