Free Local LLM on a Mac: How to Use Apple's Built-In Model (apfel and fm)

A man in a green jumper typing at a laptop beside a desk lamp and a notebook.

By Annie Vane · Local · Mac · Guide · Docs-only · Checked October 22, 2026

Every command below comes from the apfel documentation on GitHub, Apple's Foundation Models developer documentation and Apple's support pages, checked October 22, 2026.

Yes: every Apple Silicon Mac running macOS 26 Tahoe or later with Apple Intelligence switched on already has a free local LLM, the roughly 3-billion-parameter on-device model behind Apple Intelligence. On macOS 27 you can talk to it in Terminal with Apple's own fm command, and on macOS 26 or 27 the open-source apfel tool, installed 13,783 times through Homebrew in the past year, does the same job and adds an OpenAI-compatible local server. It costs nothing and nothing leaves the Mac, but it is a small model with a 4,096-token limit (8,192 on newer Macs), so treat it as a quick helper rather than a replacement for Ollama. If you want to pick your own, bigger models, start with the Ollama guide instead.

What Apple's built-in model is: the free local LLM on a Mac

Since macOS 26 Tahoe, Apple has shipped a language model inside the operating system as part of Apple Intelligence. It is the model behind Writing Tools and the summaries in Mail and Messages. Apple's Foundation Models framework lets any app on the Mac use the same model, and Apple's developer documentation describes it as "the on-device text foundation model that powers Apple Intelligence".

The apfel website, which turns Apple's built-in model into a free local LLM on a Mac, showing the brew install apfel command and its requirements: Apple silicon, macOS Tahoe, Apple Intelligence
The apfel website with its one-line Homebrew install, October 23, 2026.

It is small by design. Apple's 2025 research report calls the on-device model "a compact, approximately 3-billion-parameter model", compressed to two bits per weight so it fits in memory alongside everything else you are running. In June 2026 Apple introduced a third generation: AFM 3 Core, "the next generation of our 3-billion-parameter dense model", and AFM 3 Core Advanced, a 20-billion-parameter sparse model that activates only one to four billion parameters per request. The Advanced model only runs on Macs with an M3 or later chip and at least 12GB of memory, on macOS 27. Either way the model is already on your disk: it downloaded when you turned Apple Intelligence on.

Now the viral post. On October 21, 2026 Alex Choi wrote on X "wtf i just discovered that a macbook comes with a free local LLM in your terminal", and when I checked on October 22 it had been viewed 1,061,138 times. The claim is broadly true, with two corrections. The screenshot shows Apple's own fm command, which only exists on macOS 27, not a third-party tool. And it is not only MacBooks: any Mac with Apple Silicon qualifies, while no Intel Mac does.

What apfel does, and what Apple's fm command does

apfel is an open-source command-line tool written in Swift by Franz Enzenhofer, released under the MIT license with the tagline "The free AI already on your Mac". It lives on GitHub under Arthur-Ficial, which apfel's website describes as a co-maintainer and "an OpenClaw instance running on Anthropic's Claude Opus".

apfel wraps Apple's Foundation Models framework so you can use the on-device model in three ways: as a UNIX tool that takes a prompt, piped text or attached files (including PDFs and images); as an interactive chat; and as a local OpenAI-compatible server. The current version in Homebrew is 1.20.0, as checked on November 29, 2026.

apfel came first, in late March 2026, when it was the only way to use Apple's model from a terminal. Apple then announced its own command, fm, at WWDC in June 2026 and shipped it pre-installed with macOS 27 in September. fm has seven commands: available, chat, count-tokens, license, respond, schema and serve. Both tools call the same model through the same framework, so as apfel's own comparison page puts it, "Neither is smarter".

On macOS 26, apfel is the only option, because fm does not exist there. On macOS 27, if you just want to type a prompt once, fm needs nothing installed. If you want a server that other apps can treat as an OpenAI endpoint, MCP tool servers, JSON output for scripts or exit codes that mean something, apfel is the better fit, and the sections below focus on it.

Does your Mac qualify?

