Datasets:

Languages:
English
Size:
n>1T
ArXiv:
License:
File size: 5,482 Bytes
351aa33
fea2805
27e9d3d
 
67be0c7
b959d5c
 
 
 
 
 
 
 
 
 
 
4def87c
b959d5c
 
 
 
 
 
73faa26
b959d5c
 
351aa33
b959d5c
7d5c7f2
b959d5c
e45a74c
b959d5c
 
 
 
 
c0c59ef
b959d5c
 
617eae1
b959d5c
 
e45a74c
 
b959d5c
7da0b42
b959d5c
7da0b42
b959d5c
7da0b42
 
 
 
 
 
 
e5f2715
7da0b42
e5f2715
7da0b42
e5f2715
 
7da0b42
 
 
 
 
 
 
 
 
 
e5f2715
 
 
7da0b42
e5f2715
7da0b42
 
e5f2715
7da0b42
 
 
 
e5f2715
7da0b42
 
e5f2715
a78b99d
7da0b42
 
a78b99d
7da0b42
a78b99d
 
 
7da0b42
a78b99d
7da0b42
 
a78b99d
 
c564bd5
 
 
 
7da0b42
c564bd5
03bbd48
 
7da0b42
 
03bbd48
 
 
 
 
 
7d5c7f2
c564bd5
 
7d5c7f2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
---
license: other
license_name: impact-license-medium-risk
license_link: https://allenai.org/licenses/impact-mr
viewer: true
task_categories:
- text-generation
language:
- en
tags:
- language-modeling
- casual-lm
- llm
pretty_name: Dolma
size_categories:
- n>1T
extra_gated_prompt: "Access to this dataset is automatically granted upon accepting the [**AI2 ImpACT License - Medium Risk Artifacts (“MR Agreement”)**](https://allenai.org/licenses/impact-mr) and completing all fields below."
extra_gated_fields:
 Your full name: text
 Organization or entity you are affiliated with: text
 State or country you are located in: text
 Contact email: text
 Please describe your intended use of the medium risk artifact(s): text
 I AGREE to the terms and conditions of the MR Agreement above: checkbox
 I AGREE to AI2’s use of my information for legal notices and administrative matters: checkbox
 I CERTIFY that the information I have provided is true and accurate: checkbox
---

# Dolma

<img alt="Dolma's official logo. It's dolma written in yellow, round lowercase letters over a blue background." src="https://raw.githubusercontent.com/allenai/dolma/main/docs/assets/AI2_Blog_1400x685_2x.webp" width="100%">

Dolma is a dataset of 3 trillion tokens from a diverse mix of web content, academic publications, code, books, and encyclopedic materials. It is openly released under AI2’s ImpACT license as a medium risk artifact.

More information:

- Read Dolma **manuscript** and its **Data Sheet** [on ArXiv](https://arxiv.org/abs/2402.00159);
- Review Dolma's [**ImpACT license** for medium risk artifacts](https://allenai.org/licenses/impact-mr);
- Explore the [**open source tools**](https://github.com/allenai/dolma) we created to curate Dolma.
- Want to request removal of personal data? Use [this form](https://forms.gle/q4BNUUxUxKwKkfdT6) to notify us of documents containing PII about a specific user.


To learn more about the toolkit used to create Dolma, including how to replicate this dataset, head over our [GitHub project page](https://github.com/allenai/dolma/tree/main/docs)!


## Versions

At the moment, there are five versions of Dolma available:

| **Version** | **Default?** | **Release Date** | **Size** (gzip) | **Description** |
|--|:--:|--|--|--|
| `v1_6` | ✅ | 2024-01-31 | 5.4 TB | The latest version of Dolma, with 3 trillion tokens from a diverse mix of web content, academic publications, code, books, and encyclopedic materials. |
| `v1_6-sample` | | 2024-01-31 | 16.4 GB | A smaller sample of Dolma, with roughly 10 billion tokens. Useful for data exploration. |
| `v1_5` | | 2023-10-31 | 6.4 TB | The version of Dolma used to train [OLMo-1B](https://huggingface.co/allenai/OLMo-1B). Roughly 3 trillion tokens. |
| `v1_5-sample` | | 2023-10-31 | 2.9 TB | A sample of roughly 1.9 trillion tokens used to train [OLMo-7B](https://huggingface.co/allenai/OLMo-7B) |
| `v1` | | 2023-08-18 | 6.0 TB | The first version of Dolma. |

(Size difference between `v1_6` and previous version is due to different set of metadata included in files: we removed redundant metadata in `v1_6`.)

## Summary Statistics (v1.6)


| **Source** | **Doc Type** | **UTF-8 bytes** (GB) | **Documents** (millions) | **Unicode words** (billions) | **Llama tokens** (billions) |
|--|--|--|--|--|--|
| Common Crawl | web pages | 9,022 | 3,370 | 1,775 | 2,281 |
| The Stack | code| 1,043| 210 | 260| 411 |
| C4 | web pages | 790 | 364 | 153| 198 |
| Reddit| social media| 339 | 377| 72| 89 |
| PeS2o | STEM papers| 268 | 38.8| 50| 70 |
| Project Gutenberg | books | 20.4 | 0.056 | 4.0 | 6.0 |
| Wikipedia, Wikibooks | encyclopedic | 16.2 | 6.2 | 3.7 | 4.3 |
| **Total** | | **11,519** | **4,367** | **2,318** | **3,059** |



## Download

The fastest way to download Dolma is to clone this repository and use the files in the `url` directory.
We recommend using wget in parallel mode to download the files. For example:

```bash
DATA_DIR="<path_to_your_data_directory>"
PARALLEL_DOWNLOADS="<number_of_parallel_downloads>"
DOLMA_VERSION="<version_of_dolma_to_download>"

git clone https://huggingface.co/datasets/allenai/dolma
mkdir -p "${DATA_DIR}"


cat "dolma/urls/${DOLMA_VERSION}.txt" | xargs -n 1 -P "${PARALLEL_DOWNLOADS}" wget -q -P "$DATA_DIR"
```

Then, to load this data using HuggingFace's `datasets` library, you can use the following code:

```python
import os
from datasets import load_dataset

os.environ["DATA_DIR"] = "<path_to_your_data_directory>"
dataset = load_dataset("allenai/dolma", split="train")
```

## Bibtex

If you use our dataset or tooling, please cite us at:

```bibtex
@article{dolma,
  title = {{Dolma: an Open Corpus of Three Trillion Tokens for Language Model Pretraining Research}},
  author={
    Luca Soldaini and Rodney Kinney and Akshita Bhagia and Dustin Schwenk and David Atkinson and
    Russell Authur and Ben Bogin and Khyathi Chandu and Jennifer Dumas and Yanai Elazar and
    Valentin Hofmann and Ananya Harsh Jha and Sachin Kumar and Li Lucy and Xinxi Lyu and
    Nathan Lambert and Ian Magnusson and Jacob Morrison and Niklas Muennighoff and Aakanksha Naik and
    Crystal Nam and Matthew E. Peters and Abhilasha Ravichander and Kyle Richardson and Zejiang Shen and
    Emma Strubell and Nishant Subramani and Oyvind Tafjord and Pete Walsh and Luke Zettlemoyer and
    Noah A. Smith and Hannaneh Hajishirzi and Iz Beltagy and Dirk Groeneveld and Jesse Dodge and Kyle Lo
  },
  year = {2024},
  journal={arXiv preprint},
}
```