https://github.com/john-rocky/coreai-samples
Sample apps for Apple's Core AI framework — chat with any exported LLM bundle on macOS, more coming
https://github.com/john-rocky/coreai-samples
apple-silicon coreai gpt-oss llm macos sample-app
Last synced: 19 days ago
JSON representation
Sample apps for Apple's Core AI framework — chat with any exported LLM bundle on macOS, more coming
- Host: GitHub
- URL: https://github.com/john-rocky/coreai-samples
- Owner: john-rocky
- License: other
- Created: 2026-06-11T15:03:34.000Z (29 days ago)
- Default Branch: main
- Last Pushed: 2026-06-11T15:45:18.000Z (29 days ago)
- Last Synced: 2026-06-11T17:25:28.158Z (29 days ago)
- Topics: apple-silicon, coreai, gpt-oss, llm, macos, sample-app
- Language: Swift
- Size: 22.5 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Core AI Samples
**Sample apps for Apple's [Core AI](https://github.com/apple/coreai-models) 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](CoreAIChatMac/) | macOS | Chat with any exported LLM bundle — streaming, live load/TTFT/tok-s stats, gpt-oss "thinking" parsing |
| CLIPPhotoSearch | iOS | *(design stage — [memo](CLIPPhotoSearch-DESIGN.md))* on-device photo semantic search on the ANE |
Measured performance for everything here:
[apple-silicon-llm-bench](https://github.com/john-rocky/apple-silicon-llm-bench) ·
recipe-level knowledge: [zoo knowledge base](https://github.com/john-rocky/coreai-model-zoo/tree/main/knowledge).
## Quick start (CoreAIChatMac + gpt-oss-20b)
> No big-RAM Mac for the export? Pre-converted official bundles (hash-stamped,
> measured) are on HF: [mlboydaisuke/*-CoreAI-official](https://huggingface.co/mlboydaisuke)
> — download one and skip to step 2.
```bash
# 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 model
```
M4 Max reference numbers: gpt-oss-20b decodes ~78 tok/s, loads in ~2 s warm.
## Community zoo models?
The [community zoo](https://github.com/john-rocky/coreai-model-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.
## License
BSD-3-Clause (same as apple/coreai-models). Model weights keep their upstream licenses.