bart
A sequence-to-sequence text model pretrained by corrupting text and learning to restore it.
Language · 934 operations Checked
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
- Task
- Language
- Parameters
- 406.3M
- Operations
- 934
- Framework
- PyTorch
- Recurrent
- No
- Published
- 2019
- Source
- transformers 5.18.0
- 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 file opened in a new tab. Use your browser's Save command there to keep it.
The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.
Details
- Stable ID
- m3613
- Graph hash
- 19e646f3e5b17b8274eb49ee072cba005d4fdce666016b2f10dc62506bd219e3
- Skeleton hash
- 82b8131acbb690df97ef614a000971c51a2ea89f43d0d1460a02cc18459d2902
- Architecture hash
- 61124405edd556a9c34227c6716ddb19694f58bdcdd30fda27901474ef6a49ef
- Diagram SHA-256
- 1a11d3bdfc1791fb4c401e10bbcdd22af33a050d500fb6ccd32c9878dc98172c
- TorchLens version
- 2.35.3
- Renderer
- graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
- Check
- Forward pass replayed in PyTorch
How this diagram was made
transformers.AutoModel.from_config()
What it is
BART is a sequence-to-sequence model that combines the pretraining objectives from BERT and GPT. It is pretrained by corrupting text in different ways, such as deleting words, shuffling sentences or masking tokens, and learning how to fix it. The encoder encodes the corrupted document and the decoder fixes the corrupted text.
BART uses absolute position embeddings, so inputs should be padded on the right. It does not use token_type_ids for sequence classification. When no decoder input ids are passed, the forward pass of the base model creates them.
Key idea. BART pretrains a sequence-to-sequence encoder and decoder by corrupting text and learning to fix it, combining the pretraining objectives from BERT and GPT.
- BART
- sequence-to-sequence model
- denoising pretraining
- text corruption pretraining
- summarization
- mask filling
- conditional generation
- encoder-decoder
AI-written summary, based on the model's documentation and checked automatically against it; not reviewed by a person. Corrections welcome.