-
Notifications
You must be signed in to change notification settings - Fork 47
Expand file tree
/
Copy pathptq.json
More file actions
75 lines (75 loc) · 2.64 KB
/
ptq.json
File metadata and controls
75 lines (75 loc) · 2.64 KB
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
{
"input_model": {
"type": "HfModel",
"model_path": "Intel/bert-base-uncased-mrpc",
"task": "text-classification",
"load_kwargs": { "attn_implementation": "eager" }
},
"systems": {
"local_system": {
"type": "LocalSystem",
"accelerators": [
{ "device": "cpu", "execution_providers": [ "CPUExecutionProvider" ] }
]
}
},
"data_configs": [
{
"name": "glue_mrpc",
"type": "HuggingfaceContainer",
"load_dataset_config": { "data_name": "glue", "subset": "mrpc", "split": "validation" },
"pre_process_data_config": { "input_cols": [ "sentence1", "sentence2" ] },
"dataloader_config": { "batch_size": 1 }
}
],
"evaluators": {
"common_evaluator": {
"metrics": [
{
"name": "accuracy",
"type": "accuracy",
"backend": "huggingface_metrics",
"data_config": "glue_mrpc",
"sub_types": [
{ "name": "accuracy", "priority": 1, "goal": { "type": "max-degradation", "value": 0.05 } },
{ "name": "f1" }
]
},
{
"name": "latency",
"type": "latency",
"data_config": "glue_mrpc",
"sub_types": [
{ "name": "avg", "priority": 2, "goal": { "type": "percent-min-improvement", "value": 0.1 } },
{ "name": "max" },
{ "name": "min" }
]
},
{
"name": "throughput",
"type": "throughput",
"data_config": "glue_mrpc",
"sub_types": [ { "name": "avg" }, { "name": "max" }, { "name": "min" } ]
}
]
}
},
"passes": {
"conversion": { "type": "OnnxConversion" },
"transformers_optimization": { "type": "OrtTransformersOptimization" },
"quantization": {
"type": "OnnxQuantization",
"quant_preprocess": true,
"per_channel": false,
"reduce_range": false,
"calibrate_method": "MinMax",
"data_config": "glue_mrpc"
}
},
"search_strategy": { "execution_order": "joint", "sampler": "tpe", "max_samples": 3, "seed": 0 },
"evaluator": "common_evaluator",
"host": "local_system",
"target": "local_system",
"cache_dir": "cache",
"output_dir": "models/ptq_cpu"
}