Datasets:

Languages:
English
ArXiv:
rskuzma commited on
Commit
e83b57a
1 Parent(s): 7c950a4

Add README

Browse files
Files changed (1) hide show
  1. README.md +142 -0
README.md ADDED
@@ -0,0 +1,142 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ task_categories:
3
+ - text-generation
4
+ language:
5
+ - en
6
+ pretty_name: SlimPajama 627B
7
+ license: apache-2.0
8
+ ---
9
+ ## Getting Started
10
+
11
+ SlimPajama-627B consists of 59166 jsonl files. It is a cleaned and deduplicated version of [Together Computer's RedPajama](https://github.com/togethercomputer/redpajama-data).
12
+
13
+ You can download the dataset using [Hugging Face datasets](https://huggingface.co/docs/datasets/load_hub):
14
+ ```python
15
+ from datasets import load_dataset
16
+ ds = load_dataset("cerebras/SlimPajama-627B")
17
+ ```
18
+
19
+ ## Background
20
+
21
+ We release SlimPajama – the largest deduplicated, multi-corpora, open-source, dataset for training large language models. SlimPajama was created by cleaning and deduplicating the RedPajama dataset from Together Computer via MinHashLSH. By filtering out low quality data and duplicates, we were able to remove 49.6% of bytes, slimming down the dataset from 1210B to 627B tokens! We believe SlimPajama offers the highest quality and most compute efficient data to train on for runs less than 627B tokens. When upsampled, we expect SlimPajama to perform equal or better than RedPajama-1T when training at trillion token scale. This release was made possible with the support of our customer OpenTensor. We believe SlimPajama is currently the most attractive open-source dataset because it offers the highest data quality through strict deduplication and the inclusion of curated data sources. The dataset can easily be upsampled to increase the number of tokens and precisely control the amount of duplication present.
22
+
23
+ Applying [MinHashLSH](http://infolab.stanford.edu/~ullman/mmds/book0n.pdf) deduplication to Trillion token datasets like RedPajama was not possible with off-the-shelf open-source code. We made several optimizations to existing solutions to produce infrastructure that can perform MinHashLSH deduplication on Trillion token datasets in a distributed, multi-threaded and memory efficient fashion. Today we are open-sourcing this infrastructure to enable the community to develop higher quality, deduplicated datasets in the future.
24
+
25
+
26
+ ### Our observations of the original data set
27
+
28
+ 1. RedPajama contains a portion of partially downloaded files.
29
+ 2. Some (~2%) of the examples contain empty text. They were downloaded correctly, but do not have useful content that a model can be trained on.
30
+ 3. There are many (~50%) duplicates in the data. The RedPajama team deduplicated some sources (Books, GitHub, Commoncrawl), but did not deduplicate all sources.
31
+
32
+
33
+ ### Our contributions
34
+
35
+ 1. SlimPajama 627B – the largest deduplicated, multi-corpora, open dataset for LLM training. We release it under the Apache 2.0 license.
36
+ 2. Releasing validation and test sets, ~500M tokens each, which the training data has been decontaminated against.
37
+ 3. Library of methods to replicate or pre-process from scratch other datasets. To the best of our knowledge these are the first open source tools to enable cleaning and MinHashLSH deduplication of text data at trillion token scale.
38
+
39
+
40
+ The full set of scripts to recreate the dataset from the original RedPajama dataset is available on the Cerebras github. The blog post detailing our cleaning and deduplication process can be found in the SlimPajama blog post.
41
+
42
+ ## Dataset Summary
43
+
44
+ #### Comparison of dataset features
45
+ | Dataset | Tokens | Open Source | Curated Data Sources | Deduplicated |
46
+ | --------------- | ------ | ----------- | -------------------- | ------------ |
47
+ | SlimPajama | 627B | **Yes** | **Yes** | **Yes** |
48
+ | RedPajama | 1.21T | **Yes** | **Yes** | No |
49
+ | RefinedWeb-600B | 600B | **Yes** | No | **Yes** |
50
+ | RefinedWeb-5T | 5T | No | No | **Yes** |
51
+ | LLaMA | 1.4T | No | **Yes** | **Yes** |
52
+ | MPT | 1T | No | **Yes** | No |
53
+ | MassiveText | 1.4T | No | **Yes** | **Yes** |
54
+
55
+
56
+ #### Document low-length filter rates
57
+
58
+ | Data source | Document low-length filter rate |
59
+ | ------------- | ------------------------------- |
60
+ | Commoncrawl | 0.02% |
61
+ | C4 | 4.70% |
62
+ | GitHub | 0.00% |
63
+ | Books | 0.00% |
64
+ | ArXiv | 0.62% |
65
+ | Wikpedia | 0.00% |
66
+ | StackExchange | 0.32% |
67
+ | Total | 1.86% |
68
+
69
+ #### Byte deduplication rates
70
+
71
+ | Data source | Dedupe byte prune rate |
72
+ | ------------- | ---------------------- |
73
+ | Commoncrawl | 63.76% |
74
+ | C4 | 6.85% |
75
+ | GitHub | 46.16% |
76
+ | Books | 2.01% |
77
+ | ArXiv | 0.06% |
78
+ | Wikipedia | 2.24% |
79
+ | StackExchange | 0.20% |
80
+ | Total | 49.60% |
81
+
82
+ #### Data source proportions for SlimPajama and RedPajama
83
+
84
+ | Data source | SlimPajama | RedPajama |
85
+ | ------------- | ---------- | --------- |
86
+ | Commoncrawl | 52.2% | 72.6% |
87
+ | C4 | 26.7% | 14.4% |
88
+ | GitHub | 5.2% | 4.9% |
89
+ | Books | 4.2% | 2.1% |
90
+ | ArXiv | 4.6% | 2.3% |
91
+ | Wikpedia | 3.8% | 2.0% |
92
+ | StackExchange | 3.3% | 1.7% |
93
+
94
+
95
+ ### Languages
96
+
97
+ Primarily English, with some non-English files in Wikipedia.
98
+
99
+
100
+ ### Dataset Structure
101
+
102
+ The dataset consists of jsonl files, with structure as follows:
103
+
104
+ ```json
105
+ {
106
+ "text": ...,
107
+ "meta": {"redpajama_set_name": "RedPajamaCommonCrawl" | "RedPajamaC4" | "RedPajamaGithub" | "RedPajamaBook" | "RedPajamaArXiv" | "RedPajamaWikipedia" | "RedPajamaStackExchange"},
108
+ }
109
+ ```
110
+
111
+ ### Dataset Creation
112
+
113
+ SlimPajama was created by cleaning and deduplicating the [RedPajama dataset from Together Computer](https://github.com/togethercomputer/redpajama-data) via MinHashLSH. RedPajama is an open-source reproduction of the [LLaMa](https://arxiv.org/abs/2302.13971) data collection methodology.
114
+
115
+
116
+ ### Source Data
117
+
118
+ The data sources composing RedPajama are explained in [its model card](https://huggingface.co/datasets/togethercomputer/RedPajama-Data-1T).
119
+
120
+
121
+ To cite SlimPajama, please use:
122
+
123
+ ```
124
+ @software{cerebras2023slimpajama,
125
+ author = {Cerebras Systems},
126
+ title = {SlimPajama: A 627B token cleaned and deduplicated version of RedPajama},
127
+ month = June,
128
+ year = 2023,
129
+ url = {TODO: Blog URL}
130
+ }
131
+ ```
132
+
133
+ ## License
134
+ Please refer to the licenses of the data subsets you use.
135
+
136
+ - [Common Crawl Foundation Terms of Use](https://commoncrawl.org/terms-of-use/full/)
137
+ - [C4 license](https://huggingface.co/datasets/allenai/c4#license)
138
+ - GitHub was limited to MIT, BSD, or Apache licenses only
139
+ - Books: [the_pile_books3 license](https://huggingface.co/datasets/the_pile_books3#licensing-information) and [pg19 license](https://huggingface.co/datasets/pg19#licensing-information)
140
+ - [ArXiv Terms of Use](https://info.arxiv.org/help/api/tou.html)
141
+ - [Wikipedia License](https://huggingface.co/datasets/wikipedia#licensing-information)
142
+ - [StackExchange license on the Internet Archive](https://archive.org/details/stackexchange)