awasthiabhijeet / PIE

Fast + Non-Autoregressive Grammatical Error Correction using BERT. Code and Pre-trained models for paper "Parallel Iterative Edit Models for Local Sequence Transduction": www.aclweb.org/anthology/D19-1435.pdf (EMNLP-IJCNLP 2019)
MIT License
228 stars 40 forks source link

How to fine-tune PIE on customized dataset? #10

Closed hqsiswiliam closed 4 years ago

hqsiswiliam commented 4 years ago

Hi Authors,

Thanks for your great work! Now I am stuck at fine-tuning pre-trained PIE on customized data, is there any way to do so? Many thanks for your reply.

awasthiabhijeet commented 4 years ago

Hi, Please read the instructions here and checkout end_to_end.sh

Since you only need to fine-tune pre-trained PIE, In preprocess.sh you can comment out part of the code which extracts common insertions.

While using word_edit_model.py for training, you will need to pass the path of pre-trained PIE to initialize the PIE model.

hqsiswiliam commented 4 years ago

Hi, Please read the instructions here and checkout end_to_end.sh

Since you only need to fine-tune pre-trained PIE, In preprocess.sh you can comment out part of the code which extracts common insertions.

While using word_edit_model.py for training, you will need to pass the path of pre-trained PIE to initialize the PIE model.

Thanks a lot, I will try it out.

bexxxxx commented 4 years ago

Hi @awasthiabhijeet @hqsiswiliam does this mean to change the init-checkpoint in pie_train.sh from bert to pie_model.ckpt ?