File tree 3 files changed +32
-4
lines changed
tests/fixtures/tests_samples/xnli
3 files changed +32
-4
lines changed Original file line number Diff line number Diff line change 29
29
30
30
``` text
31
31
.
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 # 分类任务微调脚本
34
45
```
35
46
36
47
## 开始运行
Original file line number Diff line number Diff line change @@ -969,6 +969,7 @@ if [ ! -f 'test.py' ];then
969
969
--do_train \
970
970
--do_eval \
971
971
--do_export \
972
+ --device gpu \
972
973
--task_type cross-lingual-transfer \
973
974
--model_name_or_path __internal_testing__/ernie-m \
974
975
--use_test_data True \
@@ -984,7 +985,7 @@ if [ ! -f 'test.py' ];then
984
985
print_info $? ernie-m_clt
985
986
# inference for cross-lingual-transfer
986
987
python deploy/predictor/inference.py \
987
- --device cpu \
988
+ --device gpu \
988
989
--task_name seq_cls \
989
990
--model_path output_clt/export/model > ${log_path} /ernie-m_clt_infer >> ${log_path} /ernie-m_clt_infer 2>&1
990
991
print_info $? ernie-m_clt_infer
@@ -993,6 +994,7 @@ if [ ! -f 'test.py' ];then
993
994
--do_train \
994
995
--do_eval \
995
996
--do_export \
997
+ --device gpu \
996
998
--task_type translate-train-all \
997
999
--model_name_or_path __internal_testing__/ernie-m \
998
1000
--use_test_data True \
@@ -1008,7 +1010,7 @@ if [ ! -f 'test.py' ];then
1008
1010
print_info $? ernie-m_tta
1009
1011
# inference for translate-train-all
1010
1012
python deploy/predictor/inference.py \
1011
- --device cpu \
1013
+ --device gpu \
1012
1014
--task_name seq_cls \
1013
1015
--model_path output_tta/export/model > ${log_path} /ernie-m_tta_infer >> ${log_path} /ernie-m_tta_infer 2>&1
1014
1016
print_info $? ernie-m_tta_infer
Original file line number Diff line number Diff line change 8
8
"hypothesis" : " A member of my team will execute your orders with immense precision ." ,
9
9
"label" : 2
10
10
}
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
+ }
11
26
{
12
27
"premise" : " Conceptually cream skimming has two basic dimensions - product and geography ." ,
13
28
"hypothesis" : " Product and geography are what make cream skimming work ." ,
You can’t perform that action at this time.
0 commit comments