LLAMA-BENCH(1)

πŸ“¦
version 10438 Β· 2 versions
, in ubuntu stonking

πŸ’… LLAMA-BENCH(1) β€” User Commands, bestie edition

okay so like, welcome to llama-bench, the manual page, section 1 (User Commands). yes i'm the one explaining it to you. no i will not be normal about it. let's go πŸ¦‹


✨ NAME ✨

llama-bench β€” it's literally called llama-bench. that's it. that's the name. iconic minimalism, no notes πŸ’…


🌸 DESCRIPTION 🌸

so the vibe is:

usage: llama-bench [options]

that's the whole thing. llama-bench takes options and then it does its little benchmarking thing. periodt.


πŸŽ€ options: πŸŽ€

  • -h, --help β€” help. the classic. when in doubt, ask for help, bestie 🫢
  • --numa <distribute|isolate|numactl> β€” numa mode. default: disabled. so if you don't say anything, it stays off, okay? 😌
  • -r, --repetitions <n> β€” how many times each test gets run. default: 5. yes, five times, we're thorough in this household πŸ’–
  • --prio <-1|0|1|2|3> β€” process/thread priority. default: 0.
  • --delay <0...N> (seconds) β€” a lil pause between each test. default: 0. she needs a breather 🧚
  • -o, --output <csv|json|jsonl|md|sql> β€” the output format that gets printed to stdout. default: md.
  • -oe, --output-err <csv|json|jsonl|md|sql> β€” the output format that gets printed to stderr. default: none. so nothing by default, chill 😌
  • --list-devices β€” lists the available devices and then peaces out. bye πŸ‘‹
  • -v, --verbose β€” verbose output. she talks a LOT. love that for her πŸ—£οΈ
  • --progress β€” prints test progress indicators. little dashboard moment ✨
  • --no-warmup β€” skips the warmup runs before benchmarking. no stretching, straight into it πŸƒβ™€οΈ
  • -fitt, --fit-target <MiB> β€” fits the model to device memory with this margin per device, in MiB. default: off.
  • -fitc, --fit-ctx <n> β€” the minimum ctx size for --fit-target. default: 4096.

πŸ§ͺ test parameters: πŸ§ͺ

  • -m, --model <filename> β€” default: models/7B/ggml-model-q4_0.gguf. that's the model file, bestie πŸ“
  • -hf, -hfr, --hf-repo <user>/<model>[:quant] β€” Hugging Face model repository. the quant is optional and it's case-insensitive; it defaults to Q4_K_M, OR it falls back to the first file in the repo if Q4_K_M doesn't exist. example: ggml-org/GLM-4.7-Flash-GGUF:Q4_K_M. default: unused.
  • -hff, --hf-file <file> β€” the Hugging Face model file. if you specify this one, it overrides the quant in --hf-repo. default: unused.
  • -hft, --hf-token <token> β€” Hugging Face access token. default: the value from the HF_TOKEN environment variable πŸ”‘
  • --offline β€” offline mode: forces use of cache and prevents network access. default: disabled. airplane mode but for benchmarking ✈️
  • -p, --n-prompt <n> β€” default: 512.
  • -n, --n-gen <n> β€” default: 128.
  • -pg <pp,tg> β€” default: (empty, bestie. nothing. the void.) πŸ•³οΈ
  • -d, --n-depth <n> β€” default: 0.
  • -b, --batch-size <n> β€” default: 2048.
  • -ub, --ubatch-size <n> β€” default: 512.
  • -ctk, --cache-type-k <t> β€” default: f16.
  • -ctv, --cache-type-v <t> β€” default: f16.
  • -t, --threads <n> β€” default: <num_cpus>. she'll figure out your cpu count herself, so smart πŸ’…
  • -C, --cpu-mask <hex,hex> β€” default: 0x0.
  • --cpu-strict <0|1> β€” default: 0.
  • --poll <0...100> β€” default: 50.
  • -ngl, --n-gpu-layers <n> β€” default: -1.
  • -ncmoe, --n-cpu-moe <n> β€” default: 0.
  • -sm, --split-mode <none|layer|row|tensor> β€” default: layer.
  • -mg, --main-gpu <i> β€” default: 0.
  • -nkvo, --no-kv-offload <0|1> β€” default: 0.
  • -fa, --flash-attn <on|off|auto> β€” default: auto.
  • -dev, --device <dev0/dev1/...> β€” default: auto.
  • -lm, --load-mode <auto|none|mmap|mlock|mmap+mlock|dio> β€” default: auto.
  • -mmp, --mmap <0|1> β€” DEPRECATED IN FAVOUR OF --load-mode. like, she's retired, stop calling her πŸ“΅
  • -dio, --direct-io <0|1> β€” also DEPRECATED IN FAVOUR OF --load-mode. same energy. rest in peace πŸͺ¦
  • -embd, --embeddings <0|1> β€” default: 0.
  • -ts, --tensor-split <ts0/ts1/..> β€” default: 0.
  • -ot, --override-tensor <tensor name pattern>=<buffer type>;... β€” default: disabled.
  • -nopo, --no-op-offload <0|1> β€” default: 0.
  • --no-host <0|1> β€” default: 0.

⭐ real talk though, and this part is IMPORTANT, so don't scroll past it:

Multiple values can be given for each parameter by separating them with ',' or by specifying the parameter multiple times. Ranges can be given as 'first-last' or 'first-last+step' or 'first-last*mult'.

like. you can just hand her a whole list. a lil buffet of values. she'll run them all. obsessed honestly πŸ˜­πŸ’–


and that's the whole page, bestie!! this was the debian build, dated September 2026 β€” mwah, love u, go benchmark something πŸ”₯πŸ‘‘πŸ’œ

πŸ“¦ where this page comes from