Why llama.cpp server
llama.cpp is the foundational C/C++ inference engine. Ollama uses it under the hood. llama-server (built from the llama.cpp tree) exposes the same engine as a standalone HTTP server with full OpenAI-compatible chat completions plus llama.cpp-specific endpoints.
When you reach for it directly
- You have a specific GGUF Ollama doesn't ship and you don't want to build a Modelfile + repository.
- You need flag-level control — exact
num_ctx, batch size, GPU split, mmap settings, KV cache type. - You're embedding the engine in your own product and want one binary, no daemon, no model registry.
- You want to run multiple variants on different ports — one server per model, no shared state.
Build, serve, hit
llama.cpp builds with one CMake invocation. The server binary is llama-server. Point it at any GGUF file and it listens on the port you choose with the OpenAI-compat endpoint live by default.