forked from dmlc/gluon-nlp
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
123 additions
and
0 deletions.
There are no files selected for viewing
24 changes: 24 additions & 0 deletions
24
scripts/question_answering/commands/run_squad2_albert_base.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
VERSION=2.0 # Either 2.0 or 1.1 | ||
MODEL_NAME=google_albert_base_v2 | ||
|
||
# Prepare the Data | ||
nlp_data prepare_squad --version ${VERSION} | ||
|
||
# Run the script | ||
python3 run_squad.py \ | ||
--model_name ${MODEL_NAME} \ | ||
--data_dir squad \ | ||
--output_dir fintune_${MODEL_NAME}_squad_${VERSION} \ | ||
--version ${VERSION} \ | ||
--do_eval \ | ||
--do_train \ | ||
--batch_size 4 \ | ||
--num_accumulated 3 \ | ||
--gpus 0,1,2,3 \ | ||
--epochs 3 \ | ||
--lr 2e-5 \ | ||
--warmup_ratio 0.1 \ | ||
--wd 0.01 \ | ||
--max_seq_length 512 \ | ||
--max_grad_norm 0.1 \ | ||
--overwrite_cache \ |
24 changes: 24 additions & 0 deletions
24
scripts/question_answering/commands/run_squad2_albert_large.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
VERSION=2.0 # Either 2.0 or 1.1 | ||
MODEL_NAME=google_albert_large_v2 | ||
|
||
# Prepare the Data | ||
nlp_data prepare_squad --version ${VERSION} | ||
|
||
# Run the script | ||
python3 run_squad.py \ | ||
--model_name ${MODEL_NAME} \ | ||
--data_dir squad \ | ||
--output_dir fintune_${MODEL_NAME}_squad_${VERSION} \ | ||
--version ${VERSION} \ | ||
--do_eval \ | ||
--do_train \ | ||
--batch_size 3 \ | ||
--num_accumulated 4 \ | ||
--gpus 0,1,2,3 \ | ||
--epochs 3 \ | ||
--lr 2e-5 \ | ||
--warmup_ratio 0.1 \ | ||
--wd 0.01 \ | ||
--max_seq_length 512 \ | ||
--max_grad_norm 0.1 \ | ||
--overwrite_cache \ |
25 changes: 25 additions & 0 deletions
25
scripts/question_answering/commands/run_squad2_electra_base.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Prepare the Data | ||
nlp_data prepare_squad --version ${VERSION} | ||
|
||
VERSION=2.0 # Either 2.0 or 1.1 | ||
MODEL_NAME=google_electra_base | ||
|
||
# Run the script | ||
|
||
python3 run_squad.py \ | ||
--model_name ${MODEL_NAME} \ | ||
--data_dir squad \ | ||
--output_dir fintune_${MODEL_NAME}_squad_${VERSION} \ | ||
--version ${VERSION} \ | ||
--do_eval \ | ||
--do_train \ | ||
--batch_size 8 \ | ||
--num_accumulated 1 \ | ||
--gpus 0,1,2,3 \ | ||
--epochs 2 \ | ||
--lr 1e-4 \ | ||
--layerwise_decay 0.8 \ | ||
--warmup_ratio 0.1 \ | ||
--wd 0 \ | ||
--max_seq_length 512 \ | ||
--max_grad_norm 0.1 \ |
25 changes: 25 additions & 0 deletions
25
scripts/question_answering/commands/run_squad2_electra_large.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Prepare the Data | ||
nlp_data prepare_squad --version ${VERSION} | ||
|
||
VERSION=2.0 # Either 2.0 or 1.1 | ||
MODEL_NAME=google_electra_large | ||
|
||
# Run the script | ||
|
||
python3 run_squad.py \ | ||
--model_name ${MODEL_NAME} \ | ||
--data_dir squad \ | ||
--output_dir fintune_${MODEL_NAME}_squad_${VERSION} \ | ||
--version ${VERSION} \ | ||
--do_eval \ | ||
--do_train \ | ||
--batch_size 2 \ | ||
--num_accumulated 4 \ | ||
--gpus 0,1,2,3 \ | ||
--epochs 2 \ | ||
--lr 5e-5 \ | ||
--layerwise_decay 0.9 \ | ||
--warmup_ratio 0.1 \ | ||
--wd 0 \ | ||
--max_seq_length 512 \ | ||
--max_grad_norm 0.1 \ |
25 changes: 25 additions & 0 deletions
25
scripts/question_answering/commands/run_squad2_electra_small.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Prepare the Data | ||
nlp_data prepare_squad --version ${VERSION} | ||
|
||
VERSION=2.0 # Either 2.0 or 1.1 | ||
MODEL_NAME=google_electra_small | ||
|
||
# Run the script | ||
|
||
python3 run_squad.py \ | ||
--model_name ${MODEL_NAME} \ | ||
--data_dir squad \ | ||
--output_dir fintune_${MODEL_NAME}_squad_${VERSION} \ | ||
--version ${VERSION} \ | ||
--do_eval \ | ||
--do_train \ | ||
--batch_size 32 \ | ||
--num_accumulated 1 \ | ||
--gpus 0 \ | ||
--epochs 2 \ | ||
--lr 3e-4 \ | ||
--layerwise_decay 0.8 \ | ||
--warmup_ratio 0.1 \ | ||
--wd 0 \ | ||
--max_seq_length 512 \ | ||
--max_grad_norm 0.1 \ |