Repository navigation
coreai-opt v0.4.0
This release pins coreai-torch==0.4.3 and coreai-core==1.0.0b3
- Support for Python 3.14.
- In addition to the Core AI, and Core ML backends in the
finalizeAPI, added a 3rd one:ExportBackend.Torchwhich performs “folding of weights” to allow for inference to happen similar to an uncompressed weight model. - Added
state_dictflag to theprepareAPI, in all optimizers, to allow for loading pre-quantized weights and skip the expensive step of re-compression. Can be combined withExportBackend.Torchto do accuracy evals on the torch model with similar inference speed as the uncompressed model, and then re-prepare the model quickly with the same config, to then finalize and export to Core AI. - Vector k-means (palettization with
cluster_dim> 1) is now much faster on both CPU and CUDA backends. - Support for more dtypes in quantization (MXINT8, INT6, UINT6)
- A new
[sparsity_detection_threshold](https://apple.github.io/coreai-optimization/palettization/config.html#palettizing-already-sparse-weights)option inPalettizationSpec: if the weights are already sparse, this flag will cause the palettization to be applied only to the non-zero values, and during finalize/export to Core AI/ Core ML, both palettization and sparsity ops will be used to efficiently pack the weights to minimize disk usage and enable faster runtime on applicable delegates. - Dynamic activation range calibration for FP16 casting:
cast_fp32_to_fp16andcast_to_16_bit_precisionaccept an optionalcalibration_data. Activations that exceed the float16 range (> 65,504 or NaN/Inf) during calibration are kept in FP32 along with their downstream consumers
Special thanks to our external contributors: