File tree Expand file tree Collapse file tree 3 files changed +32
-4
lines changed
tests/fixtures/tests_samples/xnli Expand file tree Collapse file tree 3 files changed +32
-4
lines changed Original file line number Diff line number Diff line change 2929
3030``` text
3131.
32- ├── README.md # 文档
33- ├── run_classifier.py # 自然语言推断任务
32+ |-- README.md # 文档
33+ |-- deploy # 部署目录
34+ | |-- predictor # onnx离线部署
35+ | | |-- README.md
36+ | | |-- ernie_m_predictor.py
37+ | | |-- inference.py
38+ | | |-- requirements_cpu.txt
39+ | | `-- requirements_gpu.txt
40+ | `-- simple_serving # 基于PaddleNLP SimpleServing 服务化部署
41+ | |-- README.md
42+ | |-- client_seq_cls.py
43+ | `-- server_seq_cls.py
44+ `-- run_classifier.py # 分类任务微调脚本
3445```
3546
3647## 开始运行
Original file line number Diff line number Diff line change @@ -969,6 +969,7 @@ if [ ! -f 'test.py' ];then
969969 --do_train \
970970 --do_eval \
971971 --do_export \
972+ --device gpu \
972973 --task_type cross-lingual-transfer \
973974 --model_name_or_path __internal_testing__/ernie-m \
974975 --use_test_data True \
@@ -984,7 +985,7 @@ if [ ! -f 'test.py' ];then
984985 print_info $? ernie-m_clt
985986 # inference for cross-lingual-transfer
986987 python deploy/predictor/inference.py \
987- --device cpu \
988+ --device gpu \
988989 --task_name seq_cls \
989990 --model_path output_clt/export/model > ${log_path} /ernie-m_clt_infer >> ${log_path} /ernie-m_clt_infer 2>&1
990991 print_info $? ernie-m_clt_infer
@@ -993,6 +994,7 @@ if [ ! -f 'test.py' ];then
993994 --do_train \
994995 --do_eval \
995996 --do_export \
997+ --device gpu \
996998 --task_type translate-train-all \
997999 --model_name_or_path __internal_testing__/ernie-m \
9981000 --use_test_data True \
@@ -1008,7 +1010,7 @@ if [ ! -f 'test.py' ];then
10081010 print_info $? ernie-m_tta
10091011 # inference for translate-train-all
10101012 python deploy/predictor/inference.py \
1011- --device cpu \
1013+ --device gpu \
10121014 --task_name seq_cls \
10131015 --model_path output_tta/export/model > ${log_path} /ernie-m_tta_infer >> ${log_path} /ernie-m_tta_infer 2>&1
10141016 print_info $? ernie-m_tta_infer
Original file line number Diff line number Diff line change 88 "hypothesis" : " A member of my team will execute your orders with immense precision ." ,
99 "label" : 2
1010}
11+ {
12+ "premise" : " Conceptually cream skimming has two basic dimensions - product and geography ." ,
13+ "hypothesis" : " Product and geography are what make cream skimming work ." ,
14+ "label" : 1
15+ }
16+ {
17+ "premise" : " 从 概念 上 看 , 奶油 收入 有 两 个 基本 方面 产品 和 地理 ." ,
18+ "hypothesis" : " 产品 和 地理 是 什么 使 奶油 抹 霜 工作 ." ,
19+ "label" : 0
20+ }
21+ {
22+ "premise" : " One of our number will carry out your instructions minutely ." ,
23+ "hypothesis" : " A member of my team will execute your orders with immense precision ." ,
24+ "label" : 2
25+ }
1126{
1227 "premise" : " Conceptually cream skimming has two basic dimensions - product and geography ." ,
1328 "hypothesis" : " Product and geography are what make cream skimming work ." ,
You can’t perform that action at this time.
0 commit comments