llama.cpp
AI / ML development tool · Free
A language model inference runtime for CPU and GPU with GGUF and a server API: it helps embed local generation in applications.
Also known as: ggml-org/llama.cpp; llama-cpp; llm-inference-cpp

What you can use for free
A local code pipeline under MIT; rights for the selected models are checked separately.
Paid features and costs
Model APIs, managed services, and computing resources are paid for separately; the code license does not license all model weights.
Access and limitations
A local code pipeline under MIT; rights for the selected models are checked separately. Model APIs, managed services, and computing resources are paid for separately; the code license does not license all model weights.
Use cases
- Embed local LLM inference
- Test generation and connect the server API to the application
Example workflow
A possible workflow; this is not a report of hands-on testing.
Embed local LLM inference.
Before you start
- Test documents or tasks, and a quality criterion.
- Models, a runtime, and a computing budget.
Steps
- Choose a compatible GGUF model and available CPU/GPU resources.
- Test generation and connect the server API to the application.
- Connect the workflow to the application and make errors observable.
Check your result
- Check the result against reference examples and invalid inputs.
- Inference costs, model rights, and data handling have been established.
Choosing llama.cpp
Embed local LLM inference
Choose this when
- Embed local LLM inference
- Test generation and connect the server API to the application
Requirements
- Choose a compatible model and backend for your hardware; CPU-only and GPU options have different resource budgets.
Things to consider
- Costs and limits of free use: Model APIs, managed services, and computing resources are paid for separately; the code license does not license all model weights.
- Terms of use: MIT for the code; dependencies have separate licenses.
- The MIT runtime does not determine a downloaded model's rights; hybrid inference documentation does not guarantee a specific model's speed or capacity.
Frequently asked questions
What can you use for free in llama.cpp?
A local code pipeline under MIT; rights for the selected models are checked separately.
What additional costs might arise with llama.cpp?
Model APIs, managed services, and computing resources are paid for separately; the code license does not license all model weights.
What terms of use matter for llama.cpp?
MIT for the code; dependencies have separate licenses.
How do you get started with llama.cpp?
Choose a compatible GGUF model and available CPU/GPU resources. Test generation and connect the server API to the application. Connect the workflow to the application and make errors observable.
Can llama.cpp use CPU and GPU together?
The README describes CPU+GPU hybrid inference: the GPU can accelerate part of a model even when the whole model does not fit in VRAM. Quantization formats and backends including Metal, CUDA, HIP, Vulkan, and SYCL are available. The CLI runs a model, while serve provides an OpenAI-compatible API; releases, Docker, and source builds are different ways to obtain the runtime.
Related tasks and approaches
License
MIT for the code; dependencies have separate licenses.
MIT — permissive license
You can use, modify, distribute, and sell the code, including in a closed-source commercial product. When sharing copies or substantial portions of the code, retain the license text and copyright notice. You do not need to open-source your entire project; the author provides no warranties.
License termsTechnologies and topics
- llama.cpp
- ml
- Development