All models

t5

The text-to-text encoder-decoder, traced here alongside its protein-language offshoots.

Language · 764 operations Checked

100%

Showing the top corner; full diagram not loaded yetShowing a small copy; full diagram not loaded yetLarge diagram, not loaded yet

Open SVG

Loading diagram (32 KB)

Open in a new tab

Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.

At a glance

Family
T5
Parameters
60.5M
Operations
764
Framework
PyTorch
Recurrent
No
Published
JMLR 2020
Cited by
10,929 (as of 18 October 2026)
Authors
Colin Raffel, Noam Shazeer, Adam Roberts and others
License
Apache-2.0
Checked
Passed: the trace was replayed operation by operation and matched the model's own output for this input.

Files

The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.

Details
Stable ID
m10470
Graph hash
344fc8b8860df0269a244641bd3053c433dc8bded5184fcc229f13adb782a5a4
Skeleton hash
a4abf8ae7cdf89850940c36df9200eb3b62bdfc90c0f7d5bfecfc8700bc2a765
Architecture hash
8cc8477375bdd436d182cdd24a76b514604dcd5458555a63430ec6b9438d24d4
Diagram SHA-256
cc13fcbfab44323a59429fd3115e4a1061537531ca5e2577c6d1422a4036b764
TorchLens version
2.36.0
Renderer
graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
Check
Forward pass replayed in PyTorch

What it is

About this model's family

T5 is the unified text-to-text Transformer from the paper Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformer, and it rests on one idea: convert every text-based language problem into a text-to-text format. The paper is as much a study as a model, systematically comparing pre-training objectives, architectures, unlabeled data sets, transfer approaches and other factors across dozens of language understanding tasks. Combining those insights with scale and the new Colossal Clean Crawled Corpus, the authors report state-of-the-art results on many benchmarks covering summarization, question answering and text classification. They released the data set, pre-trained models and code.

The family as traced here reaches well beyond text: the ProstT5 member is a protein language model which can translate between protein sequence and structure. It is based on ProtT5-XL-U50, a T5 model trained on encoding protein sequences using span corruption applied on billions of protein sequences. Its authors encode protein structures as token sequences using the 3Di alphabet introduced by the 3D-alignment method Foldseek. They built a non-redundant dataset from AlphaFoldDB and fine-tuned the existing protein language model ProtT5 to translate between 3Di and amino acid sequences. The direction of the translation is indicated by two special tokens. To avoid clashes with amino-acid tokens, 3Di tokens were cast to lower-case, since the two alphabets are otherwise identical.

For feature extraction, the ProstT5 model card recommends using only the encoder in half-precision together with batching. Generating embeddings for the human proteome with that encoder takes around 35 minutes, about 0.1 seconds per protein, on a single RTX A6000 GPU with 48 GB of memory. Translation is comparatively slow, 0.6 to 2.5 seconds per protein, because decoding must generate left to right, token by token.

Key idea. T5 recasts every NLP task as text-to-text through a single unified framework, and uses that framing to systematically compare pre-training objectives, architectures, data sets and transfer approaches at scale.

  • t5
  • text-to-text transformer
  • unified text-to-text transformer
  • colossal clean crawled corpus
  • c4
  • transfer learning
  • mt5
  • longt5
  • prott5
  • prostt5
  • protein language model
  • t5filmdecoder
  • encoder-decoder
  • seq2seq

AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.

Cite the paper

@misc{raffel2023exploringlimitstransferlearning,
      title={Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformer}, 
      author={Colin Raffel and Noam Shazeer and Adam Roberts and Katherine Lee and Sharan Narang and Michael Matena and Yanqi Zhou and Wei Li and Peter J. Liu},
      year={2023},
      eprint={1910.10683},
      archivePrefix={arXiv},
      primaryClass={cs.LG},
      url={https://arxiv.org/abs/1910.10683}, 
}