shipping-a-model-in-an-ios-applisted
Install: claude install-skill ErtasAI/open-model-skills
# Shipping a model in an iOS app
Before any of this: check whether shipping a model is even the right call. iOS
26 and later ships **Apple Foundation Models**, a roughly 3B on-device model
built into the OS, reachable from Swift with no model to bundle, host, or
update. For a task inside what that model can already do (summarising,
rewriting, extracting structured fields, simple classification), the honest
recommendation is to use it and skip everything below. Shipping a custom model
is the right call when the task needs quality Apple's built-in model does not
reach on its own, needs to run on hardware or an OS version Apple Intelligence
does not cover, or needs to be portable to another platform. See "Or ship
nothing at all" further down before starting the install steps.
## Which artifact shape this needs
Two runtimes cover native Swift, and they take different artifact shapes.
| You are holding | Package | What it eats |
|---|---|---|
| A merged Hugging Face checkpoint, converted with `mlx_lm.convert` | MLX Swift (`mlx-swift-lm`) | MLX-format safetensors |
| A single `.gguf` file | LLM.swift (wraps llama.cpp) | GGUF, self-contained |
**If what you are holding is a merged Hugging Face checkpoint** (`config.json`
+ `model*.safetensors`), it is not directly shippable into either package: MLX
Swift needs it converted to MLX format first, and the GGUF path needs it
converted to GGUF first. Run **inspecting-a-model-bundle** first to confirm
which shape you actually have, th