The Techno-WitchWe read the fine print so you don't have to.

Consult the almanac

Turning the pages…

Arrow keys to move, Enter to open, Esc to close. Every answer links to a dated page.



Local AI · The Hearth

llama.cpp vs Ollama: Which One Should You Run?

Both are free and MIT licensed. Ollama gets you chatting with one command; llama.cpp hands you more of the controls.

Some links on this site may earn us a commission. It never changes a price, a verdict or what we tell you to skip. How we make money.

In this story (8 sections)
  1. What each project says it is
  2. llama.cpp vs Ollama at a glance
  3. The install ritual, side by side
  4. GGUF, the file both of them read
  5. Shrinking models: quantization and memory
  6. GPUs and APIs: the boss-fight gear
  7. Price, licenses and the cloud side quest
  8. What to do next

Pick Ollama if you want a local model running with one install and one command. Pick llama.cpp if you like control: it runs GGUF files straight from Hugging Face, ships its own quantization tool and has a built-in server with a chat page.

Everything below is as of November 29, 2026, from each project's own README and docs.

What each project says it is

llama.cpp describes itself as "LLM inference in C/C++". Its stated goal is to run models with minimal setup and state-of-the-art performance on a wide range of hardware, locally or in the cloud. It's built on the ggml library.

Ollama pitches itself as the way to "get up and running" with open models such as gpt-oss, Qwen, Gemma and DeepSeek. It adds a REST API for running and managing models.

The Ollama README lists llama.cpp under "Supported backends", crediting the "llama.cpp project founded by Georgi Gerganov." The llama.cpp README doesn't mention Ollama at all. Ollama names llama.cpp as a supported backend, and the official pages stop there.

llama.cpp vs Ollama at a glance

llama.cpp Ollama
License MIT MIT
Install Script, prebuilt binaries, Docker or build from source Script, Mac DMG, Windows installer or Docker
First command llama cli -hf <model> ollama run gemma4
Where models come from Hugging Face, via -hf Ollama's library, or your own GGUF or Safetensors files
Desktop app No desktop installer app Yes
Built-in chat page Yes, in the server ("Llama Chat") Check the quickstart
API OpenAI-compatible server REST API, plus a subset of the OpenAI API
Quantization tool Yes No quantizing on GGUF import

The install ritual, side by side

