-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcreate_datasets_from_start.sh
executable file
·48 lines (35 loc) · 2.4 KB
/
create_datasets_from_start.sh
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
#!/bin/bash
# Copyright (c) 2019 NVIDIA CORPORATION. All rights reserved.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Download
#python3 /workspace/bert/data/bertPrep.py --action download --dataset bookscorpus
python3 nvbert/bert/data/bertPrep.py --action download --dataset wikicorpus_en
python3 nvbert/bert/data//bertPrep.py --action download --dataset google_pretrained_weights # Includes vocab
#python3 /workspace/bert/data/bertPrep.py --action download --dataset squad
#python3 /workspace/bert/data/bertPrep.py --action download --dataset mrpc
# Properly format the text files
#python3 /workspace/bert/data/bertPrep.py --action text_formatting --dataset bookscorpus
python3 nvbert/bert/data/bertPrep.py --action text_formatting --dataset wikicorpus_en --byte_size 1M
# Shard the text files (group wiki+books then shard)
python3 nvbert/bert/data/bertPrep.py --action sharding --dataset wikicorpus_en --byte_size 1M
# Create HDF5 files Phase 1
# python3 nvbert/bert/data/bertPrep.py --action create_hdf5_files --dataset wikicorpus_en --max_seq_length 128 \
# --max_predictions_per_seq 20 --vocab_file $BERT_PREP_WORKING_DIR/download/google_pretrained_weights/uncased_L-24_H-1024_A-16/vocab.txt --do_lower_case 1
#
#
# # Create HDF5 files Phase 2
# python3 nvbert/bert/data/bertPrep.py --action create_hdf5_files --dataset wikicorpus_en --max_seq_length 512 \
# --max_predictions_per_seq 80 --vocab_file $BERT_PREP_WORKING_DIR/download/google_pretrained_weights/uncased_L-24_H-1024_A-16/vocab.txt --do_lower_case 1
python3 nvbert/bert/data/bertPrep.py --action create_hdf5_files --dataset wikicorpus_en --max_seq_length 128 --max_predictions_per_seq 20 --vocab_file bert-large-uncased-vocab.txt --do_lower_case 1
# Create HDF5 files Phase 2
python3 nvbert/bert/data/bertPrep.py --action create_hdf5_files --dataset wikicorpus_en --max_seq_length 512 --max_predictions_per_seq 80 --vocab_file bert-large-uncased-vocab.txt --do_lower_case 1