forked from facebookresearch/simmc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
run_train_gpt2.sh
executable file
·71 lines (67 loc) · 2.62 KB
/
run_train_gpt2.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
60
61
62
63
64
65
66
67
68
69
70
71
#!/bin/bash
if [[ $# -lt 1 ]]
then
PATH_DIR=$(realpath .)
else
PATH_DIR=$(realpath "$1")
fi
# Train (furniture, text-only)
python -m gpt2_dst.scripts.run_language_modeling \
--output_dir="${PATH_DIR}"/gpt2_dst/save/furniture_to \
--model_type=gpt2 \
--model_name_or_path=gpt2 \
--line_by_line \
--add_special_tokens="${PATH_DIR}"/gpt2_dst/data/furniture_to/special_tokens.json \
--do_train \
--train_data_file="${PATH_DIR}"/gpt2_dst/data/furniture_to/furniture_train_dials_target.txt \
--do_eval \
--eval_data_file="${PATH_DIR}"/gpt2_dst/data/furniture_to/furniture_dev_dials_target.txt \
--num_train_epochs=1 \
--overwrite_output_dir \
--per_gpu_train_batch_size=4 \
--per_gpu_eval_batch_size=4
# Train (furniture, multi-modal)
python -m gpt2_dst.scripts.run_language_modeling \
--output_dir="${PATH_DIR}"/gpt2_dst/save/furniture \
--model_type=gpt2 \
--model_name_or_path=gpt2 \
--line_by_line \
--add_special_tokens="${PATH_DIR}"/gpt2_dst/data/furniture/special_tokens.json \
--do_train \
--train_data_file="${PATH_DIR}"/gpt2_dst/data/furniture/furniture_train_dials_target.txt \
--do_eval \
--eval_data_file="${PATH_DIR}"/gpt2_dst/data/furniture/furniture_dev_dials_target.txt \
--num_train_epochs=1 \
--overwrite_output_dir \
--per_gpu_train_batch_size=4 \
--per_gpu_eval_batch_size=4
# Train (Fashion, text-only)
python -m gpt2_dst.scripts.run_language_modeling \
--output_dir="${PATH_DIR}"/gpt2_dst/save/fashion_to \
--model_type=gpt2 \
--model_name_or_path=gpt2 \
--line_by_line \
--add_special_tokens="${PATH_DIR}"/gpt2_dst/data/fashion_to/special_tokens.json \
--do_train \
--train_data_file="${PATH_DIR}"/gpt2_dst/data/fashion_to/fashion_train_dials_target.txt \
--do_eval \
--eval_data_file="${PATH_DIR}"/gpt2_dst/data/fashion_to/fashion_dev_dials_target.txt \
--num_train_epochs=1 \
--overwrite_output_dir \
--per_gpu_train_batch_size=4 \
--per_gpu_eval_batch_size=4
# Train (Fashion, multi-modal)
python -m gpt2_dst.scripts.run_language_modeling \
--output_dir="${PATH_DIR}"/gpt2_dst/save/fashion \
--model_type=gpt2 \
--model_name_or_path=gpt2 \
--line_by_line \
--add_special_tokens="${PATH_DIR}"/gpt2_dst/data/fashion/special_tokens.json \
--do_train \
--train_data_file="${PATH_DIR}"/gpt2_dst/data/fashion/fashion_train_dials_target.txt \
--do_eval \
--eval_data_file="${PATH_DIR}"/gpt2_dst/data/fashion/fashion_dev_dials_target.txt \
--num_train_epochs=1 \
--overwrite_output_dir \
--per_gpu_train_batch_size=4 \
--per_gpu_eval_batch_size=4