AI & Machine Learning · Machine Learning Infrastructure
llama.cpp
Portable, quantized LLM and VLM inference in C and C++
llama.cpp is an MIT-licensed C and C++ inference runtime for language and vision-language models on CPUs, GPUs, phones, and servers. Maintained by the ggml community under ggml-org, it has more than 131,000 GitHub stars. No hosted service is required, while llama.app offers optional installation and related cloud access.
Key facts
- License
- MIT
- Main language
- C, C++, CUDA, Metal, Python
- Maintainer
- ggml community, ggml-org, Georgi Gerganov
- First released
- 2023
- Latest release
- b11812, October 22, 2026 (nightly)
- GitHub stars
- 131,975, October 2026
- Hosted option
- No required hosted service; llama.app provides optional project access
What llama.cpp is
llama.cpp is a native inference runtime created by Georgi Gerganov and maintained by the ggml community in ggml-org. The repository was created in 2023 and has grown beyond 131,000 GitHub stars, more than 24,000 forks, and hundreds of contributors. It runs quantized models without a Python stack and is used by desktop applications, serving products, research projects, and local AI tools. Its central dependency is ggml, a tensor library maintained alongside the runtime. The project is community-led rather than presented as a conventional paid software company, and its public repository remains the main product. This structure suits teams that want direct control over binaries, models, runtime flags, and deployment location.
How it works
Users obtain a binary, install through llama.app, run Docker, or compile with CMake. GGUF models can be downloaded from Hugging Face and launched with llama-cli, while llama-server exposes an OpenAI-compatible HTTP API. Quantization from 1.5-bit through 8-bit reduces memory demand, and CPU plus GPU hybrid execution permits models larger than available video memory. The runtime includes chat completion, embeddings, grammar-constrained output, speculative decoding, multimodal support, benchmarking, and conversion utilities. A typical deployment selects a model, backend, and context size, then starts a local process or HTTP service. Teams should record those choices so environments can be reproduced across workstations, servers, and mobile builds.
Architecture and recent releases
The implementation is primarily C and C++, supported by CMake, CUDA, Metal, HIP, Vulkan, SYCL, OpenCL, WebGPU, Python utilities, and platform-specific kernels. CPU paths cover x86, ARM, and RISC-V, while GPU paths target NVIDIA, AMD, Apple, Intel, Qualcomm, and Moore Threads hardware. Repository documentation covers Docker, Android, iOS XCFramework, multi-GPU, RPC, and server builds. As of October 22, 2026, releases include frequent b-series nightly builds, including b11812, with binaries for macOS, Linux, Windows, Android, CUDA, ROCm, Vulkan, OpenVINO, SYCL, and ARM variants. This breadth can support adoption across varied deployments, but teams should test their intended hardware, build process, and runtime configuration before committing to production use. No required hosted service is specified, while llama.app offers optional project access.
License and pricing
The core repository uses the MIT license, allowing commercial use, modification, redistribution, and inclusion in proprietary products, subject to required notices and disclaimers. It does not require source publication for software offered as a hosted service. Third-party components remain governed by their respective licenses, so adopters must review those terms separately. The project does not publish a mandatory hosted subscription price. llama.app offers installation and project-related access, but users may run the runtime on their own machines or cloud instances. As a result, adoption planning can use existing infrastructure or a chosen hosting provider, with costs shaped by CPU, GPU, memory, model, and operations rather than a llama.cpp license fee. Model licenses are separate and must be reviewed before redistribution or commercial delivery.
Limitations and how it compares
llama.cpp requires more operational judgment than managed inference APIs: users select quantization, context size, drivers, and backend flags, and performance varies by hardware. Ollama offers a friendlier package around local models, vLLM is often stronger for high-throughput batching, and proprietary APIs remove infrastructure work. llama.cpp remains unusually broad across consumer hardware and supports a local path, but its command-line and build surface can feel technical. Pick it when portability, low memory use, model ownership, or edge deployment matters more than managed scaling. Start with a pinned release, a representative GGUF model, and measurements for latency, memory, throughput, and output quality.
Main features
- GGUF inference. It directly loads quantized GGUF language and vision-language models, eliminating the need for a separate heavyweight serving framework.
- Broad backends. Supports CPU, CUDA, Metal, HIP, Vulkan, SYCL, OpenCL, WebGPU, OpenVINO, and other available acceleration paths across various hardware platforms.
- Hybrid execution. Splits model work between CPU memory and GPU memory when a model exceeds available video memory.
- OpenAI server. llama-server provides HTTP endpoints, enabling applications to interact with it through familiar conventions used by OpenAI-compatible clients.
- Quantization tools. It offers multiple quantization levels, enabling trade-offs among model size, memory consumption, and output quality.
Self-hosting llama.cpp
Self-hosting requires no database, Redis service, or object store. Users can download a release binary, install through llama.app, build with CMake, or run Docker images; documentation covers CPU, CUDA, Metal, Vulkan, HIP, SYCL, Android, and other backends. Minimum hardware is model-dependent rather than fixed: RAM or VRAM must hold the selected model and context, although quantization lowers the requirement. Operators should pin a known release, preserve model files and configuration, and benchmark after upgrades because backend kernels and defaults change. Back up GGUF files, prompts, and server configuration separately from ephemeral containers. Restrict exposed endpoints and review logs before production use.
Strengths
- MIT licensing permits commercial redistribution without a hosted-service dependency.
- Quantization makes useful models practical on ordinary CPUs and consumer GPUs.
- One runtime covers desktop, mobile, edge, and cloud deployment targets.
- The OpenAI-compatible server simplifies integration with existing clients.
Drawbacks
- Performance and setup vary across drivers, backends, and hardware.
- Nightly identifiers can make compatibility pinning less predictable.
- Large model and accelerator combinations still require substantial memory.
What teams replace with it
Teams usually evaluate llama.cpp when they want to move off Ollama, OpenAI API, NVIDIA Triton Inference Server.
For side-by-side commercial comparisons, browse our alternatives hub.
Frequently asked questions
Is llama.cpp free?
Yes. The core repository is MIT licensed and can be used commercially and redistributed under the license conditions. Users still pay for hardware, cloud compute, model licenses, and third-party components. llama.cpp itself does not require a paid account or recurring subscription for local inference. Hosted access through optional services is a separate choice.
Can companies use it commercially?
Yes, MIT permits commercial use and redistribution with required notices. Model weights are separate and can restrict commercial use or redistribution. Companies should review the runtime, model, and dependency licenses before shipping. They should also preserve applicable notices when embedding or distributing compiled software with modified components.
How do I self-host it?
Download a binary, build with CMake, or run Docker. Obtain a compatible GGUF model, then start llama-cli for local generation or llama-server for HTTP. Select a backend according to the machine and reserve enough RAM or VRAM for model and context. Test concurrency and exposed ports before production deployment.
How does it compare with Ollama?
Ollama packages local model management around a simpler experience. llama.cpp exposes lower-level control over quantization, backends, context, scheduling, and server behavior. Choose Ollama for a quicker desktop workflow and llama.cpp for tuning, embedding, mobile deployment, or direct runtime integration. Both can support local model execution, with different operational tradeoffs.
Does it keep prompts private?
A local process can keep prompts and output on the machine, offered surrounding software sends nothing elsewhere. The runtime is not a complete privacy guarantee: logs, exposed ports, downloaded models, and cloud deployment require separate controls. Review network access, application telemetry, backups, and access permissions before handling sensitive prompts.
Similar projects to compare
- OllamaMITOllama is a Go-based desktop, command-line, and API runtime for downloading and serving open models on personal hardware. It targets developers who want local inference with an optional hosted path. The code is MIT licensed, local execution has no usage charge, and Ollama Cloud offers free and paid plans with usage credits.
- LocalAIMITLocalAI is a free, MIT licensed runtime for serving language, vision, audio, image, and video models on local or on premises hardware. It provides OpenAI compatible, Anthropic Messages, and Open Responses interfaces, plus built in agents with tools, retrieval augmented generation, and MCP services. Developers and operators can install models from galleries or other supported sources, select separate backends, and use CPU or GPU acceleration. Docker, Podman, binaries, and launchers support deployment, while distributed mode adds workers, routing, model sharding, and horizontal scaling. LocalAI has no required hosted subscription, but operators manage hardware, storage, authentication, network controls, model compatibility, and separate model or backend licenses.
- AgentaMITAgenta is an agent workspace for teams that build, share, schedule, and monitor AI agents through chat, connected tools, and messaging apps. Its repository README describes the project as MIT licensed. Agenta offers a hosted Cloud service with a free Hobby tier and paid plans from $29 per month, plus a free self-hosted edition.
- Arize PhoenixElastic License 2.0 (source-available)Arize Phoenix is a self-hosted platform for tracing, evaluating, testing, and debugging LLM applications, aimed at developers and AI engineering teams. It uses Elastic License 2.0, a source-available license, and has no Phoenix license fee. Arize offers the separate AX service with a free tier, a $50 per month Pro tier, and custom Enterprise pricing.
- DeepnoteApache-2.0Deepnote is a Jupyter-compatible data notebook for analysts, data scientists, developers, and teams using Python, R, and SQL. Its repository uses Apache-2.0, permitting commercial use under the license terms. Deepnote Cloud provides hosted collaboration, managed compute, AI features, integrations, and deployable data apps through Free, Team, and Enterprise plans.
- dstackMPL-2.0dstack is an MPL-2.0 open source control plane for provisioning GPU fleets and running development environments, training tasks, and inference services across clouds, Kubernetes, VMs, and on-premises servers. It is self-hostable without a software fee. dstack Sky provides managed hosting and marketplace GPUs, while Enterprise adds commercial governance and support features.