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
- llama.cpp README — install with curl https://llama.app/install.sh, or download pre-built binaries from the releases page; run with llama cli -hf or llama serve -hf; the project enables LLM inference on a wide range of hardware
- llama.cpp server README — -ngl/–gpu-layers: max number of layers to store in VRAM, default auto; -dev/–device: comma-separated list of devices for offloading
- KoboldCpp flags reference — on Apple Silicon, Metal is used automatically; on macOS, –gpulayers -1 puts all layers on the GPU
Checked 2026-11-28.
