What is llama.cpp?
llama.cpp é um mecanismo de inferência simples em C/C++ para rodar grandes modelos de linguagem localmente e na nuvem. Ele carrega modelos no formato GGUF e os executa em uma ampla gama de hardware, com configuração mínima, desde a CPU de um notebook até GPUs NVIDIA, AMD e Apple. It sits in the Local Runtimes category of the Models & Inference tools and is open-source, written in C/C++ and licensed MIT.

Visão geral
llama.cpp é um mecanismo de inferência simples em C/C++ para rodar grandes modelos de linguagem localmente e na nuvem. Ele carrega modelos no formato GGUF e os executa em uma ampla gama de hardware, com configuração mínima, desde a CPU de um notebook até GPUs NVIDIA, AMD e Apple.
Ele foi criado para desenvolvedores que querem rodar modelos abertos nas próprias máquinas, sem uma pilha pesada de Python ou dependências externas. A quantização inteira (de 1.5 bit até 8 bit) reduz o uso de memória, e a inferência híbrida CPU+GPU permite acelerar parcialmente modelos maiores que toda a sua VRAM.
Como runtime local no espaço de inferência e serving, o llama.cpp oferece uma ferramenta de linha de comando (llama-cli) para prompts pontuais e um servidor compatível com OpenAI (llama-server) ao qual você pode apontar códigos de clientes já existentes. Ele também é o principal ambiente de testes da biblioteca ggml subjacente.
O que faz
- Implementação em C/C++ pura, sem dependências externas
- Roda modelos GGUF na CPU, Apple Silicon (Metal/NEON/Accelerate) e GPUs via CUDA, HIP, MUSA, Vulkan e SYCL
- Quantização inteira de 1.5 bit a 8 bit para inferência mais rápida e menor uso de memória
- Inferência híbrida CPU+GPU para acelerar parcialmente modelos maiores que a VRAM total
- Servidor de API REST integrado e compatível com OpenAI (llama-server), com suporte multimodal
- Baixe e rode modelos diretamente do Hugging Face com a flag -hf
Primeiros passos
Instale um binário pré-compilado ou compile a partir do código-fonte e, em seguida, aponte o llama.cpp para um arquivo de modelo GGUF ou para um repositório do Hugging Face.
Instale o llama.cpp
Instale com um gerenciador de pacotes (brew, nix ou winget), rode com Docker, baixe um binário pré-compilado na página de releases ou compile a partir do código-fonte. Veja os guias de instalação e compilação do projeto para mais detalhes.
brew install llama.cppRode um modelo pela linha de comando
Use o llama-cli com um arquivo GGUF local ou passe -hf para baixar e rodar um modelo diretamente do Hugging Face.
# Use a local model file
llama-cli -m my_model.gguf
# Or download and run a model directly from Hugging Face
llama-cli -hf ggml-org/gemma-3-1b-it-GGUFInicie o servidor compatível com OpenAI
Inicie o llama-server para expor uma API REST que clientes compatíveis com OpenAI possam chamar.
llama-server -hf ggml-org/gemma-3-1b-it-GGUF
Commands and code are distilled from the project's own documentation — always check the repositório oficial para as novidades.
Quando usar
- Rode modelos abertos offline em um notebook ou estação de trabalho, sem uma pilha Python
- Sirva uma API local compatível com OpenAI para apps e agentes durante o desenvolvimento
- Encaixe modelos maiores em hardware limitado usando quantização e inferência híbrida CPU+GPU
- Rode inferência em Apple Silicon ou em GPUs não NVIDIA via Metal, Vulkan, HIP ou SYCL
Histórico de versões
Every verified update to llama.cpp that AI/TLDR tracked, newest first — each links to our coverage and the official changeset.
- 2026-11-13v1.0.0
The first stable release of llama.cpp and ggml, which now follow semantic versioning: a major bump means a breaking change to the public C API. The deprecated public API (llama_set_warmup and 35 other functions) is removed, and the release adds an FP8 (E4M3) KV cache, Kimi-K3.1 support and an OpenAI-compatible /v1/audio/speech server endpoint.
- 2026-09-14v0.4.1
Adds architecture support for Maple 20B-A1B (a ternary mixture of experts, on CPU), Tencent Hy 4 as a preview architecture, and Spark2.5. ggml moves to v0.24.0, JSON schema handling is rebuilt around a common_schema representation, and the deprecated --mmap, --mlock, and --direct-io flags are removed in favour of --load-mode.
- 2026-09-04v0.4.0
Adds initial support for the Qwen3.8-Flash-Next (qwen4exp), NVIDIA Nemotron-3-Puzzle-75B-A9B, Nemotron 3.5 DSpark, and nanbeige4.2-3B architectures. A new --lazy-mode flag reads tensors from disk on demand, the server gains per-slot context limits, and ggml moves to 0.23.0 with sparse flash attention and Apple RDMA as an RPC transport.
llama.cpp in the news
- 2026-11-26NOTÁVELllama-cpp-rdna-boosts — patches that speed up llama.cpp on AMD GPUs
- 2026-11-13GRANDEllama.cpp v1.0.0 — first stable release, with semantic versioning
- 2026-10-16NOTÁVELPS5LM v0.9.0 — llama.cpp runs on a jailbroken PS5's GPU
- 2026-09-30GRANDEMagnitude — a local inference engine for agents, up to 2x faster than llama.cpp
- 2026-09-14GRANDEOllama 0.34.1 — MLX safetensors leave experimental, GGUF needs llama.cpp
- 2026-09-14GRANDEllama.cpp v0.4.1 — Maple 20B-A1B and Tencent Hy 4 now run locally
- 2026-09-04GRANDEllama.cpp v0.4.0 — Qwen3.8-Flash-Next support and lazy tensor loading
- 2026-08-11GRANDEMetal Capability Shim — llama.cpp runs up to 16x faster inside macOS VMs
Do Feed de lançamentos do AI/TLDR — cada item é verificado na fonte quando é publicado.
How llama.cpp compares
llama.cpp alongside other open-source local runtimes tools AI/TLDR tracks, ranked by GitHub stars.
| Ferramenta | Estrelas | O que faz |
|---|---|---|
| Ollama | ★ 189k | A developer-friendly tool that downloads and runs local LLMs from the terminal with a built-in OpenAI-compatible API. |
| llama.cpp | ★ 137k | Rode LLMs em C/C++ na CPU, Apple Silicon e GPU, com baixo uso de memória |
| GPT4All | ★ 77.3k | GPT4All is a free desktop app and Python client that runs large language models locally on your own computer, with no API calls or GPU required. |
| Colibrì | ★ 54.1k | A pure-C inference engine that keeps a Mixture-of-Experts model's dense trunk resident in RAM and streams its routed experts from disk, so 744B-2.8T models run on consumer hardware. |
| LocalAI | ★ 50.6k | A self-hosted server that exposes an OpenAI-compatible API for running text, vision, voice, and image models on local hardware. |
| Strata | ★ 49.5k | A one-click Windows and Linux engine that splits the 125B Qwen3.8-Flash-Next across GPU, RAM, CPU and SSD so it runs on a 12 GB gaming card, with OpenAI and Anthropic APIs on localhost. |
| Jan | ★ 46.3k | An open-source desktop app that runs LLMs fully offline as a ChatGPT-style assistant on your own computer. |
| AirLLM | ★ 43.7k | A Python inference library that keeps only one transformer layer on the GPU at a time, so a 70B model runs on a single 4GB card and a 671B MoE model on about 12GB, without quantization. |

