Skip to content
,

How to Install llama.cpp in 2026: Every Method (Windows, Mac, Linux)

7–10 minutes
Woman in a home lab with a PC tower holding a tablet with a LLAMA.CPP card, hook install in 1 minute

llama.cpp is the engine behind most local AI apps, from Ollama to LM Studio. Installing it directly gives you the newest features first, full control over every setting, and the fastest speeds on your own GPU.

It also has more install options than ever. In November 2026 there’s a one-line installer, a desktop tray app, package managers on every OS, prebuilt zips for each GPU type, Docker images, and building from source.

This guide shows each method, which one to pick for your hardware, and how to check that your GPU is actually being used.

TL;DR

  • Fastest: curl -LsSf https://llama.app/install.sh | sh (Mac/Linux) or irm https://llama.app/install.ps1 | iex (Windows PowerShell). Then llama serve -hf ggml-org/Qwen3.5-0.8B-GGUF.
  • Package managers: winget install llama.cpp (Windows), brew install llama.cpp (Mac/Linux), conda install -c conda-forge llama.cpp (all three).
  • NVIDIA on Windows by hand: download the win-cuda-13.5-x64 zip (or 12.4 for older drivers) plus the matching cudart zip from the GitHub releases page.
  • Build from source: cmake -B build -DGGML_CUDA=ON then cmake --build build --config Release -j 8. Use -DGGML_VULKAN=ON or -DGGML_HIP=ON for other GPUs.
  • Check the GPU: the startup log should list your GPU and say layers were offloaded.

Already installed? Jump to my llama-server guide to serve models to apps, or read what changed in llama.cpp 1.0.

Which Install Method Should You Use?

You are… Use Why
New and want it working in a minute One-line installer Installs the new llama command; no zip files to manage
On a Mac or Windows 11 and prefer an app llama.app Menu-bar/tray app with a local API
Someone who keeps tools updated with a package manager winget, Homebrew, conda-forge, Nix Easy updates with one command
On Windows with an NVIDIA, AMD or Intel GPU and want a specific backend Release zips Pick the exact CUDA, Vulkan, ROCm or SYCL build
Running a server or homelab Docker Ready images for CPU, CUDA and ROCm
Wanting the newest code or tuning for your GPU Build from source Latest commits, custom flags, native CPU tuning

Method 1: One-Line Installer

The llama.cpp README now leads with a one-line installer from llama.app.

macOS and Linux:

curl -LsSf https://llama.app/install.sh | sh

Windows (PowerShell):

irm https://llama.app/install.ps1 | iex

This gives you a single llama command with subcommands. Open a new terminal afterwards so the command is on your PATH, then try:

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

llama cli opens a chat in the terminal. llama serve starts a local server with the built-in chat page and an OpenAI-compatible API. The -hf flag downloads the model from Hugging Face the first time.

As with any piped install script, you can download it first and read it before running it if you prefer.

Method 2: The llama.app Desktop App

llama.app is a small app from the llama.cpp team and Hugging Face. It sits in the macOS menu bar or the Windows 11 system tray and runs models in the background.

  • Mac: brew install --cask llama-app, or download it from llama.app.
  • Windows 11: download the installer from llama.app.

Its local API listens on http://localhost:9931/v1, so you can point any OpenAI-compatible tool at that address. If you want a full GUI with a model browser instead, see my LM Studio CLI guide.

Method 3: Package Managers

These give you the classic binaries (llama-cli, llama-server, llama-bench and friends).

OS Command
Windows winget install llama.cpp
macOS / Linux brew install llama.cpp
macOS (MacPorts) sudo port install llama.cpp
macOS / Linux (Nix) nix profile install nixpkgs#llama-cpp
Windows / macOS / Linux conda install -c conda-forge llama.cpp

conda-forge publishes CUDA, Vulkan and Metal builds, so it’s a good choice if you already use conda or mamba. Package managers can lag a few releases behind GitHub, which matters when you need a brand-new model architecture. In that case, use a release zip or build from source.

Method 4: Prebuilt Release Zips

Every release on the GitHub releases page has zips for each platform and GPU backend. Names follow the pattern llama-b<build>-bin-<platform>.zip. For build b12380 (14 Nov 2026), the main Windows options are:

Your hardware File to download
NVIDIA, recent driver win-cuda-13.5-x64 + cudart-llama-bin-win-cuda-13.5-x64.zip
NVIDIA, older driver win-cuda-12.4-x64 + the matching cuda-12.4 cudart zip
Any GPU (NVIDIA, AMD, Intel) win-vulkan-x64
AMD with ROCm win-rocm-10.0-x64
Intel Arc (SYCL) win-sycl-x64
No GPU win-cpu-x64

For CUDA, unzip both the main zip and the cudart zip into the same folder. The cudart zip holds the CUDA runtime DLLs, so you don’t need the full CUDA Toolkit installed. You do need a current NVIDIA driver.

Linux zips are named ubuntu-x64, ubuntu-cuda-12.8-x64, ubuntu-cuda-13.5-x64, ubuntu-vulkan-x64 and ubuntu-rocm-10.0-x64. Mac users get macos-arm64 (Apple Silicon) and macos-x64.

Not sure whether Vulkan or CUDA is faster on your card? Download both and compare them with llama-bench. My llama.cpp Vulkan guide covers AMD and Intel cards in detail.

Method 5: Docker

