File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed
example/auto_compression/nlp Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -206,8 +206,27 @@ QuantPost:
206206
207207## 5. 预测部署
208208
209+
209210量化模型在GPU上可以使用TensorRT进行加速,在CPU上可以使用MKLDNN进行加速。
210211
212+ 以下字段用于配置预测参数:
213+
214+ | 参数名 | 含义 |
215+ |:------:|:------:|
216+ | model_path | inference 模型文件所在目录,该目录下需要有文件 model.pdmodel 和 model.pdiparams 两个文件 |
217+ | model_filename | 模型文件的名称,默认值为inference.pdmodel |
218+ | params_filename | 参数文件的名称,默认值为inference.pdiparams |
219+ | task_name | 要执行的任务名称,默认值为afqmc |
220+ | dataset | 模型使用的数据集,默认值为clue |
221+ | device | 用于推理的设备,默认为gpu,可选cpu或gpu |
222+ | batch_size | 推理时的batch size,默认为32 |
223+ | max_seq_len | 输入序列在分词后的最大长度,默认值为128,如果序列长于此值,将会被截断;如果短于此值,将会被填充|
224+ | perf_warmup_steps | 性能测试的预热步数,默认值为20 |
225+ | use_trt | 一个标志(flag),用于决定是否使用TensorRT推理 |
226+ | precision | 推理精度,默认为fp32,可选fp16或int8 |
227+ | use_mkldnn | 一个标志(flag),用于决定是否使用MKLDNN推理 |
228+ | cpu_threads | CPU线程数,默认为1 |
229+
211230
212231- TensorRT预测:
213232
You can’t perform that action at this time.
0 commit comments