OpenWebText is an open-source English text corpus that recreates WebText, the unreleased dataset OpenAI used to train GPT-2, by collecting web pages linked from Reddit posts with a score of at least 3. Within the training data of artificial intelligence systems, it is a mid-sized pretraining corpus of roughly 8 million documents and about 38 GB of text, released in 2019 by researchers at Brown University.
The dataset matters because it made a GPT-2-style training recipe reproducible for academic groups. It became a standard benchmark corpus for small and medium language models, appears in the training mix of RoBERTa, and remains the default dataset in many educational training scripts.
How OpenWebText was assembled
OpenWebText was built with a link-based quality heuristic: instead of filtering raw crawl data with classifiers, it treats a Reddit upvote threshold as a cheap proxy for human curation. A page that several users found worth sharing and voting on is assumed to contain more coherent prose than a random crawled page.
The pipeline follows a sequence of extraction, filtering and deduplication steps. Each step removes a different kind of noise, and the order matters because deduplication is cheaper after junk pages are gone.
| Stage | What happens | Purpose |
|---|---|---|
| URL harvesting | Outbound links are taken from Reddit submissions with score 3 or higher | Selects pages endorsed by readers |
| Domain blacklisting | Links to images, videos and known non-text hosts are dropped | Avoids empty or binary pages |
| Content extraction | HTML is downloaded and the main article text is extracted | Removes menus, ads and boilerplate |
| Language filtering | Non-English documents are discarded | Keeps the corpus monolingual |
| Near-duplicate removal | Locality-sensitive hashing detects highly similar documents | Prevents memorization of repeated text |
| Length filtering | Very short documents are removed | Keeps pages with real prose |
The original WebText also excluded Wikipedia pages, because Wikipedia appears in many evaluation datasets and would cause test-set contamination. OpenWebText follows the same spirit, although the exact filtering choices differ from the unpublished OpenAI code.
Key properties of the corpus
The dataset is modest by current standards, yet its size and quality balance made it popular for controlled experiments. The figures below are approximate, because several redistributed versions exist and each counts documents and tokens slightly differently.
| Property | Approximate value | Practical meaning |
|---|---|---|
| Documents | About 8 million | Comparable to the WebText document count |
| Raw text size | About 38 GB | Fits on a single workstation disk |
| GPT-2 BPE tokens | About 9 billion | Enough for models up to roughly 1B parameters |
| Language | English only | No multilingual coverage |
| Time span of links | Mainly 2005 to 2019 | Knowledge stops before 2020 |
| License status | Mixed, inherited from source pages | Research use, unclear commercial rights |
A token count of about 9 billion GPT-2 tokens means that a 124-million-parameter model trained for several epochs reaches reasonable perplexity on modest hardware. For billion-parameter models, the corpus is too small under compute-optimal scaling rules, which call for roughly 20 tokens per parameter.
OpenWebText compared with other web corpora
OpenWebText sits between small curated corpora and massive filtered crawls. Its neighbors in the training data landscape differ mainly in scale, selection method and documentation.
| Corpus | Selection method | Scale | Typical use |
|---|---|---|---|
| OpenWebText | Reddit links with score 3 or higher | About 38 GB | GPT-2 replication, small models |
| WebText | Same heuristic, OpenAI internal | About 40 GB | GPT-2 training, never released |
| OpenWebText2 | Extended Reddit links to 2020 | About 65 GB | Component of The Pile |
| C4 | Heuristic rules on Common Crawl | About 750 GB | T5 pretraining |
| FineWeb | Model-based filtering of Common Crawl | Trillions of tokens | Large modern models |
| BookCorpus | Unpublished free books | About 5 GB | Early BERT and GPT models |
The comparison shows the central design choice: OpenWebText relies on social signals rather than trained classifiers. This gives higher average quality than unfiltered Common Crawl, but it also imports the demographic bias of Reddit users into the selection of topics and viewpoints.
Where OpenWebText is used in practice
OpenWebText is most valuable as a reproducible reference corpus. Researchers use it when they need results that others can compare directly, and educators use it because it is large enough to be realistic yet small enough for a single GPU node.
- Model replication: reproducing GPT-2 small and medium results with open data.
- Pretraining ablations: testing optimizers, tokenizers or architectures on a fixed corpus.
- Knowledge distillation: DistilGPT2 was trained on OpenWebText.
- Mixed corpora: RoBERTa combined it with BookCorpus, Wikipedia and news data.
- Teaching: minimal training repositories use it as the default dataset.
Teams that choose it should fix the exact dataset version and tokenizer in their reports, because results on different redistributions are not strictly comparable.
Limitations and common mistakes
The main weaknesses of OpenWebText come from its selection heuristic and its age. A Reddit score says little about factual accuracy, and links from a single platform overrepresent certain topics such as technology, politics and gaming.
| Problem | Cause | Mitigation |
|---|---|---|
| Toxic or biased text | Popular links include controversial content | Apply toxicity filtering and bias audits |
| Outdated knowledge | Links mostly predate 2020 | Combine with newer corpora |
| Benchmark contamination | Web pages may quote test sets | Run n-gram overlap checks |
| Unclear licensing | Pages keep their original copyright | Restrict to research use or seek review |
| Version confusion | Several re-hosted copies exist | Record source and checksum |
A common mistake is to treat OpenWebText as an exact copy of WebText. It is an independent approximation, so models trained on it match GPT-2 closely but not perfectly.
Another frequent error is training for too many epochs on a corpus of this size. Beyond a few passes, small models begin to memorize repeated passages, validation loss stops improving and generated text reproduces source pages verbatim. Practitioners who need more data usually move to OpenWebText2, FineWeb or a curated mixture rather than repeating OpenWebText many times.
Stripped to the essentials
OpenWebText is a large pile of English web articles. People on Reddit shared links and voted on them. Pages with enough upvotes were collected and cleaned.
The idea is simple. If several readers liked a page, it probably contains real writing, not spam. This pile of text is then used to teach language models how English works.
It was made so that anyone could copy the training data behind GPT-2. The key point: it is open, mid-sized and easy to reuse, but it reflects what Reddit users liked to share.
Where it is applied
A university research group wants to test whether a new attention variant improves language modeling. The group has access to eight GPUs for about one week, which is far too little for a modern web-scale corpus. It therefore trains two 124-million-parameter models on OpenWebText, one with standard attention and one with the new variant.
Both models see the same 9 billion tokens with the same GPT-2 tokenizer, learning rate schedule and batch size. Because the dataset is public and widely used, the group can compare its validation loss with published baselines. The new variant reaches a lower validation loss after the same number of steps, and the paper reports the dataset version so that other groups can reproduce the comparison exactly.