Commit
•
05bfcb2
0
Parent(s):
Update files from the datasets library (from 1.12.0)
Browse filesRelease notes: https://github.com/huggingface/datasets/releases/tag/1.12.0
- .gitattributes +27 -0
- README.md +169 -0
- dataset_infos.json +1 -0
- dummy/plain_text/1.0.0/dummy_data.zip +3 -0
- the_pile_books3.py +98 -0
.gitattributes
ADDED
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
*.7z filter=lfs diff=lfs merge=lfs -text
|
2 |
+
*.arrow filter=lfs diff=lfs merge=lfs -text
|
3 |
+
*.bin filter=lfs diff=lfs merge=lfs -text
|
4 |
+
*.bin.* filter=lfs diff=lfs merge=lfs -text
|
5 |
+
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
6 |
+
*.ftz filter=lfs diff=lfs merge=lfs -text
|
7 |
+
*.gz filter=lfs diff=lfs merge=lfs -text
|
8 |
+
*.h5 filter=lfs diff=lfs merge=lfs -text
|
9 |
+
*.joblib filter=lfs diff=lfs merge=lfs -text
|
10 |
+
*.lfs.* filter=lfs diff=lfs merge=lfs -text
|
11 |
+
*.model filter=lfs diff=lfs merge=lfs -text
|
12 |
+
*.msgpack filter=lfs diff=lfs merge=lfs -text
|
13 |
+
*.onnx filter=lfs diff=lfs merge=lfs -text
|
14 |
+
*.ot filter=lfs diff=lfs merge=lfs -text
|
15 |
+
*.parquet filter=lfs diff=lfs merge=lfs -text
|
16 |
+
*.pb filter=lfs diff=lfs merge=lfs -text
|
17 |
+
*.pt filter=lfs diff=lfs merge=lfs -text
|
18 |
+
*.pth filter=lfs diff=lfs merge=lfs -text
|
19 |
+
*.rar filter=lfs diff=lfs merge=lfs -text
|
20 |
+
saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
21 |
+
*.tar.* filter=lfs diff=lfs merge=lfs -text
|
22 |
+
*.tflite filter=lfs diff=lfs merge=lfs -text
|
23 |
+
*.tgz filter=lfs diff=lfs merge=lfs -text
|
24 |
+
*.xz filter=lfs diff=lfs merge=lfs -text
|
25 |
+
*.zip filter=lfs diff=lfs merge=lfs -text
|
26 |
+
*.zstandard filter=lfs diff=lfs merge=lfs -text
|
27 |
+
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
README.md
ADDED
@@ -0,0 +1,169 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
annotations_creators:
|
3 |
+
- no-annotation
|
4 |
+
language_creators:
|
5 |
+
- found
|
6 |
+
languages:
|
7 |
+
- en
|
8 |
+
licenses:
|
9 |
+
- mit
|
10 |
+
multilinguality:
|
11 |
+
- monolingual
|
12 |
+
pretty_name: Books3
|
13 |
+
size_categories:
|
14 |
+
- 100K<n<1M
|
15 |
+
source_datasets:
|
16 |
+
- original
|
17 |
+
task_categories:
|
18 |
+
- sequence-modeling
|
19 |
+
task_ids:
|
20 |
+
- language-modeling
|
21 |
+
---
|
22 |
+
|
23 |
+
# Dataset Card for the_pile_books3
|
24 |
+
|
25 |
+
## Table of Contents
|
26 |
+
- [Dataset Card for the_pile_books3](#dataset-card-for-the_pile_books3)
|
27 |
+
- [Table of Contents](#table-of-contents)
|
28 |
+
- [Dataset Description](#dataset-description)
|
29 |
+
- [Dataset Summary](#dataset-summary)
|
30 |
+
- [Supported Tasks and Leaderboards](#supported-tasks-and-leaderboards)
|
31 |
+
- [Languages](#languages)
|
32 |
+
- [Dataset Structure](#dataset-structure)
|
33 |
+
- [Data Instances](#data-instances)
|
34 |
+
- [Data Fields](#data-fields)
|
35 |
+
- [Data Splits](#data-splits)
|
36 |
+
- [|split|num examples|](#splitnum-examples)
|
37 |
+
- [Dataset Creation](#dataset-creation)
|
38 |
+
- [Curation Rationale](#curation-rationale)
|
39 |
+
- [Source Data](#source-data)
|
40 |
+
- [Initial Data Collection and Normalization](#initial-data-collection-and-normalization)
|
41 |
+
- [Who are the source language producers?](#who-are-the-source-language-producers)
|
42 |
+
- [Annotations](#annotations)
|
43 |
+
- [Annotation process](#annotation-process)
|
44 |
+
- [Who are the annotators?](#who-are-the-annotators)
|
45 |
+
- [Personal and Sensitive Information](#personal-and-sensitive-information)
|
46 |
+
- [Considerations for Using the Data](#considerations-for-using-the-data)
|
47 |
+
- [Social Impact of Dataset](#social-impact-of-dataset)
|
48 |
+
- [Discussion of Biases](#discussion-of-biases)
|
49 |
+
- [Other Known Limitations](#other-known-limitations)
|
50 |
+
- [Additional Information](#additional-information)
|
51 |
+
- [Dataset Curators](#dataset-curators)
|
52 |
+
- [Licensing Information](#licensing-information)
|
53 |
+
- [Citation Information](#citation-information)
|
54 |
+
- [Contributions](#contributions)
|
55 |
+
|
56 |
+
## Dataset Description
|
57 |
+
|
58 |
+
- **Homepage:** [GitHub](https://github.com/soskek/bookcorpus/issues/27#issuecomment-716104208)
|
59 |
+
- **Repository:** [Needs More Information]
|
60 |
+
- **Paper:** [arXiv](https://arxiv.org/abs/2101.00027)
|
61 |
+
- **Leaderboard:** [Needs More Information]
|
62 |
+
- **Point of Contact:** [Needs More Information]
|
63 |
+
|
64 |
+
### Dataset Summary
|
65 |
+
|
66 |
+
This dataset is Shawn Presser's work and is part of EleutherAi/The Pile dataset.
|
67 |
+
|
68 |
+
This dataset contains all of bibliotik in plain .txt form, aka 197,000 books processed in exactly the same way as did for bookcorpusopen (a.k.a. books1). seems to be similar to OpenAI's mysterious "books2" dataset referenced in their papers. Unfortunately OpenAI will not give details, so we know very little about any differences. People suspect it's "all of libgen", but it's purely conjecture.
|
69 |
+
|
70 |
+
|download_size|36.8 Gib|
|
71 |
+
|dataset_size|100.9 Gib|
|
72 |
+
|
73 |
+
### Supported Tasks and Leaderboards
|
74 |
+
|
75 |
+
This dataset is used for Language Modeling.
|
76 |
+
|
77 |
+
### Languages
|
78 |
+
|
79 |
+
The dataset is in English.
|
80 |
+
|
81 |
+
## Dataset Structure
|
82 |
+
|
83 |
+
### Data Instances
|
84 |
+
|
85 |
+
```
|
86 |
+
{'title': '07 LEGO Ninjago - The Search For Zane (Scholastic) - Kate Howard (retail)'
|
87 |
+
'text': '\n\nTITLE PAGE\n\nFROM THE JOURNAL OF SENSEI GARMADON\n\nCHAPTER 1\n\nCHAPTER 2\n\nCHAPTER 3\n\nCHAPTER 4\n\nCHAPTER 5\n\nCHAPTER 6\n\nCHAPTER 7\n\nCHAPTER 8\n\nCHAPTER 9\n\nCOPYRIGHT\n\nThroughout Ninjago", five ninja are well-known for their speed, strength, and of course the elemental powers that help them protect our world from evil. But there are others who possess some of the same powers as the ninja. Others who may not always use their powers for good.\n\nBefore now, the ninja believed they were special. They di.......'}
|
88 |
+
```
|
89 |
+
|
90 |
+
### Data Fields
|
91 |
+
|
92 |
+
- `title`: title of the book
|
93 |
+
- `text`: text content of the book
|
94 |
+
|
95 |
+
### Data Splits
|
96 |
+
|
97 |
+
|split|num examples|
|
98 |
+
--------------------------------
|
99 |
+
|train|196640|
|
100 |
+
|
101 |
+
## Dataset Creation
|
102 |
+
|
103 |
+
### Curation Rationale
|
104 |
+
|
105 |
+
[Needs More Information]
|
106 |
+
|
107 |
+
### Source Data
|
108 |
+
|
109 |
+
#### Initial Data Collection and Normalization
|
110 |
+
|
111 |
+
[Needs More Information]
|
112 |
+
|
113 |
+
#### Who are the source language producers?
|
114 |
+
|
115 |
+
[Needs More Information]
|
116 |
+
|
117 |
+
### Annotations
|
118 |
+
|
119 |
+
#### Annotation process
|
120 |
+
|
121 |
+
[Needs More Information]
|
122 |
+
|
123 |
+
#### Who are the annotators?
|
124 |
+
|
125 |
+
[Needs More Information]
|
126 |
+
|
127 |
+
### Personal and Sensitive Information
|
128 |
+
|
129 |
+
[Needs More Information]
|
130 |
+
|
131 |
+
## Considerations for Using the Data
|
132 |
+
|
133 |
+
### Social Impact of Dataset
|
134 |
+
|
135 |
+
[Needs More Information]
|
136 |
+
|
137 |
+
### Discussion of Biases
|
138 |
+
|
139 |
+
[Needs More Information]
|
140 |
+
|
141 |
+
### Other Known Limitations
|
142 |
+
|
143 |
+
[Needs More Information]
|
144 |
+
|
145 |
+
## Additional Information
|
146 |
+
|
147 |
+
### Dataset Curators
|
148 |
+
|
149 |
+
[Needs More Information]
|
150 |
+
|
151 |
+
### Licensing Information
|
152 |
+
|
153 |
+
MIT
|
154 |
+
|
155 |
+
### Citation Information
|
156 |
+
|
157 |
+
```
|
158 |
+
@article{pile,
|
159 |
+
title={The {P}ile: An 800GB Dataset of Diverse Text for Language Modeling},
|
160 |
+
author={Gao, Leo and Biderman, Stella and Black, Sid and Golding, Laurence and Hoppe, Travis and Foster, Charles and Phang, Jason and He, Horace and Thite, Anish and Nabeshima, Noa and Presser, Shawn and Leahy, Connor},
|
161 |
+
journal={arXiv preprint arXiv:2101.00027},
|
162 |
+
year={2020}
|
163 |
+
}
|
164 |
+
```
|
165 |
+
|
166 |
+
### Contributions
|
167 |
+
|
168 |
+
Thanks to [@shawwn](https://github.com/shawwn) for creating this dataset.
|
169 |
+
Thanks to [@richarddwang](https://github.com/richarddwang) for adding this dataset.
|
dataset_infos.json
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
{"plain_text": {"description": "Shawn Presser's work. All of bibliotik in plain .txt form, aka 197,000 books processed in exactly \nthe same way as did for bookcorpusopen (a.k.a. books1). seems to be similar to OpenAI's mysterious \n\"books2\" dataset referenced in their papers. Unfortunately OpenAI will not give details, so we know\nvery little about any differences. People suspect it's \"all of libgen\", but it's purely conjecture.\n", "citation": "@article{pile,\n title={The {P}ile: An 800GB Dataset of Diverse Text for Language Modeling},\n author={Gao, Leo and Biderman, Stella and Black, Sid and Golding, Laurence and Hoppe, Travis and Foster, Charles and Phang, Jason and He, Horace and Thite, Anish and Nabeshima, Noa and Presser, Shawn and Leahy, Connor},\n journal={arXiv preprint arXiv:2101.00027},\n year={2020}\n}\n", "homepage": "https://github.com/soskek/bookcorpus/issues/27#issuecomment-716104208", "license": "", "features": {"title": {"dtype": "string", "id": null, "_type": "Value"}, "text": {"dtype": "string", "id": null, "_type": "Value"}}, "post_processed": null, "supervised_keys": null, "task_templates": null, "builder_name": "the_pile_books3", "config_name": "plain_text", "version": {"version_str": "1.0.0", "description": "", "major": 1, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 108395639965, "num_examples": 196640, "dataset_name": "the_pile_books3"}}, "download_checksums": {"https://the-eye.eu/public/AI/pile_preliminary_components/books3.tar.gz": {"num_bytes": 39516981435, "checksum": "016b90fa6b8507328b6a90d13b0f68c2b87dfd281b35e449a1d466fd9eebc14a"}}, "download_size": 39516981435, "post_processing_size": null, "dataset_size": 108395639965, "size_in_bytes": 147912621400}}
|
dummy/plain_text/1.0.0/dummy_data.zip
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:9b514537ef0c1790d27e22c326bf770ce0d728e9a9ded5db395805d33f915b52
|
3 |
+
size 5874
|
the_pile_books3.py
ADDED
@@ -0,0 +1,98 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# coding=utf-8
|
2 |
+
# Copyright 2021 The TensorFlow Datasets Authors and the HuggingFace Datasets Authors.
|
3 |
+
#
|
4 |
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
5 |
+
# you may not use this file except in compliance with the License.
|
6 |
+
# You may obtain a copy of the License at
|
7 |
+
#
|
8 |
+
# http://www.apache.org/licenses/LICENSE-2.0
|
9 |
+
#
|
10 |
+
# Unless required by applicable law or agreed to in writing, software
|
11 |
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
12 |
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13 |
+
# See the License for the specific language governing permissions and
|
14 |
+
# limitations under the License.
|
15 |
+
|
16 |
+
# Lint as: python3
|
17 |
+
"""The BookCorpus dataset based on Shawn Presser's work https://github.com/soskek/bookcorpus/issues/27 """
|
18 |
+
|
19 |
+
|
20 |
+
from pathlib import Path
|
21 |
+
|
22 |
+
import datasets
|
23 |
+
|
24 |
+
|
25 |
+
_DESCRIPTION = """\
|
26 |
+
This dataset is Shawn Presser's work and is part of EleutherAi/The Pile dataset. \
|
27 |
+
This dataset contains all of bibliotik in plain .txt form, aka 197,000 books processed in exactly \
|
28 |
+
the same way as did for bookcorpusopen (a.k.a. books1). seems to be similar to OpenAI's mysterious \
|
29 |
+
"books2" dataset referenced in their papers. Unfortunately OpenAI will not give details, so we know \
|
30 |
+
very little about any differences. People suspect it's "all of libgen", but it's purely conjecture.
|
31 |
+
"""
|
32 |
+
|
33 |
+
_CITATION = """\
|
34 |
+
@article{pile,
|
35 |
+
title={The {P}ile: An 800GB Dataset of Diverse Text for Language Modeling},
|
36 |
+
author={Gao, Leo and Biderman, Stella and Black, Sid and Golding, Laurence and Hoppe, Travis and Foster, Charles and Phang, Jason and He, Horace and Thite, Anish and Nabeshima, Noa and Presser, Shawn and Leahy, Connor},
|
37 |
+
journal={arXiv preprint arXiv:2101.00027},
|
38 |
+
year={2020}
|
39 |
+
}
|
40 |
+
"""
|
41 |
+
_PROJECT_URL = "https://github.com/soskek/bookcorpus/issues/27#issuecomment-716104208"
|
42 |
+
_DOWNLOAD_URL = "https://the-eye.eu/public/AI/pile_preliminary_components/books3.tar.gz"
|
43 |
+
|
44 |
+
|
45 |
+
class Books3Config(datasets.BuilderConfig):
|
46 |
+
"""BuilderConfig for ThePileBooks3."""
|
47 |
+
|
48 |
+
def __init__(self, **kwargs):
|
49 |
+
"""BuilderConfig for ThePileBooks3.
|
50 |
+
Args:
|
51 |
+
**kwargs: keyword arguments forwarded to super.
|
52 |
+
"""
|
53 |
+
super(Books3Config, self).__init__(version=datasets.Version("1.0.0", ""), **kwargs)
|
54 |
+
|
55 |
+
|
56 |
+
class ThePileBooks3(datasets.GeneratorBasedBuilder):
|
57 |
+
"""Books3 dataset."""
|
58 |
+
|
59 |
+
BUILDER_CONFIGS = [
|
60 |
+
Books3Config(
|
61 |
+
name="plain_text",
|
62 |
+
description="Plain text",
|
63 |
+
)
|
64 |
+
]
|
65 |
+
# Every example is a whole book thus big, adjust writer_batch_size to avoid OOM at the cost of writing speed
|
66 |
+
DEFAULT_WRITER_BATCH_SIZE = 500
|
67 |
+
|
68 |
+
def _info(self):
|
69 |
+
return datasets.DatasetInfo(
|
70 |
+
description=_DESCRIPTION,
|
71 |
+
features=datasets.Features(
|
72 |
+
{
|
73 |
+
"title": datasets.Value("string"),
|
74 |
+
"text": datasets.Value("string"),
|
75 |
+
}
|
76 |
+
),
|
77 |
+
supervised_keys=None,
|
78 |
+
homepage=_PROJECT_URL,
|
79 |
+
citation=_CITATION,
|
80 |
+
)
|
81 |
+
|
82 |
+
def _split_generators(self, dl_manager):
|
83 |
+
extracted_dir = dl_manager.download_and_extract(_DOWNLOAD_URL)
|
84 |
+
leaf_dirs = Path(extracted_dir).glob("**/Bibliotik/*")
|
85 |
+
leaf_dirs = sorted(leaf_dirs)
|
86 |
+
|
87 |
+
return [
|
88 |
+
datasets.SplitGenerator(name=datasets.Split.TRAIN, gen_kwargs={"leaf_dirs": leaf_dirs}),
|
89 |
+
]
|
90 |
+
|
91 |
+
def _generate_examples(self, leaf_dirs):
|
92 |
+
_id = 0
|
93 |
+
for leaf_dir in leaf_dirs:
|
94 |
+
for path in sorted(leaf_dir.glob("**/*.epub.txt")):
|
95 |
+
with path.open(mode="r", encoding="utf-8") as f:
|
96 |
+
entry = {"title": path.name, "text": f.read()}
|
97 |
+
yield _id, entry
|
98 |
+
_id += 1
|