msluszniak commited on
Commit
2a331e3
·
verified ·
1 Parent(s): c70608c

Core ML: drop the fp32 variant, fp16 is equivalent in task terms

Browse files

fp32 is both slower and larger than fp16 on device, and the ANE will not accept fp32 at all, so an fp32 Core ML build is structurally excluded from the accelerator that makes Core ML worth using.

Equivalence was gated with a task metric rather than raw tensor distance: pixel argmax agreement 99.88% across 8 real images. Raw relative L2 on logits reads ~1% for the segmentation models, but that is logit noise which does not change the predicted class per pixel.

Models where fp16 and fp32 genuinely diverge (ssdlite320 86% box agreement, fast-sam 93%) keep both variants.

v0.9.0 and below are untouched.

coreml/config.json CHANGED
@@ -106,105 +106,6 @@
106
  ]
107
  }
108
  }
109
- },
110
- {
111
- "file": "deeplab_v3_mobilenet_v3_large_coreml_fp32.pte",
112
- "precision": "fp32",
113
- "quantized": false,
114
- "default": false,
115
- "size": "mobilenet_v3_large",
116
- "methods": {
117
- "forward": {
118
- "inputs": [
119
- {
120
- "shape": [
121
- 1,
122
- 3,
123
- 520,
124
- 520
125
- ],
126
- "dtype": "float32"
127
- }
128
- ],
129
- "outputs": [
130
- {
131
- "shape": [
132
- 1,
133
- 21,
134
- 520,
135
- 520
136
- ],
137
- "dtype": "float32"
138
- }
139
- ]
140
- }
141
- }
142
- },
143
- {
144
- "file": "deeplab_v3_resnet50_coreml_fp32.pte",
145
- "precision": "fp32",
146
- "quantized": false,
147
- "default": false,
148
- "size": "resnet50",
149
- "methods": {
150
- "forward": {
151
- "inputs": [
152
- {
153
- "shape": [
154
- 1,
155
- 3,
156
- 520,
157
- 520
158
- ],
159
- "dtype": "float32"
160
- }
161
- ],
162
- "outputs": [
163
- {
164
- "shape": [
165
- 1,
166
- 21,
167
- 520,
168
- 520
169
- ],
170
- "dtype": "float32"
171
- }
172
- ]
173
- }
174
- }
175
- },
176
- {
177
- "file": "deeplab_v3_resnet101_coreml_fp32.pte",
178
- "precision": "fp32",
179
- "quantized": false,
180
- "default": false,
181
- "size": "resnet101",
182
- "methods": {
183
- "forward": {
184
- "inputs": [
185
- {
186
- "shape": [
187
- 1,
188
- 3,
189
- 520,
190
- 520
191
- ],
192
- "dtype": "float32"
193
- }
194
- ],
195
- "outputs": [
196
- {
197
- "shape": [
198
- 1,
199
- 21,
200
- 520,
201
- 520
202
- ],
203
- "dtype": "float32"
204
- }
205
- ]
206
- }
207
- }
208
  }
209
  ]
210
  }
 
106
  ]
107
  }
108
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
109
  }
110
  ]
111
  }
coreml/deeplab_v3_mobilenet_v3_large_coreml_fp32.pte DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:1a20b5f28dc0fbdd17f078520f15ab32cbfe2497b21a63cf2df06cdac0c29c8c
3
- size 44528522
 
 
 
 
coreml/deeplab_v3_resnet101_coreml_fp32.pte DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:d80c27075fc7d7a2414db0fb51df7854b417aced0f234b574353e1b95a439066
3
- size 234966119
 
 
 
 
coreml/deeplab_v3_resnet50_coreml_fp32.pte DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:c87bb21adf01f4b7b009d409ecec8c52eda1c36fd58d09aac199466175fc6d26
3
- size 158806998