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.
Foundation Models Utilities
Apple's repo of experimental patterns for building with the Foundation Models framework.
maclocal-api (afm)
The 'afm' CLI and local server that exposes Apple's Foundation Models (and MLX models) through an API.
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.
SVDB
On-device vector database written in Swift, for semantic search inside apps.
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.