coremltools converts trained models from TensorFlow, PyTorch, scikit-learn, XGBoost, and other libraries into Apple’s Core ML format for on-device inference in Xcode apps.
Overview
Core ML Tools is Apple’s Python package for bringing third-party machine learning models into the Core ML ecosystem. It supports conversion, editing, optimization, and validation of Core ML models before integration with iOS and macOS applications.
Converters cover deep learning frameworks as well as classical libraries such as scikit-learn and XGBoost. Documentation describes unified conversion pipelines, quantization, pruning, palettization, and debugging utilities.
On macOS, developers can verify converted models by running predictions through Core ML APIs. The package installs from PyPI, with a separate dev release channel for prerelease builds.
Guides and API references explain how converted models leverage on-device CPU, GPU, and Neural Engine execution while keeping user data local to the device.
Key features
- TensorFlow and PyTorch conversion
- Classical ML converters
- Core ML model optimization
- On-device prediction checks
- MLModel editing utilities
- Quantization and pruning tools
Use cases
- Shipping models in iOS apps
- Compressing models for mobile
- Validating conversions on macOS
- Fine-tuning Core ML graphs