PaperPretrain, then fine-tune

GPT-1 (2018): generative pretraining with a Transformer

Event date

On 11 June 2018 OpenAI published a paper by Alec Radford, Karthik Narasimhan, Tim Salimans and Ilya Sutskever, with a blog post and code. It pretrained a Transformer decoder on a large body of unlabelled text, then fine-tuned it for each task. The model was later called GPT-1 and started the line that leads to ChatGPT.

Milestone 5 of 68 on the LLM history timeline, 2016 to 2026. Each dot is one milestone.

Key numbers

Layers, decoder only Transformer, per Hugging Face model card
12huggingface.co
Pretraining books in BooksCorpus, per Hugging Face model card
over 7,000huggingface.co
ROCStories accuracy, single run reported in the paper
86.5%github.com
ROCStories median accuracy over 10 runs, OpenAI repository
85.8%github.com

What OpenAI released

The paper, titled Improving Language Understanding by Generative Pre-Training, came with an OpenAI blog post dated 11 June 2018 and a public code repository. The authors were Alec Radford, Karthik Narasimhan, Tim Salimans and Ilya Sutskever. The title names the idea: pretrain a generative language model first, then adapt it to understanding tasks. The release came about five months after ULMFiT and four months after ELMo.

The name GPT-1 was applied afterwards, once GPT-2 existed. In the Hugging Face library the model is listed as openai-gpt. The OpenAI repository carries an MIT licence and is now archived, marked as provided as is with no updates expected.

Sources: openai.com, github.com

How it worked

The method has two stages. First, a language model is trained without labels to predict the next word. Second, the same network is fine-tuned on a smaller labelled dataset for a specific task, with only small changes to the input format.

The model is a decoder only Transformer with 12 layers, 768 dimensional hidden states and 12 attention heads, which is roughly 0.1 billion parameters. It was trained on BooksCorpus, a set of more than 7,000 unpublished books, using sequences of up to 512 tokens. The model card reports about 30 days of training on 8 GPUs. Other listed details are learned position embeddings, the GELU activation, a byte pair encoding vocabulary with 40,000 merges, the Adam optimiser with a peak learning rate of 0.00025 and 100 training epochs.

Sources: huggingface.co

What it showed and what came next

OpenAI's public code release reproduces one result from the paper, the ROCStories Cloze Test, where the paper reported 86.5 per cent accuracy for a single run. The repository notes that the median over ten runs with default settings is 85.8 per cent, because GPU operations make training non deterministic.

The central claim was that one pretrained model, with little adaptation, could do well across several different language understanding tasks.

GPT-1 arrived months before BERT, which used the same pretrain then fine-tune idea with a bidirectional Transformer encoder. OpenAI kept to the decoder only route: GPT-2 in February 2019 was a much larger version trained on web text, and the later GPT models continued the same design.

Sources: github.com, huggingface.co, arxiv.org

Why it mattered

  • It was the first GPT, and every later GPT model follows its basic recipe of next word prediction followed by adaptation.
  • It was an early demonstration that the Transformer could be pretrained for language understanding, not only translation.
  • It chose the decoder only design that later chatbots use.
  • It was released with code, so others could reproduce and extend it.

Questions

When was GPT-1 released?
OpenAI published the paper and blog post on 11 June 2018.
How many parameters does GPT-1 have?
About 0.1 billion, according to its Hugging Face model card. It has 12 Transformer layers and 768 dimensional hidden states.
What was GPT-1 trained on?
BooksCorpus, a collection of more than 7,000 unpublished books.

About this page

Part of our LLM history timeline. The event happened on 11 June 2018; we wrote this page on 20 November 2026 from the original papers and announcements listed below. Lab-reported results are labelled as such. Read our editorial policy. Found an error? Tell us and we will correct it with a dated note.

On the timeline

Related milestones

Terms and labs

Sources

Papers and announcements we read for this page.

  1. OpenAI, Improving language understanding with unsupervised learning
  2. OpenAI finetune-transformer-lm repository (GitHub)
  3. Hugging Face model card, openai-gpt (GPT-1)
  4. Hugging Face model card, gpt2
  5. Devlin et al., BERT (arXiv)

Sign in to vote as verified

Signed-in votes count once per account and show as verified. You can still vote without an account.

We use your email only to run your account. No marketing, no sharing, no passwords. Delete your account any time. Privacy

Delete your account?

This removes your account, your email and every vote you made while signed in. It cannot be undone.