Image Classification
LiteRT
LiteRT
vit
vision
File size: 6,790 Bytes
2c83b43
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
{
  "format": "tflite",
  "source": {
    "repo_id": "google/vit-base-patch16-224",
    "revision": "3f49326eb077187dfe1c2a2bb15fbd74e6ab91e3",
    "url": "https://huggingface.co/google/vit-base-patch16-224",
    "license": "apache-2.0"
  },
  "artifacts": [
    {
      "file": "model_fp32.tflite",
      "precision": "fp32",
      "sha256": "34678efe841c83480730c5c62b206bb6e597bc3b0d463ac3691cf698aec2295b",
      "bytes": 346369792,
      "inputs": [
        {
          "name": "g0::pixel_values",
          "shape": [
            1,
            3,
            224,
            224
          ],
          "dtype": "float32",
          "layout": "NCHW"
        }
      ],
      "outputs": [
        {
          "name": "g0::linear_72",
          "shape": [
            1,
            1000
          ],
          "dtype": "float32",
          "semantics": "raw classifier logits"
        }
      ],
      "quantization": null,
      "layer_norm": {
        "operator": "STABLEHLO_COMPOSITE",
        "name": "odml.group_norm",
        "count": 25,
        "decomposition_dtype": "float32",
        "converter_default": true,
        "input_output_dtype": "float32"
      },
      "graph": {
        "main_operators": 346,
        "main_conversion_boundaries": {},
        "dead_operators": 0,
        "unused_constant_tensors": 0
      }
    },
    {
      "file": "model_a16w8.tflite",
      "precision": "a16w8",
      "sha256": "a0021a9b5f70422695639cc7343e8810b703fd6c788fcad4dff806ba4073e5b8",
      "bytes": 91658499,
      "inputs": [
        {
          "name": "g0::pixel_values",
          "shape": [
            1,
            3,
            224,
            224
          ],
          "dtype": "float32",
          "layout": "NCHW"
        }
      ],
      "outputs": [
        {
          "name": "g0::static_linear_72",
          "shape": [
            1,
            1000
          ],
          "dtype": "float32",
          "semantics": "raw classifier logits"
        }
      ],
      "quantization": {
        "quantizer": "torchao",
        "mode": "static",
        "export": "native_affine_transformer_regions",
        "scope": "all_fully_connected_layers_and_transformer_activation_regions",
        "fully_connected_count": 73,
        "activations": {
          "granularity": "per_tensor",
          "fully_connected_dtype": "int16",
          "attention_dtype": "int16",
          "residual_dtype": "int16",
          "layer_norm_interface_dtype": "int16"
        },
        "weights": {
          "dtype": "int8",
          "granularity": "per_output_channel",
          "symmetric": true
        },
        "bias_dtype": "int64",
        "model_input_dtype": "float32",
        "model_output_dtype": "float32",
        "accumulator_guard": {
          "explicit_input_bounds": false,
          "bounded_layers": 0
        },
        "floating_regions": [
          "patch_embedding",
          "public_input_output",
          "layer_norm_fallback_decompositions"
        ],
        "integer_regions": [
          "fully_connected",
          "attention_batch_matmul",
          "residual_add",
          "softmax",
          "gelu",
          "reshape",
          "transpose"
        ]
      },
      "layer_norm": {
        "operator": "STABLEHLO_COMPOSITE",
        "name": "odml.group_norm",
        "count": 25,
        "decomposition_dtype": "float32",
        "converter_default": true,
        "input_output_dtype": "int16"
      },
      "deployment_note": "Primary quantized option for the tested NPUs. No explicit accumulator input clipping; qualify accumulator behavior on other backends. CPU fallback can be slow; tested GPU IR importer lacks INT16 quantization.",
      "graph": {
        "main_operators": 275,
        "main_conversion_boundaries": {
          "float_to_integer": 1,
          "integer_to_float": 1
        },
        "dead_operators": 0,
        "unused_constant_tensors": 0
      }
    },
    {
      "file": "model_a8w8.tflite",
      "precision": "a8w8",
      "sha256": "58a49e8c32a90224cbe13b8ce2eaebfa38eb6ec545cee8736126ec907b4c98d4",
      "bytes": 91335728,
      "inputs": [
        {
          "name": "g0::pixel_values",
          "shape": [
            1,
            3,
            224,
            224
          ],
          "dtype": "float32",
          "layout": "NCHW"
        }
      ],
      "outputs": [
        {
          "name": "g0::static_linear_72",
          "shape": [
            1,
            1000
          ],
          "dtype": "float32",
          "semantics": "raw classifier logits"
        }
      ],
      "quantization": {
        "quantizer": "torchao",
        "mode": "static",
        "export": "native_affine_transformer_regions",
        "scope": "all_fully_connected_layers_and_transformer_activation_regions",
        "fully_connected_count": 73,
        "activations": {
          "granularity": "per_tensor",
          "fully_connected_dtype": "int8",
          "attention_dtype": "int16",
          "residual_dtype": "int16",
          "layer_norm_interface_dtype": "int16"
        },
        "weights": {
          "dtype": "int8",
          "granularity": "per_output_channel",
          "symmetric": true
        },
        "bias_dtype": "int32",
        "model_input_dtype": "float32",
        "model_output_dtype": "float32",
        "floating_regions": [
          "patch_embedding",
          "public_input_output",
          "layer_norm_fallback_decompositions"
        ],
        "integer_regions": [
          "fully_connected",
          "attention_batch_matmul",
          "residual_add",
          "softmax",
          "gelu",
          "reshape",
          "transpose"
        ],
        "accumulator_guard": {
          "explicit_input_bounds": false,
          "bounded_layers": 0
        }
      },
      "layer_norm": {
        "operator": "STABLEHLO_COMPOSITE",
        "name": "odml.group_norm",
        "count": 25,
        "decomposition_dtype": "float32",
        "converter_default": true,
        "input_output_dtype": "int16"
      },
      "deployment_note": "Reference mixed INT8/INT16 model that may suit devices limited to 32-bit integer accumulation in fully connected kernels. Has a substantial accuracy tradeoff and retains INT16 regions; backend support must be verified.",
      "graph": {
        "main_operators": 372,
        "main_conversion_boundaries": {
          "float_to_integer": 1,
          "integer_to_integer": 97,
          "integer_to_float": 1
        },
        "dead_operators": 0,
        "unused_constant_tensors": 0
      }
    }
  ],
  "preprocessing": {
    "config_file": "preprocessor_config.json",
    "library": "transformers",
    "backend": "pil"
  },
  "labels_file": "labels.json",
  "gpu_compat": false
}