On-device AI SDKs for Swift and Apple developers
Swift packages, models, sample code and local servers for running AI on Apple hardware, mostly on device with Apple's Foundation Models framework, MLX or Core ML. They cover language models, speech, audio processing and vector search, plus command-line tools and OpenAI- or Ollama-compatible servers for Apple's on-device model. Packages that can also call cloud models are marked.
apfel
Command-line tool, chat mode and local OpenAI-compatible server for the on-device model in Apple's FoundationModels framework. Needs macOS 26 and Apple silicon.
Argmax OSS Swift (WhisperKit)
Argmax's open-source on-device speech toolkit for Apple silicon, and the home of WhisperKit.
MLX Swift Examples
Example apps and code showing how to use MLX Swift.
MLX Swift
Apple's Swift API for MLX, the array and machine-learning framework for Apple silicon.
CoreML-Models
Collection of models converted to Core ML packages, ready to use in iOS and macOS apps.
swift-transformers
Hugging Face's Swift package for tokenisers, model downloads and running models in Swift apps.
speech-swift
Speech toolkit for Apple silicon built on MLX: speech recognition, text-to-speech, voice activity detection and diarisation.
Foundation Models Framework Lab
Sample app and lab for building, testing and evaluating features with Apple's Foundation Models framework.
AnyLanguageModel
Hugging Face's drop-in replacement for Apple's Foundation Models API that also works with other local and cloud model providers.
MLX Swift LM
Run large language and vision-language models on device with MLX Swift.
MLX Audio Swift
Modular Swift SDK for audio processing with MLX on Apple silicon.
SwiftLM
A native Swift inference server for MLX models on Apple silicon, with an OpenAI-compatible HTTP API, SSD expert streaming for large MoE models, KV cache compression, and companion SwiftBuddy apps.
Foundation Models Utilities
Apple's repo of experimental patterns for building with the Foundation Models framework.
Xybrid
A cross-platform on-device AI toolkit, with a Swift package for iOS, that runs speech, language and vision models locally and can optionally fall back to cloud models.
Claude for Foundation Models
Anthropic's Swift package that plugs Claude into Apple's Foundation Models API, so the same session, streaming and tool-calling code can use Claude.
maclocal-api (afm)
The 'afm' CLI and local server that exposes Apple's Foundation Models (and MLX models) through an API.
SVDB
On-device vector database written in Swift, for semantic search inside apps.
CoreML-LLM
A Swift package for running converted large language models on the Apple Neural Engine with Core ML, including Gemma 4, Qwen and other bundles, with text, image, video and audio paths.
afm-Server
Menu bar app that serves Apple's on-device Foundation Models as an OpenAI-compatible local API.
olleh
Ollama-compatible command-line tool for Apple's Foundation Models.
swift-ai-sdk
A Swift port of the Vercel AI SDK. One API for text generation, streaming, structured output and tool calling across dozens of providers, with MCP tool support and middleware. Mostly cloud providers, not on-device.
System One for Apple Foundation Models
Swift package that plugs System One decision models into Apple's Foundation Models framework, so you get typed answers with confidence scores for @Generable types, either on device through Core ML or from hosted backends.
coreai-kit
A Swift package that downloads a Core AI model from a catalogue the author says is tested, caches it and runs it in your app. It has one-line calls for transcribe, summarise, detect and speak, plus chat and a FoundationModels integration. A community package that needs Xcode 27.
kokoro-coreml
A Swift package that runs the Kokoro-82M text-to-speech model on Core ML, across the Neural Engine, GPU and CPU, with a command-line demo and a Swift API. Speed figures are the author's own, and there are no tagged releases yet.
AnyDecisionModel
A Swift package by Mattt for getting typed decisions from a model, such as a probability, a choice or a score, instead of generated text. One interface covers several backends, including MLX, Core AI, Ollama, llama.cpp and Gemini.
preowned
A local HTTP server that puts the models built into macOS behind the OpenAI API, so any OpenAI client can use Foundation Models, Image Playground, NaturalLanguage embeddings, Speech and the system voices on your Mac.
GLiNER2Swift
A Swift package that runs the GLiNER2 and GLiNER2.5 information-extraction models on-device with MLX, covering named entities, classification, structured extraction and relations on Apple silicon.
swift-litert-lm
A Swift package for running Gemma 4 and other LiteRT-LM models on iPhone and Mac, with in-app download, Metal GPU inference, and an optional Apple Foundation Models backend on iOS 27.
Swift Language Models
A Swift package that plugs other providers' models into Apple's Foundation Models API, so OpenRouter and OpenAI models run in the same LanguageModelSession as Apple's on-device model.
Intents
A native macOS workbench for testing Apple's Foundation Models, with repeatable evaluation suites, execution traces, run comparisons, regression cases, resumable batches and an MCP server for coding agents.
ManifoldKit
A Swift package for adding an AI chat product to iOS and macOS apps: a SwiftUI chat view, a turn loop, SwiftData persistence, and local or cloud backends behind one protocol.
OpenJevSwift
A native Swift implementation of OpenJev: a Jev-compatible local HTTP server and Swift libraries for typed decisions on Apple Silicon, with a triage demo app. It is an early release (0.1.0) and is not affiliated with TypeSafe, Google or NVIDIA.
basalt
A pure Swift local LLM server for Apple silicon. It runs MLX models on Metal and serves OpenAI-compatible and Anthropic-compatible HTTP APIs plus MCP stdio, so Claude Code and other agents can use your Mac's GPU.
InferKit
An Objective-C inference toolkit, usable from Swift, that puts Core ML, MLX, Apple's Foundation Models or a remote endpoint behind one protocol, with optional serving to other machines on the network.
SwiftAgents