apple /coreai-models
Model export recipes, Python primitives, and Swift runtime utilities for on-device AI
★ 2,347⑂ 264👁 25⑃ 341● 188▤ 2
+0
日增长
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
#387ANE compile failure crashes the app with an MPSGraph assertion instead of returning an error9 comments · 2026-10-27#341Streaming detokenization is O(N²): it re-decodes the whole token sequence every step9 comments · 2026-10-11#406iOS static-shape Qwen3-0.6B export no longer specializes onto the NDX path after the coreai-core 1.0.0b3 / coreai-torch 0.4.3 bump: first token 122 ms → 2.8 s on iPhone6 comments · 2026-11-03#411Model Request: NVIDIA Nemotron-3-Diarization5 comments · 2026-11-04#59Model request: MiniCPM-V 4.6 (compact vision-language model) for macOS and iOS5 comments · 2026-06-20#49Swift package fails to compile for the iOS Simulator (no such module 'CoreAI')5 comments · 2026-06-16#371ModelScope as an alternative model download backend4 comments · 2026-10-23#312[Swift runtime] A failed GPU command buffer is swallowed: the call returns normally and the pipelined engine streams <pad> tokens3 comments · 2026-10-01
Latest release
v1.0.0 1.0.0 2026-10-12Core 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.