From 3366cf65fe57772a48f0dcb7b5593a2048454c8e Mon Sep 17 00:00:00 2001 From: Steffy-zxf <48793257+Steffy-zxf@users.noreply.github.com> Date: Tue, 15 Dec 2020 17:06:31 +0800 Subject: [PATCH] update docs for ernie-tiny update docs for ernie-tiny --- .../examples/text_matching/sentence_transformers/README.md | 4 ++-- .../examples/text_matching/sentence_transformers/train.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/PaddleNLP/examples/text_matching/sentence_transformers/README.md b/PaddleNLP/examples/text_matching/sentence_transformers/README.md index 31e6756d..ad4547a9 100644 --- a/PaddleNLP/examples/text_matching/sentence_transformers/README.md +++ b/PaddleNLP/examples/text_matching/sentence_transformers/README.md @@ -48,7 +48,7 @@ PaddleNLP提供了丰富的预训练模型,并且可以便捷地获取PaddlePa | bert-base-chinese | 0.86537 | 0.84440 | | bert-wwm-chinese | 0.86333 | 0.84128 | | bert-wwm-ext-chinese | 0.86049 | 0.83848 | -| ernie | 0.87480 | 0.84760 | +| ernie-1.0 | 0.87480 | 0.84760 | | ernie-tiny | 0.86071 | 0.83352 | | roberta-wwm-ext | 0.87526 | 0.84904 | | rbt3 | 0.85367 | 0.83464 | @@ -98,7 +98,7 @@ python train.py --model_type ernie --model_name ernie-1.0 --n_gpu 1 --save_dir . * `model_name`: 必选,具体的模型简称。 如`model_type=ernie`,则model_name可以选择`ernie-1.0`和`ernie-tiny`。 如`model_type=bert`,则model_name可以选择`bert-base-chinese`,`bert-wwm-chinese`,`bert-wwm-ext-chinese`。 - 如`model_type=roberta`,则model_name可以选择`roberta-wwm-ext-large`,`roberta-wwm-ext`,`rbt3`,`rbtl3`。 + 如`model_type=roberta`,则model_name可以选择`roberta-wwm-ext`,`rbt3`,`rbtl3`。 * `save_dir`:必选,保存训练模型的目录。 * `max_seq_length`:可选,ERNIE/BERT模型使用的最大序列长度,最大不能超过512, 若出现显存不足,请适当调低这一参数;默认为128。 * `batch_size`:可选,批处理大小,请结合显存情况进行调整,若出现显存不足,请适当调低这一参数;默认为32。 diff --git a/PaddleNLP/examples/text_matching/sentence_transformers/train.py b/PaddleNLP/examples/text_matching/sentence_transformers/train.py index f67ed78e..93e2f96f 100644 --- a/PaddleNLP/examples/text_matching/sentence_transformers/train.py +++ b/PaddleNLP/examples/text_matching/sentence_transformers/train.py @@ -248,8 +248,8 @@ def do_train(args): train_dataset, dev_dataset, test_dataset = ppnlp.datasets.LCQMC.get_datasets( ['train', 'dev', 'test']) - if args.model_name == 'ernie_tiny': - # ErnieTinyTokenizer is special for ernie_tiny pretained model. + if args.model_name == 'ernie-tiny': + # ErnieTinyTokenizer is special for ernie-tiny pretained model. tokenizer = ppnlp.transformers.ErnieTinyTokenizer.from_pretrained( args.model_name) else: -- GitLab