All models

roberta-prelayernorm

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

Language · 311 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 (28 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
311
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
m8956
Graph hash
197586ab22ea1e1526f01f32c1c71f901838108550feb652df44ef8dfd2c6405
Skeleton hash
9ad9f18c469b6d51a7bc3e463332318a417587f3f5068e3786ebb1db8a719e7d
Architecture hash
8e488c6acacad1940bc9d3b9edbb67c6571f849fb81e022d38238a2dc6c9078e
Diagram SHA-256
9d00a08c0e3c091dbab1718e854b115842e2848655c79a48f7ecb741683807de
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}, 
}