All models

prophetnet

An encoder-decoder pre-trained to predict the next n tokens at once with n-stream self-attention.

Language · 1,976 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 (60 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

Parameters
391.3M
Operations
1,976
Framework
PyTorch
Recurrent
No
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
m8407
Graph hash
3176872841c76cab6e7bca7680a5345c6f43ee729eebcf6f588ee765c498623c
Skeleton hash
48ae3355153b9eb23696c0ade523c05a68041cbb419b6445837c9997241eaa7a
Architecture hash
34bed50eb8bf8bc30a5e74b1a15d092cc4394b2ac99bdd8498c93dca81b5ebeb
Diagram SHA-256
b36b4085b9df4f6141c53e4e30bff9f98f270284ca1c90626db0599a0db55d0a
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

How this diagram was made

transformers.AutoModel.from_config()

What it is

About this model's family

ProphetNet is an encoder-decoder model that can predict n future tokens, for what its authors call "ngram" language modeling, instead of just the next token. The paper introduces a self-supervised objective named future n-gram prediction together with an n-stream self-attention mechanism. Instead of one-step-ahead prediction, ProphetNet is optimised by n-step-ahead prediction, predicting the next n tokens simultaneously from the previous context tokens at each time step.

Architecturally it follows the original Transformer, but swaps the standard self-attention in the decoder for a main self-attention mechanism plus a self and n-stream (predict) self-attention mechanism. It was pre-trained on a 16GB base-scale dataset and a 160GB large-scale dataset, then tested on CNN/DailyMail, Gigaword and SQuAD 1.1 for abstractive summarization and question generation. Because it uses absolute position embeddings, inputs are usually padded on the right rather than the left.

Key idea. Future n-gram prediction, a self-supervised sequence-to-sequence objective paired with an n-stream self-attention mechanism.

  • prophetnet
  • xlm-prophetnet
  • prophet net
  • future n-gram prediction
  • n-stream self-attention
  • sequence-to-sequence
  • abstractive summarization
  • question generation

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