You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The above does static quantization (activations and weights are quantized). Quantizing activations requires calibrating the model on representative data. You can also do weight-only quantization, which does not require calibration data, by specifying the activation_dtype to be torch.float32:
Note that static quantization requires exporting the model for iOS17 or later.
172
+
156
173
See [PyTorch 2 Export Post Training Quantization](https://pytorch.org/tutorials/prototype/pt2e_quant_ptq.html) for more information.
157
174
158
175
----
@@ -204,3 +221,8 @@ This happens because the model is in FP16, but CoreML interprets some of the arg
204
221
raise RuntimeError("BlobWriter not loaded")
205
222
206
223
If you're using Python 3.13, try reducing your python version to Python 3.12. coremltools does not support Python 3.13, see this [issue](https://github.com/apple/coremltools/issues/2487).
224
+
225
+
### At runtime
226
+
1.[ETCoreMLModelCompiler.mm:55][Core ML] Failed to compile model, error = Error Domain=com.apple.mlassetio Code=1 "Failed to parse the model specification. Error: Unable to parse ML Program: at unknown location: Unknown opset 'CoreML7'." UserInfo={NSLocalizedDescription=Failed to par$
227
+
228
+
This means the model requires the the CoreML opset 'CoreML7', which requires running the model on iOS17/macOS14 or later.
0 commit comments