New Tool Radar

Local AI

How to Install llama.cpp With Homebrew on macOS

Install llama.cpp from Homebrew on a Mac and confirm the tools report a version.

Schematic with three steps: Install with Homebrew; Confirm the tools answer; Run a first model.

Building llama.cpp from source gives the most control, but it is not the fastest way to get running. On a Mac, Homebrew installs pre-built llama.cpp tools, including llama-cli, llama-server, and llama-bench, in one command.

What you need

  • A Mac with Homebrew installed
  • A terminal
  • A GGUF model file to test with, or a plan to download one

Step 1: Install with Homebrew

Run brew install llama.cpp in a terminal. Homebrew downloads and installs the llama.cpp tools, including llama-cli and llama-server.

Step 2: Confirm the tools answer

Run llama-cli –version and llama-server –version. Each should print a version number, which confirms the install worked.

Step 3: Run a first model

Point llama-cli at a GGUF model file with llama-cli -m path/to/model.gguf -p ‘Say hello in one sentence.’ and confirm it generates a reply.

Worked example: synthetic Homebrew install

The table below is a synthetic example. It shows the expected result of installing llama.cpp; no install was run.

Check Expected Result
brew install llama.cpp Installs without error Pass
llama-cli –version Prints a version Pass
llama-server –version Prints a version Pass
First run Model replies Pass

Expected result (UNTESTED). Homebrew installs the tools, both version commands print a version, and a first model run generates a reply. This check was not run live; the table shows the expected result for the synthetic example.

Limits

  • Homebrew builds may lag the latest source, so check the version if you need a brand-new feature.
  • A Homebrew install does not choose a GPU backend for you; check the startup log to see which backend was compiled in.
  • You still need a GGUF model file; the install does not download one.

Sources

See all