macOS 27 Ships a Foundation Model at the Command Line

macOS 27 “Golden Gate” shipped on September 14, 2026, and with it a system binary at /usr/bin/fm — a command-line interface to Apple’s on-device foundation model, pre-installed, always available, and free of API keys, accounts, and per-token costs. Apple has shipped on-device models since 2024 and opened the Foundation Models framework to developers in 2025, but this is the first release where local inference is addressable from a shell prompt on a stock machine — no Xcode project, no download, no signup.
Intermediate

What Ships in macOS 27
The fm tool exposes three main subcommands: respond for one-shot prompts, chat for an interactive session, and schema for defining structured JSON output. By default every invocation runs against the on-device model.
$ fm respond "Provide a basic regex in Swift to parse an email address"
$ fm respond "Provide a comprehensive regex in Swift to parse an email address" --model pcc
$ fm respond "What app is the user using in this screenshot?" --model pcc \
--image Screenshot.png
The --model pcc flag routes the request to Private Cloud Compute instead — a substantially larger server-side model with a 32,000-token context window and configurable reasoning depth, subject to usage limits. The on-device model carries an 8,192-token context window.
Structured output works by generating a schema and passing it back in, which makes the tool usable as a pipeline component rather than a chat toy:
$ fm schema object --name AppsIdentified --string app_names --array > schema.json
$ fm respond "What apps are the user actively using in this screenshot?" \
--image Screenshot.png --model pcc --schema schema.json
# {"app_names": ["Messages", "Mail", "Calendar"]}
Alongside the CLI, Apple published a Python SDK — apple_fm_sdk, requiring Python 3.10+, Xcode, and Apple silicon — mirroring the Swift API including tool calling, streaming, and guided generation. For research scripting rather than app development, that is the more consequential of the two.
The Model Underneath
The third generation of Apple Foundation Models, announced at WWDC in June 2026, is a family of five: AFM 3 Core (a 3-billion-parameter dense on-device model) and AFM 3 Core Advanced (a 20-billion-parameter sparse on-device model) run locally, while AFM 3 Cloud, ADM 3 Cloud for image generation, and AFM 3 Cloud Pro run on Private Cloud Compute. Apple describes the family as “custom-built in collaboration with Google,” built on technologies behind the Gemini models and adapted for Apple hardware.
AFM 3 Core Advanced is the architecturally interesting one. Apple calls it “a novel sparsely activated architecture built on Instruction-Following Pruning (IFP),” a technique from its own research group. Of its 20 billion total parameters, only 1 to 4 billion activate per request depending on the prompt.

The diagram shows how the memory budget is managed. The always-active backbone — attention blocks and shared feed-forward weights — stays resident in DRAM, while the full pool of routed FFN experts lives in NAND flash and is swapped into memory only when the router selects it. The full 20-billion-parameter model never needs to fit in RAM at once. Apple describes the result as “inference-time elasticity,” with a predetermined active-parameter count tuned per use case, and says the models are compressed with quantization-aware training.
It is a recognisable answer to a constraint the field has been circling: flash is plentiful on a laptop and DRAM is not, so spending storage bandwidth to buy effective parameter count is a reasonable trade — provided routing is stable enough to keep the swaps predictable.
How Much Better

Apple’s published human evaluations are side-by-side preference tests against its own 2025 models, not against third-party baselines. On English-language text, raters preferred AFM 3 Core on 38.0 percent of prompts versus 23.0 percent for the 2025 on-device model, with 39.0 percent scored as ties. Gains are larger in non-English locale groups — 43.0 percent versus 26.0 percent for the PFIGSCJK group — and larger again on the server side, where AFM 3 Cloud drew 56.0 percent against 11.0 percent for the 2025 server model in English.
Those are meaningful year-over-year improvements, but they are improvements measured against last year’s Apple models. Readers looking to compare AFM 3 Core against Qwen, Gemma, or Llama at similar sizes will not find that comparison in Apple’s materials.
What This Means
The practical shift is the disappearance of setup cost. Running a local model has until now meant choosing a runtime, picking a quantization, downloading weights, and keeping all three current. On macOS 27, fm respond works immediately and the marginal cost of a token is zero. For classroom use, for scripting, and for the large class of tasks a 3-billion-parameter model handles fine — classification, extraction, summarisation, reformatting — that changes what is worth reaching for.
The constraints are real, though. The 8,192-token on-device context window rules out long-document work without chunking. macOS 27 is Apple-silicon only, having dropped Intel and Rosetta 2 entirely. The weights are not open, not portable, and not inspectable, which makes the framework a poor fit for reproducible research even where the outputs are good enough. And anything routed through --model pcc leaves the machine, whatever the privacy architecture around it.
Worth noting is where the stack actually runs. AFM 3 Cloud Pro, the highest-capability tier, sits on NVIDIA GPUs in Google Cloud under an extended Private Cloud Compute arrangement, and the family as a whole is built on Gemini-derived technology. The on-device tier is genuinely Apple’s and genuinely local; the top of the range is a partnership.
Related Coverage
- Apple Open-Sources Its Foundation Models Framework, Adds Claude and Gemini — the WWDC 2026 announcement that opened the framework to third-party models
- Apple’s A20 Pro Doubles the Neural Engine to 32 Cores — the silicon side of the same push
- Apple’s M5 Ultra Mac Studio: 512GB of Unified Memory for Local AI — Apple’s hardware pitch for running large models locally
- Cactus Releases Needle: A 26M Distilled Model for On-Device Tool Calling — the far smaller end of the on-device spectrum
This post was drafted with AI assistance and reviewed by RITS staff.
Sources
- Introducing the Third Generation of Apple’s Foundation Models — Apple Machine Learning Research
- Build AI-powered scripts with the fm CLI and Python SDK — WWDC26 session 334
- What’s new in the Foundation Models framework — WWDC26 session 241
- Apple’s third-generation Foundation Models explained — 9to5Mac, June 11, 2026
- Apple confirms macOS 27 Golden Gate launch date: September 14 — 9to5Mac, September 9, 2026
- apple/python-apple-fm-sdk — Python SDK repository


沪公网安备31011502017015号