-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathtrain_bert_model.sh
executable file
·118 lines (82 loc) · 3.77 KB
/
train_bert_model.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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
##############################################################
# TRAIN MODEL FOR CONSTITUENTS
##############################################################
#BERT+linear finetuned
python run_token_classifier.py \
--data_dir ./data/datasets/PTB-linearized/ \
--bert_model bert-base-cased \
--task_name sl_tsv \
--model_dir /tmp/bert.PTB.finetune.linear.model \
--output_dir /tmp/dev.output \
--path_gold_parenthesized ./data/datasets/PTB/dev.trees \
--parsing_paradigm constituency --do_train --do_eval --num_train_epochs 15 --max_seq_length 250
#BERT+linear not finetuned
python run_token_classifier.py \
--data_dir ./data/datasets/PTB-linearized/ \
--bert_model bert-base-cased \
--task_name sl_tsv \
--model_dir /tmp/bert.PTB.linear.model \
--output_dir /tmp/dev.output \
--path_gold_parenthesized ./data/datasets/PTB/dev.trees \
--parsing_paradigm constituency --do_train --do_eval --learning_rate 5e-4 --num_train_epochs 15 --max_seq_length 250 --not_finetune
#BERT+BILSTM+linear finetuned
python run_token_classifier.py \
--data_dir ./data/datasets/PTB-linearized/ \
--bert_model bert-base-cased \
--task_name sl_tsv \
--model_dir /tmp/bert.PTB.finetune.lstms.model \
--output_dir /tmp/dev.output \
--evalb tree2labels/EVALB/evalb \
--path_gold_parenthesized ./data/datasets/PTB/dev.trees \
--tree2labels tree2labels/ \
--parsing_paradigm constituency --do_train --do_eval --num_train_epochs 15 --max_seq_length 250 --use_bilstms
#BERT+BILSTM+linear not finetuned
python run_token_classifier.py \
--data_dir ./data/datasets/PTB-linearized-proof/ \
--bert_model bert-base-cased \
--task_name sl_tsv \
--model_dir /tmp/bert.PTB.lstms.model \
--output_dir /tmp/dev.output \
--evalb tree2labels/EVALB/evalb \
--path_gold_parenthesized ./data/datasets/PTB/dev.trees \
--tree2labels tree2labels/ \
--parsing_paradigm constituency --do_train --do_eval --learning_rate 5e-4 --num_train_epochs 15 --max_seq_length 250 --use_bilstms --not_finetune
##############################################################
# TRAIN MODEL FOR DEPENDENCIES
##############################################################
#BERT+linear finetuned
python run_token_classifier.py \
--data_dir ./data/datasets/EN_EWT-linearized/ \
--bert_model bert-base-cased \
--task_name sl_tsv \
--model_dir /tmp/bert.EN_EWT.finetune.linear.model \
--output_dir /tmp/dev.output \
--path_gold_conll ./data/datasets/en-ewt/en_ewt-ud-dev.conllu \
--parsing_paradigm dependencies --do_train --do_eval --learning_rate 5e-4 --num_train_epochs 15 --max_seq_length 250
#BERT+linear not finetuned
python run_token_classifier.py \
--data_dir ./data/datasets/EN_EWT-linearized/ \
--bert_model bert-base-cased \
--task_name sl_tsv \
--model_dir /tmp/bert.EN_EWT.linear.model \
--output_dir /tmp/dev.output \
--path_gold_conll ./data/datasets/en-ewt/en_ewt-ud-dev.conllu \
--parsing_paradigm dependencies --do_train --do_eval --learning_rate 5e-4 --num_train_epochs 15 --not_finetune --max_seq_length 250
#BERT+BILSTM+linear finetuned
python run_token_classifier.py \
--data_dir ./data/datasets/EN_EWT-linearized/ \
--bert_model bert-base-cased \
--task_name sl_tsv \
--model_dir /tmp/bert.EN_EWT.finetune.lstms.model \
--output_dir /tmp/dev.output \
--path_gold_conll ./data/datasets/en-ewt/en_ewt-ud-dev.conllu \
--parsing_paradigm dependencies --do_train --do_eval --num_train_epochs 15 --use_bilstms --max_seq_length 250
#BERT+BILSTM+linear not finetuned
python run_token_classifier.py \
--data_dir ./data/datasets/EN_EWT-linearized/ \
--bert_model bert-base-cased \
--task_name sl_tsv \
--model_dir /tmp/bert.EN_EWT.lstms.model \
--output_dir /tmp/dev.output \
--path_gold_conll ./data/datasets/en-ewt/en_ewt-ud-dev.conllu \
--parsing_paradigm dependencies --do_train --do_eval --learning_rate 5e-4 --num_train_epochs 15 --use_bilstms --not_finetune --max_seq_length 250