Sample apps for Apple's Core AI framework (the Core ML successor, WWDC 2026, macOS/iOS 27) — the runnable examples the official repo doesn't ship.
Design rule: one simple app per group of models that share the same handling, built against the unmodified official runtime — so you can read the code and lift it straight into your own app. Models come from Apple's official export recipes.
| Sample | Platform | What it shows |
|---|---|---|
| CoreAIChatMac | macOS | Chat with any exported LLM bundle — streaming, live load/TTFT/tok-s stats, gpt-oss "thinking" parsing |
| CoreAIDecisionFormMac | macOS | Copy an email → a support ticket form fills at once: eight typed decisions (choice / score / yes-no) from one read of the email, clef-flash 9B |
| CoreAISearchiOS | iOS | Search your notes by meaning — Granite-Embedding-97M, 9,859-sentence example library + your own text |
| CoreAIImageGenMac | macOS | Type a prompt → a 1024×1024 image (FLUX.2 klein 4B) or an RGBA sticker with a real alpha (RGBA-Image-2.1-Turbo); the two models share one picker |
| CLIPPhotoSearch | iOS | (design stage — memo) on-device photo semantic search on the ANE |
Measured performance for everything here: apple-silicon-llm-bench · recipe-level knowledge: zoo knowledge base.
No big-RAM Mac for the export? Pre-converted official bundles (hash-stamped, measured) are on HF: mlboydaisuke/*-CoreAI-official — download one and skip to step 2.
# 1. Export a model with Apple's official recipe
git clone https://github.com/apple/coreai-models && cd coreai-models
uv run coreai.llm.export openai/gpt-oss-20b # ~13 GB, ~10 min
# 2. Build & run the app
brew install xcodegen
git clone https://github.com/john-rocky/coreai-samples && cd coreai-samples/CoreAIChatMac
xcodegen generate
open CoreAIChatMac.xcodeproj # Run (scheme is Release)
# 3. In the app: Choose Models Folder… → the exports/ dir → click the modelM4 Max reference numbers: gpt-oss-20b decodes ~78 tok/s, loads in ~2 s warm.
The community zoo's bundles (Qwen3.5, LFM2.5, Granite, Gemma 4) use extended engine features and run in the zoo's own apps, which ship ready-patched — that's the place where zoo models just work, with in-app Hugging Face downloads. This repo stays plain-official so the code stays copy-paste-able into your app.
Three zoo models are the exception, because they run on the unmodified runtime with no
engine patch, so their apps live here: clef-flash (its zoo host ClefFlash, vendored in
CoreAIDecisionFormMac), Granite-Embedding-97M (a plain
.aimodel called through AIModel.run in CoreAISearchiOS) and
RGBA-Image-2.1-Turbo (five .aimodel graphs run one by one through AIModel in
CoreAIImageGenMac).
BSD-3-Clause (same as apple/coreai-models). Model weights keep their upstream licenses.