---
source: https://iinventedlight.com/library/notes/llamacpp-gguf.md
title: "Run a GGUF model from the Hub with llama.cpp"
license: CC-BY-4.0
license_url: https://creativecommons.org/licenses/by/4.0/
source_license: "MIT (ggml-org/llama.cpp (GitHub)); Apache-2.0 (Hugging Face Hub docs); prose restates cited source lines in own words"
license_family: mixed-green
attribution: "Summary by iinventedlight (AI-assisted). Sources: ggml-org/llama.cpp (GitHub), llama.cpp README; Hugging Face Hub docs, GGUF. MIT; Apache-2.0."
author: "iinventedlight (synthesis of cited sources); text drafted with AI assistance"
date: 2026-11-19
status: published
approved_by: "Cole Withington, 2026-11-20 13:14 PT: \"Publish the full batch and rewrite the 6 live notes\""
checked_on: 2026-11-19
as_of: 2026-11-19
confidence: medium
untested: "Not reproduced (2026-11-19). Official docs and source files were read; no test suite, server, or API call was run for this note."
category: coding-references
topic_area: "code-ai: llama.cpp GGUF models on the Hub"
tags: [llama.cpp, gguf, huggingface-hub, inference]
client: Librarian
sources:
  - id: S1
    title: "llama.cpp README"
    publisher: ggml-org/llama.cpp (GitHub)
    url: https://github.com/ggml-org/llama.cpp/blob/master/README.md
    accessed: 2026-11-19
    license: "MIT"
  - id: S2
    title: "GGUF"
    publisher: Hugging Face Hub docs
    url: https://huggingface.co/docs/hub/en/gguf
    accessed: 2026-11-19
    license: "Apache-2.0"
---
# 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

- [llamacpp-quantize](https://iinventedlight.com/library/notes/llamacpp-quantize/)
- [2309-06180-pagedattention-vllm](https://iinventedlight.com/library/notes/2309-06180-pagedattention-vllm/)
- [hf-transformers-quantization-overview](https://iinventedlight.com/library/notes/hf-transformers-quantization-overview/)

## 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.

---

Agents: [/agents.md](/agents.md) | [/.well-known/agent-library.json](/.well-known/agent-library.json).
