-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtrain.sh
executable file
·59 lines (58 loc) · 1.76 KB
/
train.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
49
50
51
52
53
54
55
56
57
58
59
# Train BART
python run_summarization.py \
--model_name_or_path "facebook/bart-base" \
--config_name "facebook/bart-base" \
--tokenizer_name ./tokenizer \
--do_train \
--do_eval \
--evaluation_strategy="epoch" \
--group_by_length \
--num_train_epochs=10 \
--train_file train.csv \
--validation_file test.csv \
--preprocessing_num_workers="20" \
--output_dir ./bart-kurd-spell-base/ \
--overwrite_output_dir \
--per_device_train_batch_size=320 \
--per_device_eval_batch_size=256 \
--gradient_accumulation_steps=1 \
--predict_with_generate \
--logging_steps="100" \
--save_total_limit="1" \
--save_strategy="epoch" \
--report_to="wandb" \
--run_name="Bart Spell" \
--max_target_length=1024 \
--max_source_length=1024 \
--fp16 \
--save_safetensors \
--push_to_hub
# Train T5
# python3 run_summarization.py \
# --source_prefix "correct: " \
# --model_name_or_path "google/flan-t5-small" \
# --config_name "google/flan-t5-small" \
# --tokenizer_name ./tokenizer \
# --do_train \
# --do_eval \
# --evaluation_strategy="epoch" \
# --group_by_length \
# --num_train_epochs=5 \
# --train_file train.csv \
# --validation_file test.csv \
# --preprocessing_num_workers="12" \
# --output_dir ./t5-kurd-spell-base/ \
# --overwrite_output_dir \
# --per_device_train_batch_size=64 \
# --per_device_eval_batch_size=64 \
# --gradient_accumulation_steps=1 \
# --predict_with_generate \
# --logging_steps="100" \
# --save_total_limit="1" \
# --save_strategy="epoch" \
# --report_to="none" \
# --run_name="T5 Spell" \
# --max_target_length=1024 \
# --max_source_length=1024 \
# --push_to_hub
# # --fp16 \