apple/coreai-models

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

What it solves

This project provides the necessary tools to bridge the gap between training AI models in PyTorch and deploying them efficiently on Apple silicon devices. It simplifies the process of converting, optimizing, and running models on macOS and iOS using the Core AI framework.

How it works

It provides a three-part ecosystem:

  1. Export Recipes: Scripts to convert popular open-source models (like those from Hugging Face) into the .aimodel format.
  2. Python Primitives: Building blocks for developers to author custom models in PyTorch that are compatible with Apple's hardware.
  3. Swift Runtime: A package that allows developers to integrate these exported models directly into their Swift-based applications.

Additionally, it includes "Skills"—plugins for coding agents (like Claude Code or Codex) that provide expert guidance on model authoring, compression, and deployment workflows.

Who it’s for

This is for developers and machine learning engineers who want to build high-performance, on-device AI applications for Apple platforms using PyTorch models.

Highlights

  • Model Catalog: Includes ready-to-use export recipes for various open-source models.
  • Agentic Skills: Provides plugins for coding agents to help automate model authoring and compression tasks.
  • Native Integration: Includes a Swift package for seamless runtime execution on macOS and iOS.
  • Optimization Tools: Offers utilities for exploring weight compression, quantization, and palettization to ensure models run efficiently on-device.

Related

  • Project
  • Project
  • Dispatch
  • Project
  • Project