aicoolies logo
llama.cpp logo
llama.cpp logo

llama.cpp

High-performance local LLM inference in C/C++

open sourceupdated Jun 8, 2026

llama.cpp is the foundational C/C++ library with 75K+ GitHub stars powering local LLM inference on consumer hardware. Provides optimized CPU and GPU inference for quantized models in GGUF format. Supports LLaMA, Mistral, Phi, Gemma, and most open-weight families. Features 2-8 bit quantization for reduced memory, multi-GPU support, context extension, grammar-constrained output, and an OpenAI-compatible API server. The engine behind Ollama and LM Studio.

llama.cpp is the foundational library for running LLMs on consumer hardware. With 75K+ stars, it powers Ollama, LM Studio, and many local AI applications.

Optimized for CPU (AVX/AVX2/AVX-512), Apple Silicon (Metal), NVIDIA (CUDA), and AMD (ROCm). GGUF format quantization from 2-bit to 8-bit reduces memory while maintaining quality.

Supports LLaMA, Mistral, Phi, Gemma, Qwen, and virtually all open-weight models. Features context extension, grammar-constrained output, batch processing, and speculative decoding.

Built-in HTTP server provides OpenAI-compatible API for seamless local inference. Continuously optimized by a large community.

Pricing

Free and open-source

Platforms

CPU, CUDA, Metal, ROCm, any OS

Categories

Tags

Use Cases

Related Tools

computed discovery: shared active categories · kept separate from editor-verified Alternatives

KTransformers parent kvcache-ai logo

KTransformers

Heterogeneous CPU-GPU inference and SFT for large MoE models

Open-source framework for running and fine-tuning large Mixture-of-Experts models with heterogeneous CPU-GPU execution, optimized kernels, limited VRAM and SGLang or LLaMA-Factory integrations.

Open Source
Hugging Face logo

Text Embeddings Inference

Hugging Face's open-source inference server for embeddings, rerankers, and classifiers

Text Embeddings Inference is Hugging Face's Apache-2.0 server for high-throughput embedding, reranking, and sequence-classification models. TEI packages token-based dynamic batching, optimized Transformers kernels, Safetensors loading, OpenAI-compatible embedding endpoints, Prometheus metrics, and configurable OpenTelemetry tracing in deployable CPU and GPU images.

Open Source
LMDeploy logo

LMDeploy

Open-source toolkit for quantizing, deploying, and serving LLMs and vision-language models

LMDeploy is an Apache-2.0 toolkit for self-hosting LLM and vision-language model inference with TurboMind and PyTorch engines. It combines continuous batching, blocked KV cache, tensor parallelism, AWQ and KV-cache quantization with OpenAI-compatible APIs, multi-GPU distribution, offline pipelines, and production metrics.

Open Source
Sakana Fugu logo

Sakana Fugu

Multi-agent model API that orchestrates frontier models behind one OpenAI-compatible endpoint

Sakana Fugu is a hosted model-provider API that exposes a learned multi-agent system as one OpenAI-compatible model. It dynamically routes coding, code review, research, and reasoning tasks across a frontier-model pool, with Fugu for lower-latency work and Fugu Ultra for harder workloads where answer quality matters more than cost or speed.

paidTelemetry
ElevenLabs logo

ElevenLabs

Lifelike AI voice generation, cloning, and voice agents

ElevenLabs is an AI voice platform for text-to-speech, voice cloning, and conversational AI agents, built on models like Multilingual v2 and the low-latency Flash v2.5 and Turbo v2.5. Developers call its API to generate lifelike narration, clone voices from short audio samples, dub content across 30+ languages, add sound effects, and deploy real-time voice agents for customer service, IVR, and interactive apps, with SDKs for Python, JavaScript, and more.

freemium
xAI Python SDK logo

xAI Python SDK

Official Python SDK for the xAI API

The xAI Python SDK is the official Python client for the xAI API, giving developers a direct way to build Grok-powered apps without relying on community proxies or unofficial wrappers. It supports synchronous and asynchronous Python clients for chat completions, streaming responses, function/tool calling, and multimodal workflows, making it a clean fit for backend services, agents, notebooks, and developer tools that need programmatic xAI access.

Open Source

Comparisons

Ollama vs llama.cpp — Local LLM Wrapper vs the Inference Engine It Wraps

Ollama and llama.cpp both let you run open-weight models on your own hardware, but they sit at different layers of the stack. llama.cpp is the C/C++ inference engine that started the local-LLM movement and quietly powers a huge slice of the ecosystem. Ollama is the Go-based developer wrapper that hides the rough edges and turned local models into a one-line install for everyone else.

Ollamallama.cpp

FAQ

What is llama.cpp?

llama.cpp is the foundational C/C++ library with 75K+ GitHub stars powering local LLM inference on consumer hardware. Provides optimized CPU and GPU inference for quantized models in GGUF format. Supports LLaMA, Mistral, Phi, Gemma, and most open-weight families. Features 2-8 bit quantization for reduced memory, multi-GPU support, context extension, grammar-constrained output, and an OpenAI-compatible API server. The engine behind Ollama and LM Studio.

Is llama.cpp free?

Yes — llama.cpp is open source and free to use. Free and open-source

Is llama.cpp open source?

Yes — llama.cpp is open source.

What are the best llama.cpp alternatives?

The top editor-verified llama.cpp alternatives are RunAnywhere SDK, Nexa SDK.