Apple's developer documentation says the model is available only when "the device and region supports Apple Intelligence". In practice you need all of the following.

  • An Apple Silicon Mac (M1 or later). Apple lists "Mac with M1 or later" and the MacBook Neo with the A18 Pro chip. Intel Macs are not eligible and there is no workaround.
  • macOS 26 Tahoe or later for apfel. Apple's fm command needs macOS 27, which Apple calls Golden Gate.
  • Apple Intelligence switched on in System Settings under Apple Intelligence & Siri. Apple requires your device language and Siri language to be set to the same supported language. For what the rebuilt assistant can do, see Siri AI in the UK.
  • A supported language. Apple's list is English, Danish, Dutch, French, German, Italian, Norwegian, Portuguese, Spanish, Swedish, Turkish, Vietnamese, Chinese (simplified and traditional), Japanese and Korean. English is listed without regional variants, so English (UK) qualifies.
  • A supported region. Apple's page says features are available "in most regions around the world" and only names China mainland as blocked. The UK is not excluded, and Apple says Apple Intelligence keeps working when you travel.
  • Free storage: Apple says up to 8GB for most Macs, up to 14GB for M3 or later with 12GB or more of memory.

Your hardware also decides the context window. On macOS 26, and on any M1 or M2 Mac, it is 4,096 tokens. On macOS 27 with an M3 or later chip and at least 12GB of memory, the larger AFM 3 Core Advanced model gives you 8,192 tokens, which is what the "8,192" in the viral screenshot shows. apfel reads the real figure from the framework at run time, so apfel --model-info will tell you which you have. If you turned Apple Intelligence on recently, Apple warns that "it can take some time for the model to download and become available", so keep the Mac on power and Wi-Fi and try again in a few minutes.

Install and first run

You need Homebrew, the Mac package manager, installed first. apfel is in Homebrew's main collection, so a single command installs it with no build tools required:

brew install apfel

The developer's own tap gets new releases the same day and adds eight demo commands such as apfel-cmd, which turns plain English into a shell command:

brew install Arthur-Ficial/tap/apfel

Check that it can see the model. The second command prints whether the model is available, the context window and the supported languages, and if it says "available: no" it tells you which of Apple's three reasons applies.

apfel --version
apfel --model-info

Then ask it something. These are the examples from the apfel README: a single prompt, piped text, an attached PDF and an interactive chat (Ctrl-C to leave).

apfel "What is the capital of Austria?"
echo "Summarize: $(cat README.md)" | apfel
apfel -f report.pdf "Summarize the key findings"
apfel --chat

Two small habits save frustration. In zsh, put a prompt containing an exclamation mark in single quotes, because the shell otherwise treats it as history expansion. And if a harmless request comes back with "[guardrail]" and exit code 3, add --permissive (more on that below). To update later, run brew upgrade apfel.

On macOS 27 you can try Apple's fm command without installing anything. It asks you to accept Apple's legal notice once, then works the same way. The example prompts below are the ones fm prints in its own help screen.

sudo fm license
fm available
fm chat
fm respond 'What is Swift?'
fm count-tokens 'Hello world'

What it is good for, and what it is not

Apple is unusually candid about this in its developer guide. The on-device model is meant for summarizing, extracting entities such as people and places, understanding text, refining or editing text, classifying text, short creative writing, generating tags and game dialogue. Apple's list of "capabilities to avoid" is basic math ("How many b's are there in bagel?"), creating code and logical reasoning. If your plan was a free coding assistant, this is not it.

The context window is the limit you will hit first. Apple's documentation says 4,096 tokens per session "includes instructions, prompts, and outputs", and that a token is "approximately three to four characters" in English. That works out at roughly 12,000 to 16,000 characters, a few thousand words, shared between what you send and what comes back. A long PDF will not fit. apfel returns exit code 4 for a context overflow, and you can check the cost before sending with apfel --count-tokens:

apfel --count-tokens -f README.md "Summarize this"

Guardrails are the second surprise. Apple's framework checks both your prompt and the model's output against safety rules, and Apple's own guidance admits the model "may refuse to discuss sensitive subjects". apfel's documentation records benign prompts being blocked: in its test, "Describe the color red to someone who has never seen any color" was refused by default and answered with --permissive. Guardrail behavior also shifts between macOS releases; apfel notes that the model in macOS 26.5.2 refuses more often than the one in 26.3.1. The permissive flag reduces false positives but cannot remove refusals the model itself produces.

Three more things to know. The model does not know today's date, has no access to the web or a clock, and Apple has not published its training cut-off; when asked, it invents a different date each time. apfel's workaround is to put the date in a system prompt with the -s flag. There are no embeddings, so you cannot build a search index with it. And image understanding only reaches the model on macOS 27; on macOS 26 apfel runs images and PDFs through Apple's Vision OCR and passes the text instead.

