Case & CodeA FIELD GUIDE TO AI
Start learning
Intermediate

llama-bench

Also: llama bench

In plain words

A small tool that measures how fast a model reads and writes on your computer.

The fuller definition

llama-bench is llama.cpp's benchmarking tool. It measures prompt-processing speed (pp) and text-generation speed (tg) for a model on your hardware.

How it fits together
  1. Model file

    Loaded

  2. Tests

    pp and tg

  3. Result

    Tokens per second

A simplified relationship, not a screenshot or a complete design.

A concrete example

llama-bench -m model.gguf prints a table with pp512 and tg128 results in tokens per second.

The distinction that matters

A benchmark measures speed on your machine, not answer quality on your tasks.

Related terms

Where it is taught

APIs and JSON: connect a model to a small program

Source and further reading

MDN · Web technology glossary

The definition and example are written for this library. The link gives background, official documentation or legal authority as labelled. Legal scope depends on the jurisdiction and current text; product features depend on release and settings.

Lessons, terms, practical guides and sources ESC