---
title: GPT-1 (2018): generative pretraining with a Transformer
url: https://llmsranked.com/history/gpt-1/
updated: 2026-11-20
---

Paper· [Pretrain, then fine-tune](https://llmsranked.com/history/#era-pretraining)

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

Event date 11 June 2018

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.

- [OpenAI](https://llmsranked.com/providers/openai/)
- [LLMs Ranked editors](https://llmsranked.com/editorial-policy/)
- Published 20 Nov 2026
- 2 min read
- 5 sources

2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026

2018

On this page

- [Key numbers](#kn-h)
- [What OpenAI released](#what-openai-released)
- [How it worked](#how-it-worked)
- [What it showed and what came next](#what-it-showed-and-what-came-next)
- [Why it mattered](#wm-h)
- [Questions](#hf-h)
- [On the timeline](#tl-h)
- [Sources](#hsrc-h)

## Key numbers

**Layers, decoder only Transformer, per Hugging Face model card**
12[huggingface.co](https://huggingface.co/openai-community/openai-gpt)

**Pretraining books in BooksCorpus, per Hugging Face model card**
over 7,000[huggingface.co](https://huggingface.co/openai-community/openai-gpt)

**ROCStories accuracy, single run reported in the paper**
86.5%[github.com](https://github.com/openai/finetune-transformer-lm)

**ROCStories median accuracy over 10 runs, OpenAI repository**
85.8%[github.com](https://github.com/openai/finetune-transformer-lm)

## 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](https://openai.com/index/language-unsupervised/), [github.com](https://github.com/openai/finetune-transformer-lm)

## 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](https://huggingface.co/openai-community/openai-gpt)

## 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](https://github.com/openai/finetune-transformer-lm), [huggingface.co](https://huggingface.co/openai-community/gpt2), [arxiv.org](https://arxiv.org/abs/1810.04805)

## 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](https://llmsranked.com/history/). 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](https://llmsranked.com/editorial-policy/). Found an error? [Tell us](https://llmsranked.com/contact/) and we will correct it with a dated note.

## On the timeline

[Earlier15 Feb 2018
ELMo (2018): deep contextualised word representations](https://llmsranked.com/history/elmo/)[Later11 Oct 2018
BERT (2018): bidirectional Transformers for language](https://llmsranked.com/history/bert/)

### Related milestones

- [2017 · 06Attention Is All You Need (2017): the Transformer paper](https://llmsranked.com/history/attention-is-all-you-need/)
- [2018 · 01ULMFiT (2018): transfer learning for text classification](https://llmsranked.com/history/ulmfit/)
- [2018 · 10BERT (2018): bidirectional Transformers for language](https://llmsranked.com/history/bert/)
- [2019 · 02GPT-2 (2019): the staged release of a larger GPT](https://llmsranked.com/history/gpt-2/)

## Terms and labs

- [Pretraining](https://llmsranked.com/glossary/#pretraining)
- [Transformer](https://llmsranked.com/glossary/#transformer)
- [Fine-tuning](https://llmsranked.com/glossary/#fine-tuning)
- [Parameters](https://llmsranked.com/glossary/#parameters)
- [OpenAI models](https://llmsranked.com/providers/openai/)

## Sources

Papers and announcements we read for this page.

- [OpenAI, Improving language understanding with unsupervised learning](https://openai.com/index/language-unsupervised/)
- [OpenAI finetune-transformer-lm repository (GitHub)](https://github.com/openai/finetune-transformer-lm)
- [Hugging Face model card, openai-gpt (GPT-1)](https://huggingface.co/openai-community/openai-gpt)
- [Hugging Face model card, gpt2](https://huggingface.co/openai-community/gpt2)
- [Devlin et al., BERT (arXiv)](https://arxiv.org/abs/1810.04805)
