Preprint
Large Language Models

GPT

June 1, 2018

0

Citations

0

Influential Citations

Venue

2018

Year

Abstract

A Decoder only transformer which is autoregressively pretrained and then finetuned for specific downstream tasks using task-aware input transformations.

Analysis

Why This Paper Matters

Before GPT, most NLP models were trained from scratch for each task, requiring large labeled datasets. GPT introduced a paradigm shift: first learn a powerful language model from unlabeled text, then adapt it to specific tasks with minimal extra data. This approach dramatically improved performance across a wide range of natural language understanding benchmarks, setting the stage for the transformer-based pretraining revolution.

How It Works

GPT uses a decoder-only transformer architecture with 12 layers, 768-dimensional hidden states, and 12 attention heads. The model is first pre-trained on the BooksCorpus (over 7,000 books) using a standard autoregressive language modeling objective: given a context window of k tokens, predict the next token.

Figure 1

The training objective maximizes the likelihood of the next token given the previous k tokens, where the conditional probability is modeled by the transformer with parameters Θ.

Figure 3

During fine-tuning, the pre-trained model is adapted to a supervised task by adding a linear output layer on top of the final transformer activation. The input tokens are passed through the model, and the final hidden state is fed into a softmax classifier to predict the label. Importantly, GPT includes the language modeling objective as an auxiliary loss during fine-tuning, which improves generalization and speeds up convergence.

Figure 4

Figure 5

Figure 6

To handle diverse tasks with minimal architectural changes, GPT introduces task-aware input transformations. For textual entailment, premise and hypothesis are concatenated with a delimiter token. For similarity tasks, both possible orderings of the two sentences are processed independently and their representations are added element-wise. For question answering, the context, question, and each answer are concatenated with delimiters, and the model produces a distribution over answers via softmax.

(left) Transformer architecture and training objectives used in this work. (right) Input transformations for fine-tuning on different tasks. We convert all structured inputs into token sequences to be processed by our pre-trained model, followed by a linear+softmax layer.

Results

GPT achieves state-of-the-art results on 9 of 12 evaluated tasks. On natural language inference benchmarks, it outperforms previous methods by significant margins (e.g., 5.8% on RTE, 1.5% on QNLI). On question answering, it achieves 8.9% improvement on RACE and strong results on Story Cloze Test. On semantic similarity tasks (STS-B, MRPC) and classification tasks (CoLA, SST-2), GPT also sets new records.

Experimental results on natural language inference tasks, comparing our model with current state-of-the-art methods. 5x indicates an ensemble of 5 models. All datasets use accuracy as the evaluation metric.

Results on question answering and commonsense reasoning, comparing our model with current state-of-the-art methods.. 9x means an ensemble of 9 models.

Semantic similarity and classification results, comparing our model with current state-of-theart methods. All task evaluations in this table were done using the GLUE benchmark. (mc= Mathews correlation, acc=Accuracy, pc=Pearson correlation)

Significance

GPT demonstrated that generative pretraining on unlabeled text is a powerful and general method for improving natural language understanding. Its two-stage framework—unsupervised pretraining followed by supervised fine-tuning—became the dominant paradigm in NLP, directly inspiring GPT-2, GPT-3, and many other models. The task-aware input transformation approach allowed a single pretrained model to be applied to diverse tasks without architectural changes, highlighting the flexibility of transformer-based language models. This work was a key milestone in the shift toward large-scale pretraining that has since revolutionized the field.