llama.cpp. The README lists a few routes: a one-line script (curl -LsSf https://llama.app/install.sh | sh, or irm https://llama.app/install.ps1 | iex in PowerShell), prebuilt binaries on the GitHub releases page, Docker, or building from source. After that, llama cli -hf ggml-org/Qwen3.5-0.8B-GGUF downloads and runs a model from Hugging Face, and llama serve with the same flag launches an OpenAI-compatible API server. Older tutorials write llama-cli and llama-server. The current README uses llama cli and llama serve, so match whatever your installed version expects.

Ollama. On macOS and Linux it's curl -fsSL https://ollama.com/install.sh | sh. On Windows it's irm https://ollama.com/install.ps1 | iex, or grab the manual installer (Mac users get a DMG). There's also an official Docker image, ollama/ollama. Then open the app, type ollama for interactive setup, or go straight to ollama run gemma4.

System floors: Ollama needs macOS 14 Sonoma or newer, and Intel Macs run it on the CPU only. On Windows it needs Windows 10 22H2 or newer.

GGUF, the file both of them read

GGUF is, in the ggml spec's words, "a file format for storing models for inference with GGML and executors based on GGML". It's a binary format built to load fast, and it packs in all the information needed to load a model, so one file is the whole deployment. It replaced the older GGML, GGMF and GGJT formats.

llama.cpp pulls GGUF models straight from Hugging Face with the -hf flag, and it ships conversion scripts such as convert_hf_to_gguf.py.

Ollama has its own library at ollama.com/library, with families like Llama 3.1, Qwen, Gemma and gpt-oss. You can also import your own file: point a Modelfile's FROM line at a GGUF file (or a Safetensors folder) and run ollama create my-model. One catch: "Ollama does not quantize GGUF models during import." The docs tell you to quantize first "with a GGUF tool such as llama.cpp's llama-quantize".

Shrinking models: quantization and memory

Quantization is the potion that makes big models fit small machines. llama.cpp's quantize README puts it plainly: "Quantization reduces the precision of model weights", and it "may introduce some accuracy loss".

Here's Llama 3.1 8B at four quantization levels, from that README:

Format File size
F16 14.96 GiB
Q8_0 7.95 GiB
Q4_K_M 4.58 GiB
IQ1_S 1.87 GiB

The same page says a quantized model needs about as much memory as its file takes on disk, and it lists Llama 3.1 70B dropping from its original 280.9 GB to 43.1 GB at Q4_K_M.

Ollama doesn't quantize your imports, but it has its own memory levers. Its FAQ says the K/V context cache "can be quantized to significantly reduce memory usage when Flash Attention is enabled", set with OLLAMA_KV_CACHE_TYPE (default f16). Models stay in memory for 5 minutes by default before unloading.

Context length is messier: Ollama's docs give different default figures on different pages, and one of them scales with your GPU memory. Check the context-length page for your setup, and expect longer context to cost more memory.

GPUs and APIs: the boss-fight gear

llama.cpp picks its GPU backend at build time. The build guide lists CUDA (-DGGML_CUDA=ON), Vulkan (-DGGML_VULKAN=ON), HIP for AMD with ROCm (-DGGML_HIP=ON) and a separate SYCL guide for Intel. "On MacOS, Metal is enabled by default." A plain build is CPU-only.

Its server offers OpenAI-compatible chat completions, responses and embeddings routes, parallel decoding with multi-user support, continuous batching and speculative decoding. It also has "Llama Chat", a built-in chat web app.

Ollama handles GPUs for you. It "supports Nvidia GPUs with compute capability 5.0+ and driver version 550 and newer." AMD on Linux needs the ROCm v7 driver, Apple devices run through Metal, and Vulkan adds Windows and Linux support when its backend is installed. The API lives at localhost:11434, there's a subset of the OpenAI API at /v1/, and client libraries exist for Python (pip install ollama) and JavaScript (npm i ollama).

Price, licenses and the cloud side quest

Both codebases are MIT licensed: llama.cpp's LICENSE is copyright the ggml authors, Ollama's LICENSE is copyright Ollama. That covers the software only. Every model you download carries its own license, which our open-weight models guide unpacks.

Ollama also runs models "in the cloud", with paid plans listed on its pricing page. Check that page for current prices. llama.cpp can run on a cloud machine you rent, but it doesn't sell a hosted service.

What to do next

No official page tells you which to pick, so these calls are ours, based on the differences above.

  • Just curious: install Ollama and run ollama run gemma4. That's the whole spell.
  • Want a chat window, not a terminal: look at our Ollama vs LM Studio comparison before choosing either of these.
  • Hoarding GGUF files from Hugging Face: llama.cpp reads them directly with -hf, no import step.
  • Need to quantize a model yourself: you'll want llama.cpp's quantize tool either way, since Ollama's docs point you there.
  • Serving a small team from one box: llama.cpp's server lists multi-user parallel decoding and continuous batching.
  • Building an app: both give you an OpenAI-style API. Ollama adds ready-made Python and JavaScript libraries.

Still deciding whether to run models at home at all? Start with local AI vs cloud AI.

Receipts

Official pages behind this story, read Nov 29, 2026
  1. github.com
    What is llama.cpp? · How do you install llama.cpp?
  2. github.com
    What is Ollama? · How do you install Ollama?
  3. raw.githubusercontent.com
    What licence is llama.cpp under?
  4. raw.githubusercontent.com
    What licence is Ollama under?
  5. raw.githubusercontent.com
    What are the llama.cpp run commands?
  6. docs.ollama.com
    Ollama OS requirements (house fact check)
11 more receipts
  1. docs.ollama.com
    Can Ollama use GGUF files and Safetensors?
  2. raw.githubusercontent.com
    What does llama.cpp quantization do, and which types exist?
  3. raw.githubusercontent.com
    Which GPU backends does llama.cpp build support?
  4. docs.ollama.com
    Which GPUs does Ollama support?
  5. raw.githubusercontent.com
    What does llama-server offer?
  6. docs.ollama.com
    Can Ollama quantize the KV cache? · How long does Ollama keep a model in memory?
  7. docs.ollama.com
    Does Ollama have an app, and does llama.cpp?
  8. ollama.com
    Does Ollama offer cloud models, and does llama.cpp?
  9. ollama.com
    Which models does the Ollama library list?
  10. lmstudio.ai
    Is LM Studio relevant (link to /ollama-vs-lm-studio/)?

Only pages the company publishes itself are listed. How we check: our method. Spotted a wrong number? Corrections.

Filed under

Local AI: The Hearth“llama cpp vs ollama”

Front page