All models

longt5

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

Language · 963 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
963
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
m5656
Graph hash
1f8b3817b6c275ee93d3df4e6a58cf1c24b0cf1e462ad9203bff8ed3161e7bca
Skeleton hash
a38522489742f9ff7b7f8e0876fd6c62fb69e8c085777052db9132b5894687c4
Architecture hash
016914432dc800ba6fecd3040263e5c6a27b7dd1f5f06bd396e96a165a1a09ab
Diagram SHA-256
af9051018081837d0d66faba4d71cecd548e18419cdfc3e8460bda2e4ead0c96
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}, 
}