apple /coreai-models

Model export recipes, Python primitives, and Swift runtime utilities for on-device AI

★ 2,347⑂ 264👁 25⑃ 341● 188▤ 2
SwiftBSD-3-ClauseCreated 2026-06-08
Download: v1.0.0v1.0.0 ↓1.0.02026-10-12
+0
Daily
2,347
stars
264
forks
25
watchers
341
prs
188
issues
2
releases

README

Core AI Models

Model export recipes, Python primitives, and Swift runtime utilities for building on-device AI with Core AI.

The main components include:
- Model export — Recipes to export popular open source models from Hugging Face and other sources to Core AI format.
- Reusable primitives — Python building blocks for authoring custom Core AI models in PyTorch.
- Runtime utilities — Swift package built on top of Core AI framework to run models on macOS and iOS.
- Skills — Plugins to help coding agents leverage Core AI effectively.

| Directory | What's inside                                                                                |
| --------- | -------------------------------------------------------------------------------------------- |
| models/ | Model catalog with README and export recipes.                                                |
| python/ | Python primitives for authoring and utilities for exporting models. |
| swift/  | Swift package (coreai-models): runtime utilities to integrate Core AI models in your app.  |
| skills/ | Pluggable skills that enable coding agents to leverage Core AI more effectively.             |

 Requirements

If you haven't installed uv, install it by

bash
brew install uv

or
bash
curl -LsSf https://astral.sh/uv/install.sh | sh


Once installed successfully, refer to the README.md for each model or family of models, in models folder for their exporting recipe.

 Requirements (running and app integration)

- macOS and iOS 27.0+

- Xcode 27.0+

Core AI models are exported as standalone .aimodel files for integration into apps via the Core AI framework.

Some models require additional resources. Language models require a tokenizer, for instance, and diffusion models run multiple models in sequence as part of a single pipeline. For these cases, export recipes in this repo produce a resource folder containing one or more .aimodel files alongside any required resources. The Swift package in this repo provides runtime utilities for integrating these into an app.

Command line interface (CLI) tools are also included for running exported models directly on a Mac (requires Xcode 27.0+). See each model's README for available tools and example invocations.

 Explore supported models

Find supported models by

bash
git clone https://github.com/apple/coreai-models.git && cd coreai-models
uv run coreai.model.registry --list-models


Run uv run coreai.model.registry --help for details.

 Agent Skills

This repo includes a plugin with skills to enable coding agents to use Core AI like an expert.

 Available skills

| Skill | Description |
| --- | --- |
| working‑with‑coreai | End-to-end workflow for deploying PyTorch models on Apple silicon, covering export with coreai-torch and running with the Core AI runtime. |
| model‑authoring | Empirical rules for authoring PyTorch models for on-device execution on Apple platforms, covering BC1S layout, op compatibility, KV cache patterns, precision rules, MoE, and common is

Top issues

Latest release

v1.0.0 1.0.0 2026-10-12
Core AI Models 1.0.0

First stable release of Core AI Models: export recipes, Python primitives, and Swift runtime utilities for building on-device AI with Core AI.

Requirements: macOS and iOS 27.0+, Xcode 27.0+.

 Highlights

- Model export: Recipes to export open-source models from Hugging Face and other sources to standalone .aimodel files. Run uv run coreai.model.registry --list-models to see what's supported.
- Compression presets for macOS and iOS:
  - macOS: INT4 weight-only (default), and INT4 with INT8 KV cache.
  - iOS: 4-bit palettization with channel group size 32 or 8.

Snapshot: 2026-11-16T09:23:14Z · Data license Apache-2.0 · JSON