Apple ships an on-device LLM Starting with macOS 26 (Tahoe), every Apple Silicon Mac includes a language model as part of Apple Intelligence. Apple exposes it through the FoundationModels framework - a Swift API that gives apps access to SystemLanguageModel. All inference runs on the Neural Engine and GPU. No network calls, no cloud, no API keys. The model is just there. But Apple only uses it for Siri Out of the box, the on-device model powers Siri, Writing Tools, and system features. There is no terminal command, no HTTP endpoint, no way to pipe text through it. The FoundationModels framework exists, but you need to write a Swift app to use it. That is what apfel does. What apfel adds apfel is a Swift 6.3 binary that wraps LanguageModelSession and exposes it three ways: as a UNIX command-line tool with stdin/stdout, as an OpenAI-compatible HTTP server (built on Hummingbird), and as an interactive chat with context management. It handles the things Apple's raw API does not: proper exit codes, JSON output, file attachments, five context trimming strategies for the small 4096-token window, real token counting via the SDK, and conversion of OpenAI tool schemas to Apple's native Transcript.ToolDefinition format. hardware Apple Silicon (Neural Engine + GPU) | model Apple's on-device LLM (shipped with macOS) | sdk FoundationModels.framework (Swift API) | apfel CLI + HTTP server + context management | you Terminal, shell scripts, OpenAI SDKs, curl 4,096 tokens Context window (input + output) 1 model Fixed, not configurable Swift 6.3 Strict concurrency, no Xcode MIT license Open source
First seen: 2026-04-03 11:11
Last seen: 2026-04-03 18:15