File size: 1,213 Bytes
412e6ec
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
c5cacb6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
---
dataset_info:
  features:
  - name: text
    dtype: string
  splits:
  - name: train
    num_bytes: 24500165181
    num_examples: 80462898
  download_size: 14400389487
  dataset_size: 24500165181
configs:
- config_name: default
  data_files:
  - split: train
    path: data/train-*
---
# Dataset Card for "bert_pretrain_datasets"

This dataset is essentially a concatenation of the training set of the English Wikipedia (wikipedia.20220301.en.train) and the Book Corpus (bookcorpus.train).

This is exactly how I get this dataset:

```
from datasets import load_dataset, concatenate_datasets, load_from_disk

cache_dir = "/data/haob2/cache/"

# book corpus
bookcorpus = load_dataset("bookcorpus", split="train", cache_dir=cache_dir)

# english wikipedia
wiki = load_dataset("wikipedia", "20220301.en", split="train", cache_dir=cache_dir)
wiki = wiki.remove_columns([col for col in wiki.column_names if col != "text"])

# # concatenation
concat = concatenate_datasets([bookcorpus, wiki])

concat.push_to_hub("JackBAI/bert_pretrain_datasets")
```

Note that this is a naive reproduction of the dataset that BERT is using. We believe the official BERT checkpoint is pretrained on a much more engineered dataset.