Build the Ollama MLX preview locally on Apple Silicon macOS when you
want to inspect the source, avoid a binary download, or test a preview
tag directly.
Before you start
These instructions build Ollama from the public preview source. They are
intended for Apple Silicon Macs and MLX experimentation. For normal
installation, use the latest signed
preview DMG.
The app-bundle command below performs local ad hoc signing when no
Apple Developer ID is configured. That produces a local test app, not a
notarized redistributable DMG.
1. Install macOS build tools
Install Homebrew from
brew.sh
first if it is not already installed. Homebrew's installer also installs
Apple's command line tools when they are missing.
Then install the build tools and download the Metal toolchain component:
brew install go cmake ninja node
xcodebuild -downloadComponent MetalToolchain
The important requirements are an Apple Silicon macOS environment, Go,
CMake 3.24 or newer, Ninja, Git from Apple's command line tools, npm for
the app UI, and Apple's Metal toolchain.
2. Clone the latest preview tag
Use the immutable preview tag for a reproducible build. The moving
integration branch is useful for following current development, but a
tag records the source state used for a published preview.
git clone \
--branch preview/mlx-0.34.1-20260917 \
https://github.com/pd95/ollama.git
cd ollama
Leave the server running in that terminal. Use another terminal for
ollama run, ollama create --experimental, or
API tests.
4. Build the full app locally
To build dist/Ollama.app, use the Darwin build helper. On
Apple Silicon, the arm64-only build is the practical local path.
./scripts/build_darwin.sh -a arm64 build app
open dist/Ollama.app
When APPLE_IDENTITY is not set, the helper ad hoc signs the
app bundle and removes quarantine metadata so it can launch locally. It
also writes dist/Ollama-darwin.zip and
dist/ollama-darwin.tgz for local inspection.
Developer ID signing and notarized DMG packaging require Apple account
credentials and are separate from this local app build. Do not
redistribute the ad hoc signed app bundle.
5. Create local models
The preview source does not include model weights. Download model
snapshots from their official Hugging Face repositories, accept the
publisher license terms where required, and create local Ollama models.
Follow the model recipes for GPT-OSS, Apertus
1.0, Apertus 1.1 Mini, Apertus 1.5 Omni, and Gemma 4.
Apertus 1.5 users
need to obtain the official
swiss-ai/Apertus-v1.5-8B
snapshot before importing it locally.