yhavinga commited on
Commit
063e3c3
1 Parent(s): 1ed9e2c

Add run script

Browse files
Files changed (1) hide show
  1. run_long-byt5-tglobal-small-mc4.sh +55 -0
run_long-byt5-tglobal-small-mc4.sh ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ export CORES=`grep -c ^processor /proc/cpuinfo`
2
+ export XLA_PYTHON_CLIENT_PREALLOCATE=false
3
+
4
+ export HF_PROJECT="long-byt5-tglobal-small-dutch-english"
5
+ export DATASET="yhavinga/mc4_nl_cleaned"
6
+ export DATASET_CONFIG="tiny_en_nl" # Config of the dataset in the Huggingface Hub
7
+ export DATASET_SPLIT="train" # Split to use for training tokenizer and model
8
+ export CONFIG_NAME="../config/config-long-byt5-tglobal-small.json"
9
+ export TOKENIZER_NAME="google/byt5-small"
10
+ export MODEL_PATH="${HOME}/data/${HF_PROJECT}" # Path to the model
11
+
12
+ mkdir -p "${MODEL_PATH}"
13
+
14
+ python ../train/run_t5_mlm_flax_pmap.py \
15
+ --output_dir="${MODEL_PATH}" \
16
+ --resume_from_checkpoint="${MODEL_PATH}" \
17
+ --model_type="longt5" \
18
+ --config_name="${CONFIG_NAME}" \
19
+ --tokenizer_name="${TOKENIZER_NAME}" \
20
+ --preprocessing_num_workers="${CORES}" \
21
+ --do_train --do_eval \
22
+ --dataset_name="${DATASET}" \
23
+ --dataset_config_name="${DATASET_CONFIG}" \
24
+ --max_seq_length="1024" \
25
+ --per_device_train_batch_size="16" \
26
+ --per_device_eval_batch_size="16" \
27
+ --gradient_accumulation_steps="8" \
28
+ --mean_noise_span_length="20" \
29
+ --dtype="float32" \
30
+ --optim="adafactor" \
31
+ --learning_rate="0.0034" \
32
+ --lr_decay="linear" \
33
+ --overwrite_output_dir \
34
+ --num_train_epochs="2" \
35
+ --logging_steps="20" \
36
+ --save_steps="1000" \
37
+ --eval_steps="1000" \
38
+ --warmup_steps="300" \
39
+ --validation_split_count="15000" \
40
+ --wandb_project="long-byt5-tglobal-small" \
41
+ --wandb_job_type="pmap"
42
+
43
+ # \
44
+ # --max_train_samples="160000" \
45
+ # --max_eval_samples="1000" \
46
+
47
+ # --model_name_or_path="${MODEL_PATH}" \
48
+
49
+ # \
50
+
51
+ # --lr_decay="exponential" \
52
+ # --lr_transition_steps="400000" \
53
+ # --lr_decay_rate="0.7" \
54
+ # --lr_staircase="false" \
55
+ # --auth_token="$(cat ~/.huggingface/token)" \