Skip to content

Commit

Permalink
fix some typo.
Browse files Browse the repository at this point in the history
  • Loading branch information
ZHUI committed Feb 22, 2021
1 parent 38e7c5e commit 668544d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion examples/language_model/gpt2/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ python run_eval.py --model_name_or_path gpt2-medium-en \
--batch_size 8 \
--device gpu
```
不设置`init_checkpoint_path` 参数时,可以评估默认预训练好的模型参数。
其中数据集WikiText采用的是PPL(perplexity)评估指标,LAMBADA采用的是ACC(accuracy)指标。不设置`init_checkpoint_path` 参数时,可以评估默认预训练好的模型参数。


### 文本生成
Expand Down
6 changes: 3 additions & 3 deletions examples/language_model/gpt2/run_eval.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
# Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -39,11 +39,11 @@
+ ", ".join(sum([list(classes[-1].pretrained_init_configuration.keys()) for classes in MODEL_CLASSES.values()], [])), )
parser.add_argument("--eval_path", default=None, type=str, required=True, help="The eval file path.", )
parser.add_argument('--cloze_eval', action='store_true', help='Evaluation dataset from `--eval_path` is a cloze task')
parser.add_argument('--overlapping_eval', type=int, default=32, help='sliding window for overlapping eval ')
parser.add_argument('--overlapping_eval', type=int, default=32, help='Sliding window for overlapping eval ')
parser.add_argument("--init_checkpoint_path", default=None, type=str, help="The model checkpoint path.", )
parser.add_argument( "--batch_size", default=8, type=int, help="Batch size per GPU/CPU for training.", )
parser.add_argument('--seq_length', type=int, default=1024, help='Maximum sequence length to process for evaluation.')
parser.add_argument("--device", type=str, default="gpu", help="select cpu, gpu, xpu devices.")
parser.add_argument("--device", type=str, default="gpu", help="Select cpu, gpu, xpu devices.")
parser.add_argument("--logging_steps", type=int, default=100, help="Log every X updates steps.")
# yapf: enable

Expand Down

0 comments on commit 668544d

Please sign in to comment.