This is the DAGsHub mirror of GPT-2 made by OpenAI.

Code for the paper "Language Models are Unsupervised Multitask Learners"

Jeff Wu 0574c5708b delete 1 year ago
src ac5d52295f nucleus sampling 1 year ago
.gitattributes 68bf7a0036 add .gitattributes file to ensure files copied to docker container have LF line endings and all files stay unix on commit 2 years ago
.gitignore 0503b1b249 updates for 345M model 2 years ago d14501aade Update 2 years ago fbae7db92a update readmes 1 year ago
Dockerfile.cpu fbae7db92a update readmes 1 year ago
Dockerfile.gpu fbae7db92a update readmes 1 year ago
LICENSE 0574c5708b delete 1 year ago 03fce0a080 Update 1 year ago
domains.txt cb415376c3 add model card 1 year ago f35fa1d920 push 774M model 1 year ago ebdba20a19 updated g_form contact 1 year ago
requirements.txt 8eb67930d7 Python download script (#89) 2 years ago

Status: Archive (code is provided as-is, no updates expected)


Code and models from the paper "Language Models are Unsupervised Multitask Learners".

You can read about GPT-2 and its staged release in our original blog post, 6 month follow-up post, and final post.

We have also released a dataset for researchers to study their behaviors.

* Note that our original parameter counts were wrong due to an error (in our previous blog posts and paper). Thus you may have seen small referred to as 117M and medium referred to as 345M.


This repository is meant to be a starting point for researchers and engineers to experiment with GPT-2.

For basic information, see our model card.

Some caveats

  • GPT-2 models' robustness and worst case behaviors are not well-understood. As with any machine-learned model, carefully evaluate GPT-2 for your use case, especially if used without fine-tuning or in safety-critical applications where reliability is important.
  • The dataset our GPT-2 models were trained on contains many texts with biases and factual inaccuracies, and thus GPT-2 models are likely to be biased and inaccurate as well.
  • To avoid having samples mistaken as human-written, we recommend clearly labeling samples as synthetic before wide dissemination. Our models are often incoherent or inaccurate in subtle ways, which takes more than a quick read for a human to notice.

Work with us

Please let us know if you’re doing interesting research with or working on applications of GPT-2! We’re especially interested in hearing from and potentially working with those who are studying

  • Potential malicious use cases and defenses against them (e.g. the detectability of synthetic text)
  • The extent of problematic content (e.g. bias) being baked into the models and effective mitigations






Please use the following bibtex entry:

  title={Language Models are Unsupervised Multitask Learners},
  author={Radford, Alec and Wu, Jeff and Child, Rewon and Luan, David and Amodei, Dario and Sutskever, Ilya},

Future work

We may release code for evaluating the models on various benchmarks.

We are still considering release of the larger models.


Modified MIT