T5: Every language task is text-to-text
Raffel and collaborators · Google
Google's T5 frames every language task as text in, text out, and releases the 750 GB C4 corpus with its models. The text-to-text format and C4 become reused defaults, underpinning mT5, T0, UL2 and Flan-T5.
What T5 actually claimed
On 23 October 2019, a group of Google researchers led by Colin Raffel posted Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformer, later published in the Journal of Machine Learning Research in 2020. The paper is usually remembered for one design decision, casting every language problem as mapping an input string to an output string, but its central contribution was methodological: a large, controlled study of the choices that go into transfer learning, run inside a single framework so that objectives, architectures, datasets and fine-tuning strategies could be compared on equal terms. The name abbreviates Text-to-Text Transfer Transformer, five words that all begin with the letter T.
The narrow documented claim is that this uniform format, combined with a systematic sweep of pretraining options and additional scale, produced state-of-the-art results across a broad set of English benchmarks. The broad historical judgment, a separate matter, is that the text-to-text interface and the corpus released alongside it became defaults that later work built on. Keeping those two levels of claim apart is the point of reading the event carefully: the study measured something specific under stated conditions, and the influence came from how convenient the resulting conventions turned out to be.
The pretrain-then-finetune era it inherited
By late 2019, transfer learning in natural language processing had a recognizable shape. A model was pretrained on large amounts of unlabeled text, then adapted to a downstream task. BERT had shown that a bidirectional encoder pretrained with a masked-language objective could be fine-tuned to strong results across many tasks, and earlier work such as ELMo and the first GPT had established the pretrain-then-adapt recipe. The methodological problem was not that these systems worked poorly, but that they were hard to compare. An encoder like BERT attached a classification head for sentiment, a span-prediction head for question answering, and different preprocessing for each; a decoder-only language model produced free text; different papers used different corpora, tokenizers and training budgets. Attributing a gain to the pretraining objective rather than to incidental engineering was genuinely difficult.
The constraint T5 set out to relax was therefore comparability, not raw capability. If translation, summarization, classification, similarity scoring and reading comprehension are all expressed with the same input and output types, then the same model, the same loss and the same decoding procedure can serve all of them. Only then can a researcher change one ingredient at a time, the objective, the corpus, the model size, and read off the effect without confounds. That framing turns a collection of separately tuned systems into a single experimental apparatus.
Casting classification, regression and QA as strings
The mechanism is best understood as a discipline about interfaces. The model always reads text and always writes text. The task is signalled by a short prefix prepended to the input: translate English to German: yields a German sentence, summarize: yields a summary, and cola sentence: (drawn from the grammaticality task in the GLUE benchmark) yields the literal string acceptable or unacceptable. A reading-comprehension example concatenates question and context, and the model emits the answer as text rather than predicting start and end indices, the arrangement used in datasets like SQuAD. Even regression fits: for the semantic textual similarity task, T5 emits a number as a string, rounded to the nearest increment on the benchmark's 1-to-5 scale, instead of using a numerical output head.
The underlying network is a fairly standard encoder-decoder Transformer of the Attention Is All You Need family, with a simplified relative position scheme, rather than a new architecture. This matters for interpreting the event: the novelty is not a mechanism but a convention. A prefix is not a magic instruction the model understands in advance; it is a learned marker that lets one set of parameters route among tasks. That a single trained model can then be pointed at a new task by writing a new prefix is a property the study demonstrated empirically, not a guarantee the format supplies for free.
The Colossal Clean Crawled Corpus
A controlled study of pretraining needs a controlled source of pretraining data, and the paper built one. C4, the Colossal Clean Crawled Corpus, is roughly 750 gigabytes of English text distilled from a single monthly snapshot of Common Crawl taken in April 2019. The raw crawl is mostly boilerplate, menus, error messages and gibberish, so the authors applied a stack of heuristic filters: keep only lines ending in terminal punctuation, drop pages with too few sentences, remove pages containing words from a blocklist of offensive terms, discard code-like text and placeholder "lorem ipsum" filler, deduplicate repeated passages, and retain only text detected as English. The cleaned corpus was released through TensorFlow Datasets so others could reproduce the setup.
C4 is a load-bearing part of the contribution, not a footnote. Because the corpus was fixed and public, the ablations that followed could isolate the effect of the objective or the model from the effect of the data. It also became infrastructure in its own right, reused as a pretraining source well beyond this one paper. The same design choices that made it clean, however, encoded editorial decisions whose consequences were not fully visible at release, a point that later documentation work made concrete and that this report returns to below.
An ablation study, not a single model
The heart of the paper is a sequence of controlled comparisons, each varying one axis while holding a baseline fixed. On architecture, the authors compared the encoder-decoder Transformer against a decoder-only language model and a "prefix language model" that attends bidirectionally over the input portion. On the unsupervised objective, they compared a prefix language-modeling loss, a BERT-style masked objective, a deshuffling objective, and a span-corruption objective in which contiguous runs of tokens are removed, replaced by unique sentinel markers, and reconstructed at the output. They then swept the corruption rate and the average span length, compared C4 against alternative corpora, and compared pure pretrain-then-finetune against multi-task training that mixes supervised tasks into pretraining.
Only after establishing a strong recipe did the study scale it, training models at five sizes: roughly 60 million, 220 million, 770 million, 3 billion and 11 billion parameters, on the order of a trillion tokens for the largest configurations. The paper also compared ways of spending extra compute, training a bigger model, training the same model longer, or ensembling several, and reported that the answer depended on the budget rather than favoring one choice universally. This ordering is the paper's discipline made visible. Scale was treated as one variable among several, tested after the objective and architecture had been pinned down, rather than presented as the single explanation for the final numbers. The design deliberately separates "which recipe" from "how much of it," which is why the study reads as an argument about method as much as a report of a model.
What the experiments actually showed
The comparisons produced a consistent picture. The encoder-decoder architecture with a denoising objective outperformed the decoder-only and prefix alternatives at matched compute in their setup. Span corruption with about 15 percent of tokens dropped and a mean span length near 3 worked as well as the best alternatives while producing shorter target sequences, which made it computationally cheaper than reconstructing every masked token individually. C4 held up against other corpora, and pretraining then fine-tuning remained a strong strategy. None of these were declared universal laws; they were reported as the outcomes observed under the paper's budget and configuration.
Scaled up, the best recipe reached the top of contemporary leaderboards. The 11-billion-parameter model reported a GLUE average around 90.3, strong exact-match and F1 scores on SQuAD, and a score of 88.9 on the SuperGLUE benchmark, close to the 89.8 human baseline that benchmark's authors had established. These are task-specific measurements on curated English datasets, not statements about general understanding, and the SuperGLUE figure in particular illustrates how quickly a benchmark built to be hard can approach saturation once a well-tuned recipe is scaled against it.
The competing designs of 2019
T5 arrived in a crowded field, and reading it against real rivals is more informative than treating it as a solitary leap. The dominant pattern was the masked-language encoder: RoBERTa had shown months earlier that BERT was undertrained and could be pushed much further with more data and longer optimization, and other encoders explored permutation objectives and parameter sharing. Those systems produced excellent representations but still needed task-specific heads. Almost simultaneously, BART, posted only days after T5, used a denoising encoder-decoder as well, evidence that sequence-to-sequence denoising was an idea whose time had arrived across more than one lab rather than a single group's insight.
The unified-format idea also had a clear predecessor. The Natural Language Decathlon had already cast ten tasks as question answering over a context, arguing that a common interface could replace task-specific machinery. T5's contribution was not to invent that idea but to combine a text-to-text interface with a rigorous ablation and enough scale to make the format the setting in which competing choices could be measured. Which design would dominate was not predetermined; the era genuinely contained masked encoders, autoregressive decoders and denoising encoder-decoders as live alternatives.
The downstream trail: mT5, T0, UL2 and Flan-T5
The clearest evidence of influence is that later work reused the framework rather than merely citing it. mT5 extended the recipe to a multilingual corpus covering 101 languages, keeping the text-to-text interface intact. Multitask Prompted Training Enables Zero-Shot Task Generalization, the T0 line of work, fine-tuned a T5-family model on many tasks phrased as natural-language prompts and found it could generalize to unseen tasks, an early demonstration that the prefix idea generalizes toward instruction following. UL2 revisited the objective question directly, proposing a mixture of denoisers that unifies the span-corruption and language-modeling losses the original study had compared.
Instruction tuning then folded T5 into the modern paradigm. Scaling Instruction-Finetuned Language Models released Flan-T5 checkpoints that reached strong few-shot performance by fine-tuning on a large collection of instruction-formatted tasks, and the released checkpoints remained a common research baseline for years afterward precisely because the interface was easy to reuse. Each of these projects treats the text-to-text convention and, often, the C4 corpus as a starting substrate and changes a different ingredient on top of it: the languages covered, the way tasks are phrased, the objective, or the instruction data. That pattern, reuse of the interface with variation of one component, is exactly the kind of downstream dependency that supports a genuine influence claim rather than a chronological coincidence.
Honest limits: filtering, interfaces and saturation
Three caveats keep the significance honest. First, the cleaning that made C4 usable also shaped it in ways the paper did not fully audit. Documenting Large Webtext Corpora: A Case Study on the Colossal Clean Crawled Corpus later showed that the blocklist filter disproportionately removed text written by and about minority individuals, that the corpus contained large amounts of patent and machine-generated text, and that it drew on a specific set of sources. A single cleaned snapshot is a strong experimental control and a limited, dated picture of the web at once.
Second, a uniform interface does not equalize tasks. Casting classification, translation and similarity scoring as string generation makes them comparable in format, but they differ in how much labeled data they need, how their outputs should be evaluated, and how brittle the string encoding is (emitting a similarity score as rounded text is convenient, not obviously the best measurement). Third, benchmark strength is narrow evidence. A SuperGLUE score near the human baseline reflects performance on a specific suite assembled in 2019, and the field's repeated need to build harder benchmarks afterward is itself a sign that such numbers describe tasks, not general competence. The study's own conclusions are explicitly empirical, tied to its compute budget and configuration, and the authors framed them that way.
Placing T5 in AI history
The most defensible reading treats T5 as a consolidation, not a breakthrough. It did not introduce the Transformer, the pretrain-then-finetune recipe, denoising objectives or the idea of a unified task format; each of those has a clear antecedent, from Attention Is All You Need through BERT and The Natural Language Decathlon. What it did was assemble these into one apparatus, run the comparisons carefully enough to say which choices mattered under a fixed budget, and release the models, code and corpus so the setup could be reused. The value of a consolidation is that it turns scattered practice into a shared platform.
A reader placing the event on a timeline can navigate outward with three questions. Which earlier idea supplied a component that T5 tested rather than invented? Which later project, mT5, T0, Flan-T5, reused the interface while changing another ingredient? And which limitation, such as the corpus auditing that Dodge and colleagues documented, required additional work after the fact? Answered together, those questions locate T5 accurately: an influential experimental study whose main legacy is a set of conventions, not a claim that any single model settled how language systems should be built.
References
- Raffel, Shazeer, Roberts, Lee, Narang, Matena, Zhou, Li and Liu (2019). Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformer.
- Raffel et al. (2020). Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformer, JMLR volume 21.
- Vaswani et al. (2017). Attention Is All You Need.
- Devlin, Chang, Lee and Toutanova (2018). BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding.
- McCann, Keskar, Xiong and Socher (2018). The Natural Language Decathlon: Multitask Learning as Question Answering.
- Wang, Singh, Michael, Hill, Levy and Bowman (2018). GLUE: A Multi-Task Benchmark and Analysis Platform for Natural Language Understanding.
- Wang, Pruksachatkun, Nangia, Singh, Michael, Hill, Levy and Bowman (2019). SuperGLUE: A Stickier Benchmark for General-Purpose Language Understanding Systems.
- Rajpurkar, Zhang, Lopyrev and Liang (2016). SQuAD: 100,000+ Questions for Machine Comprehension of Text.
- Liu, Ott, Goyal, Du, Joshi, Chen, Levy, Lewis, Zettlemoyer and Stoyanov (2019). RoBERTa: A Robustly Optimized BERT Pretraining Approach.
- Lewis, Liu, Goyal, Ghazvininejad, Mohamed, Levy, Stoyanov and Zettlemoyer (2019). BART: Denoising Sequence-to-Sequence Pre-training for Natural Language Generation, Translation, and Comprehension.
- Xue, Constant, Roberts, Kale, Al-Rfou, Siddhant, Barua and Raffel (2020). mT5: A Massively Multilingual Pre-trained Text-to-Text Transformer.
- Sanh et al. (2021). Multitask Prompted Training Enables Zero-Shot Task Generalization.
- Dodge, Sap, Marasovic, Agnew, Ilharco, Groeneveld, Mitchell and Gardner (2021). Documenting Large Webtext Corpora: A Case Study on the Colossal Clean Crawled Corpus.
- Tay et al. (2022). UL2: Unifying Language Learning Paradigms.
- Chung et al. (2022). Scaling Instruction-Finetuned Language Models.
- Common Crawl Foundation (2026). Common Crawl: Open Repository of Web Crawl Data.
Cite this report
Chronicle. (2026, September 10). T5 (2019): Every language task is text-to-text. https://epoch.founden.co/events/t5
Connected developments
Follow the ideas behind this event and the developments that came after it. Connections indicate conceptual or historical relationships, not proof of sole causation.
Text-to-text lineage · 2014Sequence-to-sequence learning: One sequence becomes anotherEncoder-decoder architecture source · 2017Transformer: Attention is all you needPretrain-then-adapt precedent · 2018GPT-1: The first GPTMasked-encoder paradigm it tested · 2018BERT reads both waysFine-tuned text-to-text rival · 2020GPT-3 scales up