From f5a9fc1837a7c2c7f9cfa4220e9e8c7e320fdb80 Mon Sep 17 00:00:00 2001 From: Zhi Sun <46339764+DOUDOU0314@users.noreply.github.com> Date: Mon, 24 May 2021 23:19:12 +0800 Subject: [PATCH] [BUGFIX] Fix bug in issue #1570 (#1572) * add uncased_bert_wwm_large version * Update generate_commands.py * Update run_squad2_uncased_bert_wwm_large.sh * add wwm version * add wwm version * fixed a bug and add a NaturalQuestion index in README.md * update wikiextractor version * bug fix * modify * fix fairseq version * Update convert_fairseq_roberta.py * Update convert_fairseq_roberta.py * Update convert_fairseq_xlmr.py Co-authored-by: Ubuntu Co-authored-by: Ubuntu Co-authored-by: Ubuntu Co-authored-by: Sheng Zha Co-authored-by: Ubuntu --- scripts/conversion_toolkits/convert_fairseq_xlmr.py | 2 +- scripts/conversion_toolkits/convert_xlmr.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/conversion_toolkits/convert_fairseq_xlmr.py b/scripts/conversion_toolkits/convert_fairseq_xlmr.py index 469bb94d94..4b3ec74da6 100644 --- a/scripts/conversion_toolkits/convert_fairseq_xlmr.py +++ b/scripts/conversion_toolkits/convert_fairseq_xlmr.py @@ -87,7 +87,7 @@ def convert_fairseq_model(args): checkpoint_file='model.pt') vocab_size = convert_vocab(args, fairseq_xlmr) - gluon_cfg = convert_config(fairseq_xlmr.cfg.model, vocab_size, + gluon_cfg = convert_config(fairseq_xlmr.args, vocab_size, XLMRModel.get_cfg().clone()) with open(os.path.join(args.save_dir, 'model.yml'), 'w') as of: of.write(gluon_cfg.dump()) diff --git a/scripts/conversion_toolkits/convert_xlmr.sh b/scripts/conversion_toolkits/convert_xlmr.sh index 20fefff7a6..a10fd4d746 100644 --- a/scripts/conversion_toolkits/convert_xlmr.sh +++ b/scripts/conversion_toolkits/convert_xlmr.sh @@ -1,4 +1,4 @@ -python3 -m pip install git+https://github.com/pytorch/fairseq.git@master --upgrade --user +python3 -m pip install fairseq==0.10.1 --upgrade --user for model in base large do mkdir xlmr_${model}