Speed is good for a model this size: apfel's own measurements on an M2 MacBook Air, with the model warm, gave 0.35 seconds for a one-word answer and under a second for a haiku.

Using it as a local API for other apps

Serving other apps through a local API is where apfel earns its place over fm. Run apfel --serve and you get an OpenAI-compatible server at http://localhost:11434/v1 with a single model called apple-foundationmodel. It supports the chat completions endpoint, the newer Responses endpoint, streaming, tool calling, JSON schema output and the usual temperature, top_p, max_tokens and seed parameters. apfel's documentation says it has been verified with the OpenAI Python and Node SDKs, Zed, opencode, VS Code Copilot, Continue and Open WebUI.

apfel --serve

To test it from a second Terminal window, this is the curl example from the README:

curl http://localhost:11434/v1/chat/completions \
  -H "Content-Type: application/json" \
  -d '{"model":"apple-foundationmodel","messages":[{"role":"user","content":"Hello"}]}'

To keep it running in the background and restart it at login, use Homebrew services, exactly as you would with Ollama:

brew services start apfel
brew services stop apfel

One clash to watch for: apfel's default port is 11434, and Ollama's documentation says it also "binds 127.0.0.1 port 11434 by default". If both are running, whichever starts second will fail to bind. Either run one at a time, or move apfel to another port with the --port flag or, for the background service, the APFEL_PORT variable:

APFEL_PORT=8080 brew services start apfel

If you see "could not connect" errors after that, the Ollama troubleshooting page covers port 11434 in detail. For a chat window on top of the server, our Open WebUI review explains how to point it at any OpenAI-compatible endpoint.

Security defaults are sensible. The server listens on 127.0.0.1 only, rejects browser requests from foreign origins, and supports a bearer token with --token; apfel's documentation says never to expose it to the network without one. Apple's fm serve also starts a chat completions server, on port 1976, but independent testers report it has no authentication, streams by default even when a client did not ask, and lacks tool calling, so for connecting real apps apfel is the one to use.

Do not expect it to drive a coding agent, though: Apple advises against using the model for code and reasoning. For a local model behind Claude Code, use a larger model through Ollama, as covered in Claude Code with Ollama.

Apfel vs Ollama: which to use

apfel and Ollama solve different problems. apfel gives you one small model that Apple has already put on your Mac; Ollama lets you download and run almost any open model and choose the size that fits your memory. Here is how they compare as of October 22, 2026.

