diff --git a/PaddleNLP/legacy/pretrain_language_models/BERT/README.md b/PaddleNLP/legacy/pretrain_language_models/BERT/README.md index 4342dd43ffadd6cfe995ac8a3d46af6b8643e051..2f18176842b4cdd58f75584372262eba43b62636 100644 --- a/PaddleNLP/legacy/pretrain_language_models/BERT/README.md +++ b/PaddleNLP/legacy/pretrain_language_models/BERT/README.md @@ -202,7 +202,6 @@ DATA_PATH=/path/to/xnli/data/ CKPT_PATH=/path/to/save/checkpoints/ python -u run_classifier.py --task_name ${TASK_NAME} \ - --use_cuda false \ --use_xpu true \ --do_train true \ --do_val true \ @@ -232,6 +231,13 @@ python -u run_classifier.py --task_name ${TASK_NAME} \ [dev evaluation] ave loss: 0.622958, ave acc: 0.770281, elapsed time: 8.946956 s ``` +xpu训练结束后,验证集上的测试结果: + +``` +[dev evaluation] ave loss: 0.620479, ave acc: 0.762249, elapsed time: 70.831693 s +[test evaluation] ave loss: 0.616955, ave acc: 0.762275, elapsed time: 142.251840 s +``` + ### 阅读理解 SQuAD 下载 SQuAD 的数据以及测评脚本到 `$SQUAD_APTH` 目录。 diff --git a/PaddleNLP/legacy/pretrain_language_models/BERT/run_classifier.py b/PaddleNLP/legacy/pretrain_language_models/BERT/run_classifier.py index 63537a99fe39cd4d397a4ccc6d030c0134f4611d..4669ffb3e9a9c0acb2669a7c83f3679e742e367e 100644 --- a/PaddleNLP/legacy/pretrain_language_models/BERT/run_classifier.py +++ b/PaddleNLP/legacy/pretrain_language_models/BERT/run_classifier.py @@ -100,8 +100,8 @@ run_type_g.add_arg("profiler_path", str, './', "the profiler o run_type_g.add_arg("is_profiler", int, 0, "the profiler switch. (used for benchmark)") run_type_g.add_arg("max_iter", int, 0, "the max batch nums to train. (used for benchmark)") -run_type_g.add_arg("use_cuda", bool, True, "If set, use GPU for training.") -run_type_g.add_arg("use_xpu", bool, True, "If set, use XPU for training.") +run_type_g.add_arg("use_cuda", bool, False, "If set, use GPU for training.") +run_type_g.add_arg("use_xpu", bool, False, "If set, use XPU for training.") run_type_g.add_arg("use_fast_executor", bool, False, "If set, use fast parallel executor (in experiment).") run_type_g.add_arg("shuffle", bool, True, "") run_type_g.add_arg("num_iteration_per_drop_scope", int, 1, "Ihe iteration intervals to clean up temporary variables.")