forked from charlesxzb/model-zoo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bert_large_transformers-4.23.0.nntc.config.yaml
110 lines (98 loc) · 3.14 KB
/
bert_large_transformers-4.23.0.nntc.config.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
---
name: bert_large_transformers-4.23.0
gops: 247.043
model: $(home)/bert_large_traced-4.23.0.pt
time: true
precision: true
BM1684:
fp_batch_sizes: [1, 2, 4, 8]
fp_outdir_template: "{}b.fp32.compilation"
fp_compile_options:
python3 -m bmnetp
--model $(model)
--descs=[0,int32,0,28990],[1,int32,0,2],[2,int32,0,2]
--shapes [1,384],[1,384],[1,384]
--cmp=False
--opt=1
--target=$(target)
--enable_profile=True
harness:
type: bert
args:
- name: FP32
bmodel: $(workdir)/1b.fp32.compilation/compilation.bmodel
BM1684X:
fp_loops:
- build_env: [ ]
fp_outdir_template: "{}b.fp32.compilation"
prec: FP32
- build_env:
- BMCOMPILER_LAYER_DTYPE_MODE=bf16
fp_outdir_template: "{}b.fp16.compilation"
prec: BF16
fp_batch_sizes: [1, 2, 4, 8]
fp_compile_options:
python3 -m bmnetp
--model $(model)
--descs=[0,int32,0,28990],[1,int32,0,2],[2,int32,0,2]
--shapes [1,384],[1,384],[1,384]
--cmp=false
--opt=1
--target $(target)
--enable_profile=True
cali:
python3 -m ufw.cali.cali_model
--model=$(model)
--input_shapes="[1,384];[1,384];[1,384]"
--net_name=$(name)
--cali_iterations=10
--input_descs="[0,int32,0,28990];[1,int32,0,2];[2,int32,0,2]"
--cali_lmdb="$(squadv1_cali_set)/input_mask,
$(squadv1_cali_set)/input_ids,$(squadv1_cali_set)/segment_ids"
--try_cali_accuracy_opt='-th_method=PERCENTILE99999;
-float_add_sub=false;
-float_after_softmax=false;
-fpfwd_inputs=< 0 >28,< 0 0 >embeddings.1,< 0 0 >input1.1;'
--target=$(target)
--test_iterations=1
--postprocess_and_calc_score_class=none
--debug_cmd="not_call_bmnetu;not_suspend"
time_only_cali:
python3 -m ufw.cali.cali_model
--model=$(model)
--input_shapes="[1,384];[1,384];[1,384]"
--net_name=$(name)
--cali_iterations=1
--input_descs="[0,int32,0,28990];[1,int32,0,2];[2,int32,0,2]"
--cali_lmdb="$(squadv1_cali_set)/input_mask,
$(squadv1_cali_set)/input_ids,$(squadv1_cali_set)/segment_ids"
--try_cali_accuracy_opt='-th_method=PERCENTILE99999;
-float_add_sub=false;
-float_after_softmax=false;
-fpfwd_inputs=< 0 >28,< 0 0 >embeddings.1,< 0 0 >input1.1;'
--target=$(target)
--test_iterations=1
--postprocess_and_calc_score_class=none
--debug_cmd="not_call_bmnetu;not_suspend"
int8_model: $(workdir)/$(name)_bmnetp_deploy_int8_unique_top.prototxt
int8_weight: $(workdir)/$(name)_bmnetp.int8umodel
bmnetu_batch_sizes: [1, 2, 4, 8]
bmnetu_options:
--model $(int8_model)
--weight $(int8_weight)
--target $(target)
--cmp False
--enable_profile True
--descs=[0,int32,0,1],[1,int32,0,1],[2,int32,0,1]
--opt=1
harness:
type: bert
args:
- name: FP32
bmodel: $(workdir)/1b.fp32.compilation/compilation.bmodel
- name: FP16
bmodel: $(workdir)/1b.fp16.compilation/compilation.bmodel
- name: INT8
bmodel: $(workdir)/1b.compilation/compilation.bmodel
val_file: $(root)/dataset/SQuAD/val/dev-v1.1.json
val_count: 10833