All models

CDial-GPT (Chinese Dialogue GPT)

GPT-2, the WebText-trained decoder-only language model, seen here through AuGPT, CDial-GPT2 and tGPT.

Language · 541 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 (30 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
GPT-2
Parameters
95.5M
Operations
541
Framework
PyTorch
Recurrent
No
Published
2019, OpenAI technical report
Authors
Alec Radford, Jeffrey Wu, Rewon Child and others
License
MIT
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
m12362
Graph hash
3b0267eddb86cea40aa30b3b15be4c7ea503e05a5afe368bf773dbfff26fdfd0
Skeleton hash
7336e42a243c87cd0e452aaee111639e75d880d97c10903b31fa508c57f8f100
Architecture hash
fdd7d46b9bc05919f1e06c35cb012c884eeae58d6c99b1dbfb6a6dc96f8fb22d
Diagram SHA-256
5a58fb676b902c577840ed5cd2f5de0f3a6530a85a133ccf143669264d027516
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

A 12-layer GPT2 pre-trained for 70 epochs on a Chinese novel dataset and post-trained for 30 epochs on LCCC-base.

About this model's family

GPT-2 is a Transformer language model whose report makes one central claim: language models begin to learn tasks such as question answering, translation and summarization without any explicit supervision, once trained on a new dataset of millions of webpages called WebText. The largest model, GPT-2 itself, is a 1.5B parameter Transformer that reaches state of the art on 7 out of 8 tested language modeling datasets in a zero-shot setting, yet still underfits WebText. WebText was built by scraping all outbound links from Reddit that received at least 3 karma, a heuristic for pages other people found worth reading. The authors are candid that, in terms of practical applications, the zero-shot performance of GPT-2 is still far from use-able.

Architecturally the model largely follows the details of the OpenAI GPT model. Layer normalization moves to the input of each sub-block, like a pre-activation residual network, and an extra layer normalization sits after the final self-attention block. A modified initialization accounts for the accumulation on the residual path as depth grows. The vocabulary grows to 50,257 tokens and the context from 512 to 1024 tokens, with a batch size of 512. Input is a byte-level version of Byte Pair Encoding, which only needs a base vocabulary of 256. Because of that, the model can assign a probability to any Unicode string and be evaluated on any dataset regardless of tokenization. Four sizes were trained, and the smallest is equivalent to the original GPT while the second smallest matches the largest BERT. The original repository later noted that its parameter counts were wrong due to an error, so the small model may be seen referred to as 117M.

AuGPT is based on the GPT-2 LM. It adds modified training objectives for finetuning and massive back-translation data augmentation to widen the diversity of task-oriented dialogue data. CDial-GPT2 LCCC-base is a 12-layer GPT2 pre-trained for 70 epochs on a Chinese novel dataset and then post-trained for 30 epochs on the LCCC-base conversation corpus. Its input is the sum of word, speaker and position embeddings. The tGPT member applies the same generative pretraining to single-cell transcriptomes: it autoregressively models the ranking of a gene in the context of its preceding neighbors. That checkpoint was trained on more than 20 million single-cell transcriptomes with a sequence length of 64.

Key idea. GPT-2 showed that language models can perform down-stream tasks in a zero-shot setting, without any parameter or architecture modification. Its largest model is a 1.5B parameter Transformer that achieves state of the art results on 7 out of 8 tested language modeling datasets in a zero-shot setting.

  • GPT-2
  • GPT2
  • Language Models are Unsupervised Multitask Learners
  • WebText
  • OpenAI
  • zero-shot
  • language model
  • text generation
  • GPT2LMHeadModel
  • AuGPT
  • CDial-GPT
  • CDial-GPT2
  • LCCC
  • tGPT
  • transcriptome-gpt
  • iSEEEK
  • task-oriented dialogue
  • MultiWOZ

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

Cite the paper

@article{gpt22019,
  title = {Language Models are Unsupervised Multitask Learners},
  author = {Alec Radford and Jeffrey Wu and Rewon Child and David Luan and Dario Amodei and Ilya Sutskever},
  year = {2019},
  journal = {OpenAI technical report}
}