Official images are on GitHub Container Registry:

  • ghcr.io/ggml-org/llama.cpp:server: just llama-server.
  • ghcr.io/ggml-org/llama.cpp:light: just llama-cli.
  • ghcr.io/ggml-org/llama.cpp:full: all tools plus model conversion scripts.
  • GPU variants add a suffix, such as server-cuda, server-cuda13 or server-rocm.

A typical NVIDIA server run (needs the NVIDIA Container Toolkit):

docker run --gpus all -p 8080:8080 -v ~/models:/models \
  ghcr.io/ggml-org/llama.cpp:server-cuda \
  -m /models/model.gguf --host 0.0.0.0 --port 8080 -ngl 99

Method 6: Build from Source

Building takes a few minutes and gives you the newest code. You need Git, CMake and a C++ compiler (Visual Studio 2022 with “Desktop development with C++” on Windows, Xcode command-line tools on Mac, build-essential on Linux).

git clone https://github.com/ggml-org/llama.cpp
cd llama.cpp

CPU only

cmake -B build
cmake --build build --config Release -j 8

NVIDIA (CUDA)

Install the CUDA Toolkit first, then:

cmake -B build -DGGML_CUDA=ON
cmake --build build --config Release -j 8

To build for specific cards only (faster compile), list their compute capabilities, for example -DCMAKE_CUDA_ARCHITECTURES="86;89" for RTX 30 and 40 series.

Vulkan (AMD, Intel, NVIDIA)

Install the Vulkan SDK (on Windows from LunarG), then:

cmake -B build -DGGML_VULKAN=ON
cmake --build build --config Release -j 8

AMD ROCm (HIP)

cmake -S . -B build -DGGML_HIP=ON -DGPU_TARGETS=gfx1030 -DCMAKE_BUILD_TYPE=Release
cmake --build build --config Release -j 16

Replace gfx1030 with your card’s target (gfx1100 is the RX 7900 series). Leaving GPU_TARGETS out builds for the GPUs in your system.

Apple Silicon (Metal)

Metal is on by default on macOS, so the plain CPU commands above already build with GPU support.

The finished programs land in build/bin/ (on Windows with Visual Studio, build/bin/Release/). To update later, run git pull and the same two cmake commands again.

Run Your First Model

With the classic binaries, the same quick test looks like this:

llama-cli -hf ggml-org/Qwen3.5-0.8B-GGUF
llama-server -hf ggml-org/Qwen3.5-0.8B-GGUF --port 8080

Open http://localhost:8080 in a browser for the chat page. For a local file, use -m path\to\model.gguf instead of -hf. To pick the right size and quant for your VRAM, see GGUF quantization explained. Already have Ollama models? Ollama and Hugging Face GGUF explains where those files live.

Check That the GPU Is Used

Read the first lines llama.cpp prints when it starts:

  • It should list your GPU by name (for example under a CUDA or Vulkan device line).
  • It should report layers offloaded to the GPU. If it says 0 layers, you’re running on the CPU.
  • While a reply is generating, Task Manager (Windows) or nvidia-smi should show GPU load and VRAM use.

To offload every layer, add -ngl 99. Use -ngl 0 to test CPU speed. If a big model doesn’t fit, read about running models larger than VRAM.

Troubleshooting

“llama is not recognized” or “command not found”

Open a new terminal so the updated PATH loads. With zips, either run the program from its folder or add that folder to PATH.

Missing cudart64 or cublas DLL on Windows

You unzipped the CUDA build without its cudart zip. Download the matching cudart-llama-bin-win-cuda-*.zip and extract it into the same folder.

Everything runs on the CPU

You downloaded the CPU build, your NVIDIA driver is too old for that CUDA version, or the model was started with -ngl 0. Try the cuda-12.4 build or the Vulkan build, and check the startup log.

“unknown model architecture”

Your build is older than the model. Update to the latest release, which is why package-manager builds sometimes fall short for new models.

CMake can’t find CUDA or Vulkan

Install the CUDA Toolkit or Vulkan SDK first, then open a fresh terminal (on Windows, the “x64 Native Tools” prompt) and delete the build folder before running cmake again.

FAQ

What’s the easiest way to install llama.cpp?

The one-line installer from llama.app, or winget install llama.cpp on Windows and brew install llama.cpp on Mac.

Do I need the CUDA Toolkit to run llama.cpp on NVIDIA?

Not for the prebuilt zips: the cudart zip includes the runtime. You only need the toolkit to build from source.

Should I use CUDA or Vulkan on an NVIDIA card?

CUDA is the usual first choice. Vulkan is close on many cards and needs no CUDA files. Test both with llama-bench.

Is llama.cpp the same as Ollama?

No. Ollama is built on top of llama.cpp’s ggml library. Running llama.cpp directly gives newer features and more control, with a little more setup.

How do I update llama.cpp?

Run the installer again, use your package manager’s upgrade command, download a newer zip, or git pull and rebuild.

Does llama.cpp work on AMD GPUs?

Yes, through Vulkan (simplest) or ROCm/HIP builds.

Where should I put my GGUF models?

Anywhere. Pass the path with -m. Models downloaded with -hf go to the llama.cpp cache folder automatically.

Sources

Free weekly email

Get new AI guides every week

One short weekly email with our newest local AI, ComfyUI and AI tool guides. No spam, no pop-ups, just the good stuff.

Free. Unsubscribe anytime in one click. We only use your email to send this newsletter. See our privacy policy.

Woman in a home lab with a PC tower holding a tablet with a LLAMA.CPP card, hook install in 1 minute