Areaapfel (Apple's on-device model)Ollama
Model choiceOne fixed model, about 3B parameters (20B sparse on M3 or later with 12GB+, macOS 27)Thousands of open models, from under 1B to hundreds of billions of parameters
Extra downloadNone; the model arrived with Apple IntelligenceEach model is a separate download, usually several GB
Context window4,096 or 8,192 tokens, fixed by Apple4,096 tokens by default, changeable with OLLAMA_CONTEXT_LENGTH or num_ctx
RequirementsApple Silicon, macOS 26 or later, Apple Intelligence onmacOS, Windows or Linux
Local APIOpenAI-compatible, port 11434 by defaultOllama API plus OpenAI-compatible endpoints, port 11434 by default
Coding and reasoningApple advises against bothDepends on the model you choose; strong options exist
LanguagesThe sixteen Apple Intelligence languagesDepends on the model
LicenseMIT, open sourceMIT, open source
PriceFreeFree (optional paid cloud models)
Best forQuick summaries, rewrites, classification and tagging from a shell script, especially on an 8GB Mac or one short of disk spaceCode, math, multi-step reasoning, long documents, embeddings and languages outside Apple's sixteen

Use apfel, or fm, when you want quick summaries, rewrites, classification or tagging from a shell script, when you have no disk space to spare, or when you have an 8GB Mac that struggles with anything bigger. Apple sized its model to coexist with your other apps, which a 7B model through Ollama does not do on an 8GB machine; our local LLM memory calculator shows what your Mac can actually hold.

Use Ollama when the job involves code, math, multi-step reasoning, long documents, a language outside Apple's sixteen, embeddings for search, or simply a better model than Apple's. The Ollama models list ranks the most downloaded models by which Macs run them, and the Ollama commands cheat sheet gets you from install to first answer. Nothing stops you running both, as long as they do not fight over port 11434.

Privacy

With apfel, nothing leaves the Mac. Apple's Foundation Models framework runs the model on the device, and apfel describes itself as "100% on-device. No API keys, no cloud". Its comparison page states it has no telemetry, makes no network connection except the explicit --update check through Homebrew, and never uses Apple's Private Cloud Compute "by principle". Because it is open source, anyone can check that claim in the code.

Apple's fm command is on-device by default too: Apple's WWDC session says "By default, it uses the on-device model that comes with macOS, and that's always available". Apple also showed a Private Cloud Compute option for bigger jobs, which has usage limits and sends the request to Apple's servers under the guarantees described in our private AI on iPhone guide. As of October 22, 2026 independent testers report the shipped macOS 27.0.1 build only lists the on-device model, so check fm available on your own Mac.

For UK readers handling client or personal data, that makes the on-device model one of the simplest private AI setups there is: no processor, no transfer, no account. The local server is only private while it stays on 127.0.0.1. The wider picture, including how this compares with ChatGPT, is in the private AI guide.

Frequently asked questions

Is the free local LLM on a Mac really free?

Yes. Apple's on-device model is part of Apple Intelligence, which comes with macOS at no charge, and apfel is open source under the MIT license with no paid tier. The only thing Apple has said it may charge for in future is expanded access to its server-side features, which the on-device model does not use.

Does a MacBook really come with an LLM in Terminal?

Only on macOS 27, where Apple's fm command is pre-installed. On macOS 26 the model is on your Mac but there is no built-in command for it, so you install apfel with Homebrew. Either way it needs an Apple Silicon Mac with Apple Intelligence switched on, and it applies to every Apple Silicon Mac, not just MacBooks.

Which Macs can run Apple's on-device model?

Any Mac with an M1 chip or later, plus the MacBook Neo with the A18 Pro, running macOS 26 Tahoe or later with Apple Intelligence enabled. Intel Macs are not eligible. Macs with an M3 or later chip and at least 12GB of memory on macOS 27 get Apple's larger model with an 8,192-token window instead of 4,096.

Does apfel work with UK English and in the UK?

Yes. English is on Apple's list of supported Apple Intelligence languages without any regional restriction, and the UK is not an excluded region; Apple only names China mainland as blocked. Set your Mac's device language and Siri language to the same English setting and apfel will see the model.

How big is Apple's on-device model?

Apple describes it as approximately 3 billion parameters, compressed to two bits per weight. The third generation announced in June 2026 keeps a 3-billion-parameter dense model (AFM 3 Core) and adds a 20-billion-parameter sparse model (AFM 3 Core Advanced) that activates one to four billion parameters per request, available on M3 or later Macs with 12GB or more of memory on macOS 27.

Why does apfel say my prompt was blocked by guardrails?

Apple's framework checks every prompt and response against its safety rules, and it sometimes blocks harmless requests, particularly creative writing, long mixed-topic prompts and non-English text. apfel returns exit code 3 when that happens. Re-run the command with the --permissive flag, which asks Apple for its relaxed guardrail setting, or rephrase the prompt.

Can apfel replace Ollama?

Not for most people. apfel gives you one small model that Apple advises against using for code, math or reasoning, with a 4,096 or 8,192-token window. Ollama lets you choose from thousands of models of any size and set your own context length. apfel is the better choice for quick summaries and text clean-up on a Mac with little memory; Ollama is the better choice for everything heavier.

Does apfel clash with Ollama on port 11434?

Yes, both listen on 127.0.0.1 port 11434 by default, so whichever starts second cannot bind. Run one at a time, or start apfel on a different port using the --port flag or the APFEL_PORT environment variable, then point your apps at the new address.

Sources

This page is reviewed monthly and was last checked on October 22, 2026. Your next step: on a Mac with Apple Intelligence switched on, run brew install apfel and ask it one question.

Spotted a mistake? Tell us

Annie Vane, author of Local AI Scout

ABOUT THE AUTHOR

Annie Vane

Annie edits Local AI Scout and tests the models she covers on her own 24 GB M5 MacBook Air. She has worked in search, affiliate marketing and digital publishing for national newspapers and magazine groups.

More about Annie and how we test

Keep exploring: Apps · Models · All guides

Good finds.
Less noise.

The Scout Letter: new guides, app reviews and "Can I run it?" checks on new models, in one short email every two weeks. No spam.

Free to join. Unsubscribe with one click.