Convert a trained PyTorch image classifier to run fully offline on an iPhone without sending data to a server.
Optimize an existing Core ML model to run faster on the iPhone Neural Engine.
Verify that a converted Core ML model produces the same predictions as the original PyTorch model.
Add on-device AI to a Mac app by converting a scikit-learn or XGBoost model to Core ML format.
| apple/coremltools | karpathy/build-nanogpt | facebookresearch/sapiens | |
|---|---|---|---|
| Stars | 5,271 | 5,305 | 5,393 |
| Language | Python | Python | Python |
| Last pushed | — | 2024-08-13 | 2026-05-26 |
| Maintenance | — | Stale | Maintained |
| Setup difficulty | moderate | moderate | hard |
| Complexity | 3/5 | 3/5 | 4/5 |
| Audience | developer | developer | researcher |
Figures from each repo's GitHub metadata at analysis time.
Requires Xcode and an Apple developer account to deploy converted models to iOS or macOS apps.
This is Apple's official Python library for converting machine learning models into the Core ML format, which is the format Apple devices use to run AI models in apps. If you have trained a model using a popular framework like PyTorch, TensorFlow, scikit-learn, or XGBoost, you can use this library to convert it into a form that an iPhone, iPad, or Mac application can use directly. Core ML is Apple's system for running on-device AI. Instead of sending data to a remote server for processing, Core ML runs the model locally on the device using its CPU, GPU, or Neural Engine. This keeps user data private, reduces power consumption, and avoids the need for a network connection. Beyond conversion, the library also lets you read, edit, and optimize existing Core ML model files, and verify that a converted model produces correct results. Once you have a converted model, you bring it into Xcode, Apple's app development tool, to integrate it into your application. The library supports converting from TensorFlow 1 and 2, PyTorch, scikit-learn, XGBoost, and LibSVM. Installation is through pip, the standard Python package tool. The project is maintained by Apple and includes guides, API documentation, and a specification for the Core ML file format.
Apple's official Python library for converting AI models trained in PyTorch, TensorFlow, or scikit-learn into Core ML format so they run on-device in iPhone, iPad, and Mac apps without a server.
Mainly Python. The stack also includes Python, PyTorch, TensorFlow.
Use freely for any purpose including commercial apps under Apple's BSD-style license, as long as you keep the copyright notice.
Setup difficulty is rated moderate, with roughly 30min to a first successful run.
Mainly developer.
This repo across BitVibe Labs
Verify against the repo before relying on details.