Skip to content

Commit

Permalink
add bert train configs
Browse files Browse the repository at this point in the history
  • Loading branch information
mandarjoshi90 committed Aug 27, 2019
1 parent b9ec424 commit 798e379
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 0 deletions.
32 changes: 32 additions & 0 deletions experiments.conf
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,22 @@ bert_base = ${best}{
init_checkpoint = ${best.log_root}/bert_base/model.max.ckpt
}

train_bert_base = ${best}{
num_docs = 2802
bert_learning_rate = 1e-05
task_learning_rate = 0.0002
max_segment_len = 128
ffnn_size = 1000
train_path = ${data_dir}/train.english.128.jsonlines
eval_path = ${data_dir}/dev.english.128.jsonlines
conll_eval_path = ${data_dir}/dev.english.v4_gold_conll
max_training_sentences = 11
bert_config_file = ${best.log_root}/cased_L-12_H-768_A-12/bert_config.json
vocab_file = ${best.log_root}/cased_L-12_H-768_A-12/vocab.txt
tf_checkpoint = ${best.log_root}/cased_L-12_H-768_A-12/bert_model.ckpt
init_checkpoint = ${best.log_root}/cased_L-12_H-768_A-12/bert_model.ckpt
}

bert_large = ${best}{
num_docs = 2802
bert_learning_rate = 1e-05
Expand All @@ -76,6 +92,22 @@ bert_large = ${best}{
init_checkpoint = ${best.log_root}/bert_large/model.max.ckpt
}

train_bert_large = ${best}{
num_docs = 2802
bert_learning_rate = 1e-05
task_learning_rate = 0.0002
max_segment_len = 384
ffnn_size = 3000
train_path = ${data_dir}/train.english.384.jsonlines
eval_path = ${data_dir}/dev.english.384.jsonlines
conll_eval_path = ${data_dir}/dev.english.v4_gold_conll
max_training_sentences = 3
bert_config_file = ${best.log_root}/cased_L-24_H-1024_A-16/bert_config.json
vocab_file = ${best.log_root}/cased_L-24_H-1024_A-16/vocab.txt
tf_checkpoint = ${best.log_root}/cased_L-24_H-1024_A-16/bert_model.max.ckpt
init_checkpoint = ${best.log_root}/cased_L-24_H-1024_A-16/bert_model.max.ckpt
}

spanbert_base = ${best}{
num_docs = 2802
bert_learning_rate = 2e-05
Expand Down
10 changes: 10 additions & 0 deletions setup_training.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,14 @@ dlx() {
rm $data_dir/$2
}

download_bert(){
model=$1
wget -P $data_dir https://storage.googleapis.com/bert_models/2018_10_18/$model.zip
unzip $data_dir/$model.zip
rm $data_dir/$model.zip
mv $model $data_dir/
}

conll_url=http://conll.cemantix.org/2012/download
dlx $conll_url conll-2012-train.v4.tar.gz
dlx $conll_url conll-2012-development.v4.tar.gz
Expand All @@ -19,6 +27,8 @@ dlx $conll_url/test conll-2012-test-official.v9.tar.gz
dlx $conll_url conll-2012-scripts.v3.tar.gz
dlx http://conll.cemantix.org/download reference-coreference-scorers.v8.01.tar.gz

download_bert cased_L-12_H-768_A-12
download_bert cased_L-24_H-1024_A-16

bash conll-2012/v3/scripts/skeleton2conll.sh -D $ontonotes_path/data/files/data $data_dir/conll-2012

Expand Down

0 comments on commit 798e379

Please sign in to comment.