[SCRIPT] Reproduce MNLI tasks based on BERT #571
Conversation
Codecov Report
@@ Coverage Diff @@
## master #571 +/- ##
==========================================
- Coverage 71.59% 71.21% -0.39%
==========================================
Files 125 126 +1
Lines 10595 10665 +70
==========================================
+ Hits 7586 7595 +9
- Misses 3009 3070 +61
|
Codecov Report
@@ Coverage Diff @@
## master #571 +/- ##
==========================================
- Coverage 65.85% 64.55% -1.31%
==========================================
Files 147 148 +1
Lines 13090 13803 +713
==========================================
+ Hits 8621 8910 +289
- Misses 4469 4893 +424
|
What is the command to reproduce the result? |
scripts/bert/finetune_mnli.py
Outdated
dataset = 'book_corpus_wiki_en_uncased' | ||
bert, vocabulary = bert_12_768_12(dataset_name=dataset, | ||
pretrained=True, ctx=ctx, use_pooler=True, | ||
use_decoder=False, use_classifier=False) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we also add an option to load from a specific checkpoint file? For example, users can specify --load_checkpoint ~/.mxnet/bert/xxx.params
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@eric-haibin-lin
GLUE task only requires 3 or 5 epochs for fine-tuning, I don't think checkpoint
requires currently.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good question. What I mean is that if someone uses our pre-training script to further pre-train on their dataset (work in progress, not merged yet), they're interested in loading the bert checkpoint and finetune on other tasks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, adding this option will make the script work for a more specific situation, and this is easy to implement. I can add it later.
Can you show training logs? 😃 |
Of course, I will open a PR later to upload the log to |
Add MNLI based on dmlc#481 fix MNLIDataset
Job PR-571/3 is complete. |
Job PR-571/4 is complete. |
I just check, |
Job PR-571/5 is complete. |
@haven-jeon I have not determined the value of this parameter in the original paper. In the fine-tuning I set the · |
Job PR-571/6 is complete. |
Job PR-571/2 is complete. |
@kenjewu |
Job PR-571/7 is complete. |
Update description of model_parameters fix context
Job PR-571/9 is complete. |
@haven-jeon could you help do another round of review and approve/request changes? |
Job PR-571/10 is complete. |
@kenjewu are you able to reproduce the result with the latest commit? I am only able to get 84.1/84.4 using commit dac3940 |
ok, I will try it again. |
In this task, setting epsilon to 1e-8 will give better results. |
Job PR-571/11 is complete. |
Job PR-571/12 is complete. |
Merged. Many thanks |
* first commit MNLI * tune some params * add double dev for script * retrigger ci * Add MNLI based on dmlc#481 Add MNLI based on dmlc#481 fix MNLIDataset * Add load/save checkpoint * fix dev dataloader bug * add load pretrained bert checkpoints and update index.rst * fix the loading of parameters * Update description of model_parameters Update description of model_parameters fix context * add epsilon argument * reset default value of epsilon
Description
Fine-tune the MNLI task using the pre-trained bert model. Add the ability to load and save checkpoint files.
This task is built on top of #481. Thanks everyone for their work.
Results [log]:
On dev_matched.tsv : 0.846
On dev_mismatched.tsv : 0.847
Checklist
Essentials
Changes
Comments