officialrepo

ggml-org/llama.cpp

★ 136k starsC++Public
View on GitHub ↗

A community setup & usage guide for the llama.cpp GitHub repository. Official repo: ggml-org/llama.cpp

LLM inference in C/C++.

What is llama.cpp?

llama.cpp runs LLM inference in portable C/C++ with no heavy dependencies, on CPU or GPU. It's the engine behind many local-AI apps and supports GGUF models and an OpenAI-compatible server.

Installation

Homebrew
brew install llama.cpp
WinGet
winget install ggml.llamacpp
Prebuilt binaries
# or download from the GitHub Releases page
Homebrew
brew install llama.cpp
Build from source
git clone https://github.com/ggml-org/llama.cpp && cd llama.cpp && cmake -B build && cmake --build build -j
Run it
llama-cli -hf ggml-org/gemma-3-1b-it-GGUF
Verify
llama-cli --version

Usage

Run a model from Hugging Face
llama-cli -hf ggml-org/gemma-3-1b-it-GGUF
Start an OpenAI-compatible server
llama-server -hf ggml-org/gemma-3-1b-it-GGUF

Before you start

A C++ toolchain if you build from source. GPU acceleration (CUDA/Metal/Vulkan) is optional but faster.

Official repository: github.com/ggml-org/llama.cpp

FAQ

What model format does it use?

GGUF. You can download GGUF models directly from Hugging Face with the -hf flag.

Does it have a server?

Yes — llama-server exposes an OpenAI-compatible API.

Where is the official llama.cpp GitHub repository?

The official llama.cpp GitHub repo is hosted at github.com/ggml-org/llama.cpp. This page links straight to it and summarises how to install and use llama.cpp.

Is this the official llama.cpp repo?

No. officialrepo.com is an independent community guide. The official llama.cpp GitHub repository is github.com/ggml-org/llama.cpp — always treat that repo and its documentation as the source of truth.

This is an independent community guide. llama.cpp and its logo are trademarks of their respective owner; officialrepo.com is not affiliated with or endorsed by the project or GitHub, Inc. The link above points to the genuine official repository.