The Open Model EcosystemLesson 34 of 71

Module 4 · Making it run on the machine you have

llama.cpp, end to end

In this lesson

  • 10 min read
  • 5 reading sections
  • Knowledge check
  • Lesson 4 of 10 in this chapter

This chapter’s goalSize, quantise and serve an open model on hardware you actually have (a laptop, a phone, a free cloud tier or a rented GPU) predict its generation speed from memory bandwidth before running it, choose a bit width you can defend, and state the monthly token volume at which renting stops being cheaper than owning.

This chapter’s media

The film explains chapter ideas. The audiobook narrates the complete teaching text.

FormatEnglishहिंदी
Chapter filmNot availableNot available
Full audiobookNot availableNot available

A little at a time

Explore an idea, try it, then check what stays.

Step 1 of 6Free · no account needed
Lesson steps

The tool that made local models real

llama.cpp is a C++ inference engine with no Python dependency, support for CPU, Nvidia, AMD, Apple Metal and Vulkan, and a single-file model format. Ollama, LM Studio, Jan and most desktop AI applications are wrappers around it. Learning the underlying tool takes an hour and gives you every dial the wrappers hide.

Installing

Bash
# macOS
brew install llama.cpp

# Debian or Ubuntu, prebuilt
# see the project releases; or build with the backend you need:
git clone https://github.com/ggml-org/llama.cpp && cd llama.cpp
cmake -B build -DGGML_CUDA=ON        # Nvidia; use -DGGML_METAL=ON on a Mac
cmake --build build --config Release -j

The build flag is the important part. A CPU-only build on a machine with a GPU works and is several times slower, and it is a common quiet mistake.

Your place and first choices stay on this browser. Classroom credit is recorded separately.

Every lesson here is open. Your progress is recorded once you pass the Maths You Actually Need exam.

Stuck on something?Ask Anjali, your AI tutor

How to cite: Addaly (2026) ‘llama.cpp, end to end’, in The Open Model Ecosystem. Edited by M. Mun. Addaly. Available at: https://addaly.com/learn/open-models/llama-cpp-in-practice (Accessed: 29 November 2026).