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

The Apple Foundation Models framework icon: a stylised neural network graph of linked nodes on a white rounded-square tile.
Image credit: Apple Machine Learning Research

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.

Architecture diagram: user input feeds a sparsely-activated LLM. A dense model of alternating attention and FFN blocks sits in DRAM as static weights, while a large grid of FFN experts sits in NAND flash; selected experts are swapped up into the FFN blocks per request.
Image credit: Apple Machine Learning Research

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

Stacked bar chart of human evaluation on text, comparing AFM 3 Core against the 2025 on-device model and AFM 3 Cloud against the 2025 server model, broken out by four locale groups.
Image credit: 9to5Mac, from Apple Machine Learning Research

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

This post was drafted with AI assistance and reviewed by RITS staff.

Sources