-
Notifications
You must be signed in to change notification settings - Fork 47
Expand file tree
/
Copy pathopenai_clip_ov.json
More file actions
127 lines (127 loc) · 3.9 KB
/
openai_clip_ov.json
File metadata and controls
127 lines (127 loc) · 3.9 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
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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
{
"input_model": {
"type": "HfModel",
"model_path": "openai/clip-vit-large-patch14"
},
"systems": {
"local_system": {
"type": "LocalSystem",
"accelerators": [
{
"device": "npu",
"execution_providers": [
"OpenVINOExecutionProvider"
]
}
]
}
},
"data_configs": [
{
"name": "quantize_data_config",
"user_script": "openai_clip_ov.py",
"load_dataset_config": {
"type": "conceptual_captions_dataset",
"data_name": "google-research-datasets/conceptual_captions",
"model_path": "openai/clip-vit-large-patch14"
},
"dataloader_config": {
"batch_size": 1,
"drop_last": true
}
},
{
"name": "metric_data_config",
"user_script": "user_script.py",
"load_dataset_config": {
"type": "clip_dataset",
"model_name": "openai/clip-vit-large-patch14",
"dataset_name": "nlphuji/flickr30k",
"start": 10,
"length": 10
},
"dataloader_config": { "type": "no_auto_batch_dataloader" },
"post_process_data_config": { "type": "clip_post_process" }
}
],
"evaluators": {
"common_evaluator": {
"metrics": [
{
"name": "accuracy",
"type": "accuracy",
"backend": "huggingface_metrics",
"data_config": "metric_data_config",
"sub_types": [
{ "name": "accuracy", "priority": 1, "goal": { "type": "max-degradation", "value": 0.05 } }
]
},
{
"name": "latency",
"type": "latency",
"sub_types": [
{ "name": "avg", "priority": 2, "metric_config": { "warmup_num": 20, "repeat_test_num": 100 } },
{ "name": "p90", "metric_config": { "warmup_num": 20, "repeat_test_num": 100 } }
]
}
]
}
},
"passes": {
"optimum_convert": {
"type": "OpenVINOOptimumConversion",
"extra_args": {
"device": "npu"
}
},
"ov_quantize": {
"type": "OpenVINOQuantization",
"target_device": "npu",
"data_config": "quantize_data_config",
"model_type": "TRANSFORMER",
"user_script": "openai_clip_ov.py",
"transform_fn": "custom_transform_func",
"extra_configs": [
{
"advanced_quantization_parameters": {
"smooth_quant_alpha": 0.6
}
}
],
"reuse_cache": true
},
"io_update": {
"type": "OpenVINOIoUpdate",
"input_shapes": [
[
10,
77
],
[
1,
3,
224,
224
],
[
10,
77
]
],
"static": true,
"reuse_cache": true
},
"encapsulation": {
"type": "OpenVINOEncapsulation",
"target_device": "npu",
"ov_version": "2025.1",
"reuse_cache": true
}
},
"search_strategy": false,
"target": "local_system",
"cache_dir": "cache",
"evaluator": "common_evaluator",
"evaluate_input_model": false,
"output_dir": "model/clip_vit_large_patch14_context_ov_static"
}