New Tool Radar

Local AI

How to Run a llama.cpp Model with Metal on a Mac

Use a macOS llama.cpp build with Metal support so the model runs on the Apple Silicon GPU instead of the CPU.

Schematic diagram with three steps: get a macOS llama.cpp build, run the model with GPU layers on, and check the model uses the GPU.

On an Apple Silicon Mac the GPU is part of the chip, and llama.cpp can use it through Metal — Apple’s graphics framework — instead of grinding through the CPU. The practical point is that you usually do not have to do anything special: the macOS builds of llama.cpp include Metal support, and the GPU is used automatically when layers are offloaded.

Related guide: How to Run a Local Model on Apple Silicon with MLX

Get a macOS build and run it

Install with the project’s installer or download a pre-built binary from the releases page — the README gives curl -LsSf https://llama.app/install.sh | sh and the releases page as the two routes. Then run a model and let the GPU take the layers:

llama cli -hf ggml-org/Qwen3.5-0.8B-GGUF -ngl all

The -ngl all flag asks for every layer on the GPU; the server README says the default for -ngl is auto, which decides for you. The README’s own quick start uses exactly the llama cli -hf form above, so it is the shape to copy.

Check the GPU is doing the work

Watch Activity Monitor’s GPU history while the model generates: the GPU should be busy and the CPU mostly idle. If generation is slow and the CPU is saturated, the model is running on the CPU — check that you used the macOS build (not a CPU-only build) and that -ngl was not set to 0. Note the Metal behaviour reported in the KoboldCpp flags reference: on macOS, a default GPU-layer setting puts all layers on the GPU rather than autofitting, which is a reminder that macOS builds treat the GPU as always available.

Expected result. We checked the llama.cpp README for the macOS install routes and the llama cli quick start, and the server README for the -ngl flag. We did not run this software ourselves for this guide, so no output here is a recorded result; steps marked UNTESTED were checked against the sources below, not run.

Limits

Metal acceleration is for Apple Silicon Macs; Intel Macs need a different build and do not get the same benefit. Unified memory means the GPU and CPU share the same RAM — a model that is too large will still fail, just with a different error. The Metal behaviour described here is from the docs; we did not run llama.cpp on a Mac, so the steps are UNTESTED on this machine.

Sources

Checked 2026-11-28.

See all