This repository has been archived by the owner on Dec 1, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 36
/
Copy pathrun_generate_gpt2.sh
executable file
·47 lines (43 loc) · 1.87 KB
/
run_generate_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
#!/bin/bash
if [[ $# -lt 1 ]]
then
PATH_DIR=$(realpath .)
else
PATH_DIR=$(realpath "$1")
fi
# Generate sentences (Furniture, text-only)
python -m gpt2_dst.scripts.run_generation \
--model_type=gpt2 \
--model_name_or_path="${PATH_DIR}"/gpt2_dst/save/furniture_to/ \
--num_return_sequences=1 \
--length=100 \
--stop_token='<EOS>' \
--prompts_from_file="${PATH_DIR}"/gpt2_dst/data/furniture_to/furniture_devtest_dials_predict.txt \
--path_output="${PATH_DIR}"/gpt2_dst/results/furniture_to/furniture_devtest_dials_predicted.txt
# Generate sentences (Furniture, multi-modal)
python -m gpt2_dst.scripts.run_generation \
--model_type=gpt2 \
--model_name_or_path="${PATH_DIR}"/gpt2_dst/save/furniture/ \
--num_return_sequences=1 \
--length=100 \
--stop_token='<EOS>' \
--prompts_from_file="${PATH_DIR}"/gpt2_dst/data/furniture/furniture_devtest_dials_predict.txt \
--path_output="${PATH_DIR}"/gpt2_dst/results/furniture/furniture_devtest_dials_predicted.txt
# Generate sentences (Fashion, text-only)
python -m gpt2_dst.scripts.run_generation \
--model_type=gpt2 \
--model_name_or_path="${PATH_DIR}"/gpt2_dst/save/fashion_to/ \
--num_return_sequences=1 \
--length=100 \
--stop_token='<EOS>' \
--prompts_from_file="${PATH_DIR}"/gpt2_dst/data/fashion_to/fashion_devtest_dials_predict.txt \
--path_output="${PATH_DIR}"/gpt2_dst/results/fashion_to/fashion_devtest_dials_predicted.txt
# Generate sentences (Fashion, multi-modal)
python -m gpt2_dst.scripts.run_generation \
--model_type=gpt2 \
--model_name_or_path="${PATH_DIR}"/gpt2_dst/save/fashion/ \
--num_return_sequences=1 \
--length=100 \
--stop_token='<EOS>' \
--prompts_from_file="${PATH_DIR}"/gpt2_dst/data/fashion/fashion_devtest_dials_predict.txt \
--path_output="${PATH_DIR}"/gpt2_dst/results/fashion/fashion_devtest_dials_predicted.txt