Dolma: an Open Corpus of Three Trillion Tokens for Language Model Pretraining Research
TL;DR. Dolma is AI2’s open pretraining corpus for OLMo: about 3.06T tokens of English text (counted with the LLaMA tokenizer). It contains 2,479B tokens from 25 Common Crawl snapshots (2020-05 to 2023-06), 411B tokens of GitHub code, 89B of Reddit, 70B of Semantic Scholar papers, 6B of Project Gutenberg books and 4.3B of Wikipedia/Wikibooks. Roughly 200TB of raw data becomes about 11TB. The value is not the size but the openness: the data, the toolkit and the 1.2B-model ablations behind each pipeline step are all released.
Key idea
Section titled “Key idea”The pipeline applies a series of filters and checks each one with small-model ablations (1.2B OLMo, 150B tokens):
- Language ID: keep pages with an English score ≥ 0.5 (removes 61.7% of Common Crawl bytes).
- Quality rules: all Gopher rules plus only C4’s “paragraph must end in punctuation” rule. Gopher All flags 15.23% of characters and C4 NoPunc 22.73%.
- Content: FastText hate/NSFW classifiers trained on Jigsaw score each sentence. PII is masked when a document has ≤ 5 spans (0.02% of documents) and the document is dropped otherwise (0.001%).
- Dedup: exact URL (−53.2% of documents) → exact document (−14.9% of the rest) → exact paragraph (−18.7% of paragraphs), all using a Bloom filter. The same filter, seeded with test sets, is used for decontamination.
Results. Quality filters improve over unfiltered data, and Gopher All + C4 NoPunc is the best combination. The strict toxicity threshold τ = 0.0004 removes 29.1–34.9% of content and generally scores higher than τ = 0.4, which removes 5.5–7.3%. The authors chose τ = 0.4 to meet a token target and plan to start future versions with more Common Crawl. As a final check, OLMo-1B trained on Dolma is comparable on zero-shot tasks to other open models of similar size (Pythia 1.1B, TinyLlama 1.1B, StableLM2 1.6B).
Connections
Section titled “Connections”- FineWeb and DCLM — later open corpora that move from heuristics to classifier-based quality filtering.
- OLMo — the model family trained on Dolma.
- Contamination — Bloom-filter decontamination against test sets.
Questions to think through
These questions have no single right answer. Write or say your answer before you open the hints. Mark a question once you could defend your answer in a reading group.
- Derive / compute
Dolma's exact URL dedup removes 53.2% of Common Crawl documents, and exact document dedup then removes 14.9% of what remains. Compute the total fraction of documents removed by these two stages, explain why the cheap URL stage runs first, and explain why paragraph dedup (18.7% of paragraphs) is reported in different units.
What a strong answer covers
- Kept fraction = (1 − 0.532)(1 − 0.149) = 0.468 × 0.851 ≈ 0.398, so about 60.2% of documents are removed, not 53.2 + 14.9 = 68.1%.
- Each stage percentage is relative to the output of the previous stage, so stage percentages multiply rather than add.
- URL matching is the cheapest check and removes the most, so later more expensive stages see less than half the data.
- Paragraph dedup removes spans inside documents rather than whole documents, so its effect is measured in paragraphs and cannot be multiplied into the document count.
- What if…
Dolma's toxicity classifiers were tested at τ = 0.0004 (removes 29.1–34.9% of content) and τ = 0.4 (removes 5.5–7.3%). The strict threshold gave better downstream results, yet Dolma shipped the permissive one. Explain why the scores make this a two-point choice, why they chose it, and what experiment would settle it.
What a strong answer covers
- Sentence scores are bimodal, with peaks near 0 and 1; the low threshold removes anything slightly above 0, and the high one removes only clearly toxic text.
- The strict threshold gave better downstream performance in the 1.2B ablations, so the cost was scale, not quality.
- They chose High to meet a minimum token target, because quality, content and dedup filters overlap little and their removals compound.
- A fair test fixes the token budget: compare strict filtering with more raw Common Crawl shards versus permissive filtering, at the same number of training tokens and model size.
- Critique
Dolma's heuristic ablations found C4 NoPunc alone beats both C4 All and Gopher All, and Gopher All + C4 NoPunc is best. Name two reasons to be careful generalising these rankings to a 70B model trained for many trillions of tokens.
What a strong answer covers
- Ablations use 1.2B models trained on 150B tokens; a filter's effect on a small, short run may not carry over to a large model or a longer run, where the trade-off between quality and repetition changes.
- Results are tracked on a small set of evaluations (for example HellaSwag in the main figures); a filter can favour some benchmarks over others.
- Filters interact: their removals overlap little and compound, so ranking filters one at a time does not fix the best combination at a different token budget.
- Heuristic quality filters did not change the CCNet Wikipedia-likeness buckets, so these rules and model-based quality scores may measure different things.