All models

roberta

BERT retrained properly: a bidirectional transformer encoder, here with a chemistry SMILES variant.

Language · 310 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 (26 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
RoBERTa
Parameters
124.6M
Operations
310
Framework
PyTorch
Recurrent
No
Published
2019
Cited by
40,948 (as of 17 November 2026)
Authors
Yinhan Liu, Myle Ott, Naman Goyal 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
m8954
Graph hash
bab6ac584150104627b4290eda28fa83ce33274567c80ee3eb27ed265e3e4e7f
Skeleton hash
f1b6d14bb98056d5d791a90775514bf8edc57d5a8800b2e6a992bd8e0a22a90d
Architecture hash
fd76f1660fd1fe3a9f2230c99b4131fc1ba085e3419e5df3472b5ecf871632b8
Diagram SHA-256
c4ba6ad9d8a935d7825dae68f2371ba44400ed41d60ba4737bbffc2ad7ae3528
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

RoBERTa is a replication study of BERT pretraining that carefully measures the impact of many key hyperparameters and training data size. The motivation is that careful comparison between pretraining approaches is hard: training is computationally expensive, often done on private datasets of different sizes, and hyperparameter choices have significant impact on the final results. The headline finding is that BERT was significantly undertrained, and can match or exceed the performance of every model published after it. The models and code were released through fairseq, whose changelog records RoBERTa models and code released in July 2019.

Three of the captured members are plain encoder variants of this architecture; the fourth, ChemBERTa, is a BERT-like transformer model for masked language modelling of chemical SMILES strings. ChemBERTa was trained with HuggingFace's models and the ByteLevel tokenizer on a corpus of 100k SMILES strings from the ZINC benchmark dataset. Training RoBERTa over 5 epochs, that model reaches a loss of 0.398, which its card notes may likely continue to decline if trained for a larger number of epochs. The card also proposes attention visualization as a tool for chemistry practitioners and students to quickly identify important substructures.

Key idea. Showing that BERT was significantly undertrained: with the right pretraining choices it can match or exceed the performance of every model published after it.

  • RoBERTa
  • RoBERTa: A Robustly Optimized BERT Pretraining Approach
  • BERT
  • CamemBERT
  • ChemBERTa
  • RoBERTa-PreLayerNorm
  • masked language model
  • text encoder
  • fairseq
  • SMILES

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

Cite the paper

@misc{liu2019robertarobustlyoptimizedbert,
      title={RoBERTa: A Robustly Optimized BERT Pretraining Approach}, 
      author={Yinhan Liu and Myle Ott and Naman Goyal and Jingfei Du and Mandar Joshi and Danqi Chen and Omer Levy and Mike Lewis and Luke Zettlemoyer and Veselin Stoyanov},
      year={2019},
      eprint={1907.11692},
      archivePrefix={arXiv},
      primaryClass={cs.CL},
      url={https://arxiv.org/abs/1907.11692}, 
}