Changelog¶
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
0.3.0 - 2026-09-25¶
Added¶
Support
ignored_opsincast_fp32_to_fp16andcast_to_16_bit_precisionto allow users to exclude sensitive operations (e.g. operations causing activation-level overflow likeexporsoftplus) from FP16 casting, keeping them in FP32 with appropriate boundary casts.Add training-aware palettization to
KMeansPalettizervia atraining_mode()context manager andstep()method, with aPATSchedule(pat_scheduleon the module config) controlling when palettization activates during a training loop.PalettizationSpecgains atraining_strategy_specfield for selecting pluggable training-time strategies.Added support for torchao 0.18.0.
Added support for PyTorch 2.12 and 2.13.
Graph mode quantization support with Core AI composite ops. Added tests and documentation for usage details.
Add utility to compute analytical bits per weight (BPW) of a prepared eager-mode quantized or palettized model
Support for memory-efficient finalize in graph mode via
finalize(..., mmap_dir=...), previously available only in eager mode. Supported with the Core AI backend only.Support new coreai-torch and coreai-core releases
Changed¶
Replace the coremltools-based 1D k-means used by palettization with a vendored C++ core that is JIT-compiled at runtime via
torch.utils.cpp_extension.coremltoolsis no longer a runtime dependency (it is now an optional dependency, installable via thecoremlextra). This requires a C++ compiler to be available on the host at runtime.Carry the next planned release with a
.dev0suffix onmain(e.g.0.2.2.dev0).make buildstrips the suffix for a clean release andmake build-devbuilds a unique, timestamped dev wheel (0.2.2.dev<timestamp>+<shortsha>). A repo that vendors this one can insert one extra release segment via theCOREAI_OPT_VERSION_EXTENSIONenvironment variable to extend the version scheme.When a weight is incompatible with the configured quantization block size or palettization granularity, the warning now reports the weight’s fully qualified name and shape along with the module name to use in
module_name_configs, instead of only the compression target.Re-cluster palettization centroids from the warmed-up weights when a
PATScheduleenables fake palettization mid-training (enable_fake_palettize > 0).Remove upper bound on torch, torchao. Add untested message for untested versions on coreai-opt
Fixed¶
Fix setting of qscheme and float_range for fixed output range ops.
Fix graph-mode
Quantizerresolving a tied weight’s QAT schedule from a different module than its dtype. A shared fake-quantize module’s owning module is now picked by the same config priority that decides itsdtype, instead of by graph order, so the schedule and dtype for a shared weight always come from one consistent module.Reject per-channel activation quantization on CoreML export
Fix per-channel activation quantization crashing with a shape-mismatch
RuntimeErroron MaxPool/AvgPool/AdaptiveAvgPool layers whose shared observer spans an axis the pool shrinks (e.g. a spatial axis under a stride>1 pool). Axes pooling never touches (batch, channel) keep working as per-channel; only the specific unsafe axis falls back to per-tensor, with a warning explaining why and how to pick a safe axis instead.Fix eager Quantizer.prepare failing on models that call a supported op whose inputs are all scalars or single-element tensors
Ensure
KMeansPalettizer.calibration_modecleans up temporary model checkpoints on failure and preserves caller exceptions without masking. Prevent fake palettization from remaining disabled after calibration abort, and fix sensitivity parameter name resolution for root modules.Finalized models in graph mode no longer contain the unused original full precision weights similar to eager mode
0.2.1 - 2026-07-02¶
Added¶
Support palettization of
ConvTranspose1d/ConvTranspose2d/ConvTranspose3dlayers viaKMeansPalettizerSupport for
EAGERexecution mode in model inspection utility
Fixed¶
Fixed pruning mask
dtypeto match that of the weight being prunedFixes to allow better support for
bfloat16dtypein palettization and quantization
0.2.0 - 2026-06-08¶
Added¶
Initial release of
coreai-opt. See the GitHub Releases page for release notes.