# GLUE (2018)

> Nine English language-understanding tasks rolled into one score.

Page: https://mralbu.github.io/ai-datasets/d/glue

## Key facts

- Category: Text
- Task: Benchmark suite of 9 sentence-understanding tasks
- Creators: Alex Wang, Amanpreet Singh, Julian Michael, Felix Hill, Omer Levy, Samuel Bowman
- Size: ~1.4M examples across tasks (QQP and MNLI are most of it)
- Splits: tasks 9
- Input: One sentence or a pair of sentences
- Labels: Per task, e.g. grammatical?, positive?, paraphrase?, entails?
- License: Varies by task (each underlying dataset keeps its own)
- Paper: [GLUE: A Multi-Task Benchmark and Analysis Platform for Natural Language Understanding](https://arxiv.org/abs/1804.07461)
- Homepage: https://gluebenchmark.com/
- Hugging Face: [nyu-mll/glue](https://huggingface.co/datasets/nyu-mll/glue)
- Sampled at Hub revision bcdcba79d07bc864c1c254ccfcedcce55bcc9a8c (2026-11-07)

## Why it matters

GLUE turned "general language understanding" into one leaderboard number just as pretrained models arrived. ELMo, GPT and then BERT climbed it, and within about a year models passed the human baseline (87.1), which led to the harder SuperGLUE. It defined the pretrain-then-fine-tune era of NLP.

## Worth knowing

- Most tasks predate GLUE; it bundled existing datasets (SST-2 is movie-review sentences, MRPC is news paraphrases, RTE is textual-entailment challenge data).
- STS-B is a regression task, scored 0–5 for similarity, so not every label is a class.
- On WNLI, nearly every model scored below simply predicting the majority class, because its dev set is adversarial against the train set.
- The samples below are from validation sets; test labels are kept private.

## Configs

- `cola`: CoLA: is the sentence grammatical?
- `sst2`: SST-2: is the movie-review sentence positive or negative?
- `mrpc`: MRPC: do the two news sentences mean the same thing?
- `qqp`: QQP: are the two Quora questions duplicates?
- `stsb`: STS-B: how similar are the sentences, from 0 to 5?
- `mnli`: MNLI: does the premise entail, contradict, or say nothing about the hypothesis?
- `qnli`: QNLI: does the sentence answer the question?
- `rte`: RTE: does the first sentence entail the second?
- `wnli`: WNLI: with the pronoun resolved, is the second sentence implied?

## Get the data

```bash
# pip install -U huggingface_hub
hf download nyu-mll/glue --repo-type dataset \
  --local-dir glue
```

```python
from datasets import load_dataset   # pip install datasets

ds = load_dataset("nyu-mll/glue", "cola")  # or any of: sst2, mrpc, qqp, stsb, mnli, …
print(ds)
```

```python
import polars as pl

df = pl.read_parquet("hf://datasets/nyu-mll/glue@~parquet/cola/validation/*.parquet")
print(df.shape)
```

## Related datasets

- [SuperGLUE](https://huggingface.co/datasets/aps/super_glue): 2019, harder successor (on this site: https://mralbu.github.io/ai-datasets/d/superglue)
- [SNLI](https://huggingface.co/datasets/stanfordnlp/snli): 2015, the single-genre predecessor of MNLI (on this site: https://mralbu.github.io/ai-datasets/d/snli)
- [IMDB Large Movie Review](https://huggingface.co/datasets/stanfordnlp/imdb): 2011, document-level sentiment, vs. SST-2's single sentences (on this site: https://mralbu.github.io/ai-datasets/d/imdb)
- [MMLU](https://huggingface.co/datasets/cais/mmlu): 2020, knowledge-heavy benchmark for the LLM era (on this site: https://mralbu.github.io/ai-datasets/d/mmlu)

## Landmark papers

- [BERT: Pre-training of Deep Bidirectional Transformers](https://arxiv.org/abs/1810.04805) (2018)
- [RoBERTa: A Robustly Optimized BERT Pretraining Approach](https://arxiv.org/abs/1907.11692) (2019)
- [SuperGLUE: A Stickier Benchmark](https://arxiv.org/abs/1905.00537) (2019)

## Papers on this site that use it

- [BERT (2018)](https://mralbu.github.io/ai-datasets/p/bert.md): Pretrain a Transformer to fill in masked words, then fine-tune it for almost any language task.
- [T5 (2019)](https://mralbu.github.io/ai-datasets/p/t5.md): Every language task written as text in, text out, and a careful study of which pretraining choices actually matter.
