Apple's bridge from PyTorch to your iPhone's Neural Engine
A Python toolkit that converts trained models from TensorFlow, PyTorch, and scikit-learn into Apple's Core ML format for on-device inference.

What it does
coremltools is Apple’s official Python package for translating machine learning models from popular training frameworks into Core ML, the format that runs on iOS, macOS, watchOS, and tvOS. It handles TensorFlow 1.x and 2.x, PyTorch, plus non-neural frameworks like scikit-learn, XGBoost, and LibSVM. After conversion, models integrate directly into Xcode projects.
The interesting bit
The pitch is privacy-through-hardware: once converted, models execute entirely on-device using Apple’s CPU, GPU, and Neural Engine, with no network round-trips. The toolkit also lets you read, write, and optimize Core ML models directly, plus verify conversions by running predictions on macOS.
Key highlights
- Converts from PyTorch, TensorFlow 1.x/2.x, scikit-learn, XGBoost, and LibSVM
- Supports model optimization and in-place editing of Core ML files
- Includes on-macOS verification: run predictions to sanity-check conversions
- Output plugs straight into Xcode for iOS/macOS app integration
- Runs inference fully offline, which Apple frames as a privacy feature
Caveats
- Prediction verification requires macOS; Linux and Windows users can convert but not easily test
- The README doesn’t specify which PyTorch or TensorFlow versions are currently supported, so check release notes before assuming compatibility
Verdict
Worth a look if you’re shipping ML to Apple devices and need to escape the cloud-inference tax. Skip it if you’re not in the Apple ecosystem or need training, not deployment.
Frequently asked
- What is apple/coremltools?
- A Python toolkit that converts trained models from TensorFlow, PyTorch, and scikit-learn into Apple's Core ML format for on-device inference.
- Is coremltools open source?
- Yes — apple/coremltools is open source, released under the BSD-3-Clause license.
- What language is coremltools written in?
- apple/coremltools is primarily written in Python.
- How popular is coremltools?
- apple/coremltools has 5.4k stars on GitHub.
- Where can I find coremltools?
- apple/coremltools is on GitHub at https://github.com/apple/coremltools.