Swift package of LLM modules for the Spezi ecosystem, covering on-device models, OpenAI, and Fog node inference.
apple/coreai-models
Apple's toolkit of model export recipes, PyTorch primitives, and Swift runtime utilities for running AI models on macOS and iOS with Core AI.
- Stars
- 2,286
- Forks
- 253
- Open issues
- 45
- Last commit
- 17 hours ago
What is it?
Core AI Models is a toolkit for getting AI models running on Apple devices through the Core AI framework. It provides recipes that convert popular open source models from Hugging Face and other sources into the Core AI format, producing standalone .aimodel files. For models that need more than one file, such as language models that require a tokenizer or diffusion pipelines that chain several models, the export recipes generate a resource folder that the included Swift package can load.
The repository is organized into four parts: a model catalog with per-model export recipes, Python primitives for authoring custom PyTorch models for Core AI, a Swift package named coreai-models with runtime utilities for macOS and iOS apps, and agent skills that help coding assistants work with Core AI. Command line tools are included for running exported models directly on a Mac. Supported models can be listed with a uv command.
The project targets macOS and iOS 27.0 and later, and requires Xcode 27.0 or later.
Key features
- 01Exports popular open source models from Hugging Face to Core AI .aimodel format.
- 02Provides Python primitives for authoring custom PyTorch models for on-device execution.
- 03Offers a Swift package with runtime utilities for integrating models into macOS and iOS apps.
- 04Includes command line tools for running exported models directly on a Mac.
- 05Ships agent skills for Claude Code, Codex CLI, and Gemini CLI.
Use cases
- Bringing an open source language or diffusion model into an iOS or macOS app on Apple silicon.
- Authoring a custom PyTorch model and exporting it for on-device inference.
- Applying weight quantization or palettization to reduce model size with coreai-opt.
- Letting a coding agent help deploy PyTorch models to Core AI.
Quick start
- 1
Install uv via Homebrew
brew install uv - 2
Clone the repository
git clone https://github.com/apple/coreai-models.git && cd coreai-models - 3
List the supported models from the registry
uv run coreai.model.registry --list-models
Things to know
- Requires macOS and iOS 27.0+ and Xcode 27.0+, so it is platform-specific.
- Targets Apple's Core AI framework, which is tied to recent Apple OS releases.
In collections
Topics
FAQ
- What is coreai-models?
- Apple's toolkit of model export recipes, PyTorch primitives, and Swift runtime utilities for running AI models on macOS and iOS with Core AI. Core AI Models is a toolkit for getting AI models running on Apple devices through the Core AI framework. It provides recipes that convert popular open source models from Hugging Face and other sources into the Core AI format, producing standalone .aimodel files. For models that need more than one file, such as language models that require a tokenizer or diffusion pipelines that chain several models, the export recipes generate a resource folder that the included Swift package can load.
- Is coreai-models free to use? What license does it have?
- coreai-models is open source under the BSD-3-Clause license. Check the license terms before using it in commercial products.
- Is coreai-models still maintained?
- Actively maintained. The last commit to coreai-models was on Nov 6, 2026.
- What can I use coreai-models for?
- Bringing an open source language or diffusion model into an iOS or macOS app on Apple silicon. Authoring a custom PyTorch model and exporting it for on-device inference. Applying weight quantization or palettization to reduce model size with coreai-opt. Letting a coding agent help deploy PyTorch models to Core AI.
- How do I install coreai-models?
- Install uv via Homebrew: brew install uv Clone the repository: git clone https://github.com/apple/coreai-models.git && cd coreai-models List the supported models from the registry: uv run coreai.model.registry --list-models
- Where can I get coreai-models?
- The source code and installation instructions are on GitHub: https://github.com/apple/coreai-models
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
Open source macOS dictation app that turns speech into text with on-device models and optional AI cleanup, a local alternative to Wispr Flow.
A macOS and iOS document chat app that lets you upload files and ask questions, with all AI processing done on-device via Apple Foundation Models.
Pairs an iPhone with a Mac over USB-C so the phone's GPU helps run a Qwen 27B model locally, speeding up prompt reading and extending context.
Ultralytics YOLOv5, a PyTorch-based computer vision toolkit for object detection, instance segmentation and image classification with training and export.
Hugging Face's toolkit for exporting and running Transformers, Diffusers, TIMM and Sentence-Transformers models on specific hardware backends with optimized inference and training.