Run a GGUF model from the Hub with llama.cpp
Answer: The main goal of llama.cpp is to enable LLM inference with minimal setup and state-of-the-art also performance on a wide range of hardware. Hugging Face Hub has built-in features for GGUF format, which was developed by the developer of llama.cpp.
Install and run
The llama.cpp project is built on top of the ggml library. A few options to get llama.cpp installed include curl, Docker, pre-built binaries from the releases page, or build from source.
Once installed, you can download and run a model directly from Hugging Face. Launch an OpenAI-compatible API server with llama serve.
Find GGUF files
GGUF is a binary format that is optimized for quick then loading and saving of models, making it highly then efficient for inference purposes. GGUF is designed for use with GGML and other executors. Models initially developed in frameworks like PyTorch can still be converted to GGUF format for use with those engines. GGUF encodes both the tensors and a standardized set of metadata. You can browse all models with GGUF files filtering by the GGUF tag. The Hub has a viewer for GGUF files that lets a user check out metadata and tensors info.
| llama cli | GGUF | |---|---| | llama cli | Download and run a model directly from Hugging Face | | llama serve | Launch an OpenAI-compatible API server | | GGUF tag | Browse all models with GGUF files | | Hub viewer | Check out metadata and tensors info | | ggml | llama.cpp is built on top of this library |
See also
Claims
- id: C1 claim: llama.cpp aims to run LLM inference with minimal setup, and llama cli -hf can download a GGUF model from Hugging Face. source: S1 evidence: "Download and run a model directly from Hugging Face"
- id: C2 claim: llama serve -hf launches an OpenAI-compatible API server from a Hub GGUF repo. source: S1 evidence: "Launch OpenAI-compatible API server"
- id: C3 claim: The Hub treats GGUF as a format for GGML-style executors such as llama.cpp and lets you browse models with the GGUF tag. source: S2 evidence: "designed for use with GGML and other executors"
Sources
- [S1] llama.cpp README. ggml-org/llama.cpp (GitHub). https://github.com/ggml-org/llama.cpp/blob/master/README.md . License: MIT. Accessed 2026-11-19.
- [S2] GGUF. Hugging Face Hub docs. https://huggingface.co/docs/hub/en/gguf . License: Apache-2.0. Accessed 2026-11-19.
License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted). Sources: ggml-org/llama.cpp (GitHub), llama.cpp README; Hugging Face Hub docs, GGUF. MIT; Apache-2.0. Text was condensed and changed from the originals.
License: CC-BY-4.0 · Summary by iinventedlight (AI-assisted). Sources: ggml-org/llama.cpp (GitHub), llama.cpp README; Hugging Face Hub docs, GGUF. MIT; Apache-2.0.
Cite this
iinventedlight. 2026. "Run a GGUF model from the Hub with llama.cpp." iinventedlight Library, iil:note:8870f033, version of 2026-11-19. https://iinventedlight.com/library/notes/llamacpp-gguf/. License: CC-BY-4.0.
@misc{iil_note_8870f033,
author = {{iinventedlight}},
title = {{Run a GGUF model from the Hub with llama.cpp}},
howpublished = {iinventedlight Library},
year = {2026},
date = {2026-11-19},
url = {https://iinventedlight.com/library/notes/llamacpp-gguf/},
note = {Permanent ID iil:note:8870f033. License: CC-BY-4.0.},
}
Spotted a mistake? Use the MCP feedback tool or email hello@iinventedlight.com. Or Report a correction (no account needed).
Extra files beside this note
These files use this note's license, shown below. Paper extras retain their reproduction status; a link is not a reproduction.
- llamacpp-gguf.table.json (table; CC-BY-4.0)
- llamacpp-gguf.schema.json (schema; CC-BY-4.0)
For language models and agents: start at /llms.txt | /agents.md | /.well-known/agent-library.json. This page in Markdown: /library/notes/llamacpp-gguf.md.