char-fork/llama.cpp
git clone https://git.t4t.associates/char-fork/llama.cpp
bebc9350e
char/aliceai-t5-moe
llama.cpp/tools/llama-bench
Performance testing tool for llama.cpp.
Table of contents
Syntax
usage: llama-bench [options]
options:
-h, --help
--numa <distribute|isolate|numactl> numa mode (default: disabled)
-r, --repetitions <n> number of times to repeat each test (default: 5)
--prio <-1|0|1|2|3> process/thread priority (default: 0)
--delay <0...N> (seconds) delay between each test (default: 0)
-o, --output <csv|json|jsonl|md|sql> output format printed to stdout (default: md)
-oe, --output-err <csv|json|jsonl|md|sql> output format printed to stderr (default: none)
--list-devices list available devices and exit
-v, --verbose verbose output
--progress print test progress indicators
--no-warmup skip warmup runs before benchmarking
-fitt, --fit-target <MiB> fit model to device memory with this margin per device in MiB (default: off)
-fitc, --fit-ctx <n> minimum ctx size for --fit-target (default: 4096)
-rpc, --rpc <rpc_servers> register RPC devices (comma separated)
test parameters:
-m, --model <filename> (default: models/7B/ggml-model-q4_0.gguf)
-hf, -hfr, --hf-repo <user>/<model>[:quant] Hugging Face model repository; quant is optional, case-insensitive
default to Q4_K_M, or 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> Hugging Face model file. If specified, it will override the quant in --hf-repo
(default: unused)
-hft, --hf-token <token> Hugging Face access token
(default: value from HF_TOKEN environment variable)
-p, --n-prompt <n> (default: 512)
-n, --n-gen <n> (default: 128)
-pg <pp,tg> (default: )
-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: system dependent)
-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)
-lzm, --lazy-mode <on|auto|off> (default: auto)
-mmp, --mmap <0|1> (DEPRECATED IN FAVOUR OF --load-mode)
-dio, --direct-io <0|1> (DEPRECATED IN FAVOUR OF --load-mode)
-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)
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'.
llama-bench can perform three types of tests:
- Prompt processing (pp): processing a prompt in batches (
-p) - Text generation (tg): generating a sequence of tokens (
-n) - Prompt processing + text generation (pg): processing a prompt followed by generating a sequence of tokens (
-pg)
With the exception of -r, -o and -v, all options can be specified multiple times to run multiple tests. Each pp and tg test is run with all combinations of the specified options. To specify multiple values for an option, the values can be separated by commas (e.g. -n 16,32), or the option can be specified multiple times (e.g. -n 16 -n 32).
Each test is repeated the number of times given by -r, and the results are averaged. The results are given in average tokens per second (t/s) and standard deviation. Some output formats (e.g. json) also include the individual results of each repetition.
Using the -d <n> option, each test can be run at a specified context depth, prefilling the KV cache with <n> tokens.
For a description of the other options, see the completion example.
[!NOTE] The measurements with
llama-benchdo not include the times for tokenization and for sampling.
Examples
Text generation with different models
$ ./llama-bench -m models/7B/ggml-model-q4_0.gguf-m models/13B/ggml-model-q4_0.gguf-p 0-n 128,256,512
| model | size | params | backend | ngl | test | t/s |
|---|---|---|---|---|---|---|
| llama 7B mostly Q4_0 | 3.56 GiB | 6.74 B | CUDA | -1 | tg 128 | 132.19 ± 0.55 |
| llama 7B mostly Q4_0 | 3.56 GiB | 6.74 B | CUDA | -1 | tg 256 | 129.37 ± 0.54 |
| llama 7B mostly Q4_0 | 3.56 GiB | 6.74 B | CUDA | -1 | tg 512 | 123.83 ± 0.25 |
| llama 13B mostly Q4_0 | 6.86 GiB | 13.02 B | CUDA | -1 | tg 128 | 82.17 ± 0.31 |
| llama 13B mostly Q4_0 | 6.86 GiB | 13.02 B | CUDA | -1 | tg 256 | 80.74 ± 0.23 |
| llama 13B mostly Q4_0 | 6.86 GiB | 13.02 B | CUDA | -1 | tg 512 | 78.08 ± 0.07 |
Prompt processing with different batch sizes
$ ./llama-bench -n 0-p 1024-b 128,256,512,1024
| model | size | params | backend | ngl | n_batch | test | t/s |
|---|---|---|---|---|---|---|---|
| llama 7B mostly Q4_0 | 3.56 GiB | 6.74 B | CUDA | -1 | 128 | pp 1024 | 1436.51 ± 3.66 |
| llama 7B mostly Q4_0 | 3.56 GiB | 6.74 B | CUDA | -1 | 256 | pp 1024 | 1932.43 ± 23.48 |
| llama 7B mostly Q4_0 | 3.56 GiB | 6.74 B | CUDA | -1 | 512 | pp 1024 | 2254.45 ± 15.59 |
| llama 7B mostly Q4_0 | 3.56 GiB | 6.74 B | CUDA | -1 | 1024 | pp 1024 | 2498.61 ± 13.58 |
Different numbers of threads
$ ./llama-bench -n 0-n 16-p 64-t 1,2,4,8,16,32
| model | size | params | backend | threads | test | t/s |
|---|---|---|---|---|---|---|
| llama 7B mostly Q4_0 | 3.56 GiB | 6.74 B | CPU | 1 | pp 64 | 6.17 ± 0.07 |
| llama 7B mostly Q4_0 | 3.56 GiB | 6.74 B | CPU | 1 | tg 16 | 4.05 ± 0.02 |
| llama 7B mostly Q4_0 | 3.56 GiB | 6.74 B | CPU | 2 | pp 64 | 12.31 ± 0.13 |
| llama 7B mostly Q4_0 | 3.56 GiB | 6.74 B | CPU | 2 | tg 16 | 7.80 ± 0.07 |
| llama 7B mostly Q4_0 | 3.56 GiB | 6.74 B | CPU | 4 | pp 64 | 23.18 ± 0.06 |
| llama 7B mostly Q4_0 | 3.56 GiB | 6.74 B | CPU | 4 | tg 16 | 12.22 ± 0.07 |
| llama 7B mostly Q4_0 | 3.56 GiB | 6.74 B | CPU | 8 | pp 64 | 32.29 ± 1.21 |
| llama 7B mostly Q4_0 | 3.56 GiB | 6.74 B | CPU | 8 | tg 16 | 16.71 ± 0.66 |
| llama 7B mostly Q4_0 | 3.56 GiB | 6.74 B | CPU | 16 | pp 64 | 33.52 ± 0.03 |
| llama 7B mostly Q4_0 | 3.56 GiB | 6.74 B | CPU | 16 | tg 16 | 15.32 ± 0.05 |
| llama 7B mostly Q4_0 | 3.56 GiB | 6.74 B | CPU | 32 | pp 64 | 59.00 ± 1.11 |
| llama 7B mostly Q4_0 | 3.56 GiB | 6.74 B | CPU | 32 | tg 16 | 16.41 ± 0.79 |
Different numbers of layers offloaded to the GPU
$ ./llama-bench -ngl 10,20,30,31,32,33,34,35
| model | size | params | backend | ngl | test | t/s |
|---|---|---|---|---|---|---|
| llama 7B mostly Q4_0 | 3.56 GiB | 6.74 B | CUDA | 10 | pp 512 | 373.36 ± 2.25 |
| llama 7B mostly Q4_0 | 3.56 GiB | 6.74 B | CUDA | 10 | tg 128 | 13.45 ± 0.93 |
| llama 7B mostly Q4_0 | 3.56 GiB | 6.74 B | CUDA | 20 | pp 512 | 472.65 ± 1.25 |
| llama 7B mostly Q4_0 | 3.56 GiB | 6.74 B | CUDA | 20 | tg 128 | 21.36 ± 1.94 |
| llama 7B mostly Q4_0 | 3.56 GiB | 6.74 B | CUDA | 30 | pp 512 | 631.87 ± 11.25 |
| llama 7B mostly Q4_0 | 3.56 GiB | 6.74 B | CUDA | 30 | tg 128 | 40.04 ± 1.82 |
| llama 7B mostly Q4_0 | 3.56 GiB | 6.74 B | CUDA | 31 | pp 512 | 657.89 ± 5.08 |
| llama 7B mostly Q4_0 | 3.56 GiB | 6.74 B | CUDA | 31 | tg 128 | 48.19 ± 0.81 |
| llama 7B mostly Q4_0 | 3.56 GiB | 6.74 B | CUDA | 32 | pp 512 | 688.26 ± 3.29 |
| llama 7B mostly Q4_0 | 3.56 GiB | 6.74 B | CUDA | 32 | tg 128 | 54.78 ± 0.65 |
| llama 7B mostly Q4_0 | 3.56 GiB | 6.74 B | CUDA | 33 | pp 512 | 704.27 ± 2.24 |
| llama 7B mostly Q4_0 | 3.56 GiB | 6.74 B | CUDA | 33 | tg 128 | 60.62 ± 1.76 |
| llama 7B mostly Q4_0 | 3.56 GiB | 6.74 B | CUDA | 34 | pp 512 | 881.34 ± 5.40 |
| llama 7B mostly Q4_0 | 3.56 GiB | 6.74 B | CUDA | 34 | tg 128 | 71.76 ± 0.23 |
| llama 7B mostly Q4_0 | 3.56 GiB | 6.74 B | CUDA | 35 | pp 512 | 2400.01 ± 7.72 |
| llama 7B mostly Q4_0 | 3.56 GiB | 6.74 B | CUDA | 35 | tg 128 | 131.66 ± 0.49 |
Different prefilled context
$ ./llama-bench -d 0,512
| model | size | params | backend | ngl | test | t/s |
|---|---|---|---|---|---|---|
| qwen2 7B Q4_K - Medium | 4.36 GiB | 7.62 B | CUDA | -1 | pp512 | 7340.20 ± 23.45 |
| qwen2 7B Q4_K - Medium | 4.36 GiB | 7.62 B | CUDA | -1 | tg128 | 120.60 ± 0.59 |
| qwen2 7B Q4_K - Medium | 4.36 GiB | 7.62 B | CUDA | -1 | pp512 @ d512 | 6425.91 ± 18.88 |
| qwen2 7B Q4_K - Medium | 4.36 GiB | 7.62 B | CUDA | -1 | tg128 @ d512 | 116.71 ± 0.60 |
Output formats
By default, llama-bench outputs the results in markdown format. The results can be output in other formats by using the -o option.
Markdown
$ ./llama-bench -o md
| model | size | params | backend | ngl | test | t/s |
|---|---|---|---|---|---|---|
| llama 7B mostly Q4_0 | 3.56 GiB | 6.74 B | CUDA | -1 | pp 512 | 2368.80 ± 93.24 |
| llama 7B mostly Q4_0 | 3.56 GiB | 6.74 B | CUDA | -1 | tg 128 | 131.42 ± 0.59 |
CSV
$ ./llama-bench -o csv
build_commit,build_number,cpu_info,gpu_info,backends,model_filename,model_type,model_size,model_n_params,n_batch,n_ubatch,n_threads,cpu_mask,cpu_strict,poll,type_k,type_v,n_gpu_layers,n_cpu_moe,split_mode,main_gpu,no_kv_offload,flash_attn,devices,tensor_split,tensor_buft_overrides,use_mmap,use_direct_io,embeddings,no_op_offload,no_host,fit_target,fit_min_ctx,n_prompt,n_gen,n_depth,test_time,avg_ns,stddev_ns,avg_ts,stddev_ts "8cf427ff","5163","AMD Ryzen 7 7800X3D 8-Core Processor","NVIDIA GeForce RTX 4080","CUDA","models/Qwen2.5-7B-Instruct-Q4_K_M.gguf","qwen2 7B Q4_K - Medium","4677120000","7615616512","2048","512","8","0x0","0","50","f16","f16","-1","0","layer","0","0","-1","auto","0.00","none","1","0","0","0","0","0","0","512","0","0","2025-04-24T11:57:09Z","70285660","982040","7285.676949","100.064434" "8cf427ff","5163","AMD Ryzen 7 7800X3D 8-Core Processor","NVIDIA GeForce RTX 4080","CUDA","models/Qwen2.5-7B-Instruct-Q4_K_M.gguf","qwen2 7B Q4_K - Medium","4677120000","7615616512","2048","512","8","0x0","0","50","f16","f16","-1","0","layer","0","0","-1","auto","0.00","none","1","0","0","0","0","0","0","0","128","0","2025-04-24T11:57:10Z","1067431600","3834831","119.915244","0.430617"
JSON
$ ./llama-bench -o json
[
{
"build_commit" : "8cf427ff" ,
"build_number" : 5163 ,
"cpu_info" : "AMD Ryzen 7 7800X3D 8-Core Processor" ,
"gpu_info" : "NVIDIA GeForce RTX 4080" ,
"backends" : "CUDA" ,
"model_filename" : "models/Qwen2.5-7B-Instruct-Q4_K_M.gguf" ,
"model_type" : "qwen2 7B Q4_K - Medium" ,
"model_size" : 4677120000 ,
"model_n_params" : 7615616512 ,
"n_batch" : 2048 ,
"n_ubatch" : 512 ,
"n_threads" : 8 ,
"cpu_mask" : "0x0" ,
"cpu_strict" : false ,
"poll" : 50 ,
"type_k" : "f16" ,
"type_v" : "f16" ,
"n_gpu_layers" : -1 ,
"n_cpu_moe" : 0 ,
"split_mode" : "layer" ,
"main_gpu" : 0 ,
"no_kv_offload" : false ,
"flash_attn" : -1 ,
"devices" : "auto" ,
"tensor_split" : "0.00" ,
"tensor_buft_overrides" : "none" ,
"use_mmap" : true ,
"use_direct_io" : false ,
"embeddings" : false ,
"no_op_offload" : 0 ,
"no_host" : false ,
"fit_target" : 0 ,
"fit_min_ctx" : 0 ,
"n_prompt" : 512 ,
"n_gen" : 0 ,
"n_depth" : 0 ,
"test_time" : "2025-04-24T11:58:50Z" ,
"avg_ns" : 72135640 ,
"stddev_ns" : 1453752 ,
"avg_ts" : 7100.002165 ,
"stddev_ts" : 140.341520 ,
"samples_ns" : [ 74601900 , 71632900 , 71745200 , 71952700 , 70745500 ],
"samples_ts" : [ 6863.1 , 7147.55 , 7136.37 , 7115.79 , 7237.21 ]
},
{
"build_commit" : "8cf427ff" ,
"build_number" : 5163 ,
"cpu_info" : "AMD Ryzen 7 7800X3D 8-Core Processor" ,
"gpu_info" : "NVIDIA GeForce RTX 4080" ,
"backends" : "CUDA" ,
"model_filename" : "models/Qwen2.5-7B-Instruct-Q4_K_M.gguf" ,
"model_type" : "qwen2 7B Q4_K - Medium" ,
"model_size" : 4677120000 ,
"model_n_params" : 7615616512 ,
"n_batch" : 2048 ,
"n_ubatch" : 512 ,
"n_threads" : 8 ,
"cpu_mask" : "0x0" ,
"cpu_strict" : false ,
"poll" : 50 ,
"type_k" : "f16" ,
"type_v" : "f16" ,
"n_gpu_layers" : -1 ,
"n_cpu_moe" : 0 ,
"split_mode" : "layer" ,
"main_gpu" : 0 ,
"no_kv_offload" : false ,
"flash_attn" : -1 ,
"devices" : "auto" ,
"tensor_split" : "0.00" ,
"tensor_buft_overrides" : "none" ,
"use_mmap" : true ,
"use_direct_io" : false ,
"embeddings" : false ,
"no_op_offload" : 0 ,
"no_host" : false ,
"fit_target" : 0 ,
"fit_min_ctx" : 0 ,
"n_prompt" : 0 ,
"n_gen" : 128 ,
"n_depth" : 0 ,
"test_time" : "2025-04-24T11:58:51Z" ,
"avg_ns" : 1076767880 ,
"stddev_ns" : 9449585 ,
"avg_ts" : 118.881588 ,
"stddev_ts" : 1.041811 ,
"samples_ns" : [ 1075361300 , 1065089400 , 1071761200 , 1081934900 , 1089692600 ],
"samples_ts" : [ 119.03 , 120.178 , 119.43 , 118.307 , 117.464 ]
}
]
JSONL
$ ./llama-bench -o jsonl
{"build_commit" : "8cf427ff" , "build_number" : 5163 , "cpu_info" : "AMD Ryzen 7 7800X3D 8-Core Processor" , "gpu_info" : "NVIDIA GeForce RTX 4080" , "backends" : "CUDA" , "model_filename" : "models/Qwen2.5-7B-Instruct-Q4_K_M.gguf" , "model_type" : "qwen2 7B Q4_K - Medium" , "model_size" : 4677120000 , "model_n_params" : 7615616512 , "n_batch" : 2048 , "n_ubatch" : 512 , "n_threads" : 8 , "cpu_mask" : "0x0" , "cpu_strict" : false , "poll" : 50 , "type_k" : "f16" , "type_v" : "f16" , "n_gpu_layers" : -1 , "n_cpu_moe" : 0 , "split_mode" : "layer" , "main_gpu" : 0 , "no_kv_offload" : false , "flash_attn" : -1 , "devices" : "auto" , "tensor_split" : "0.00" , "tensor_buft_overrides" : "none" , "use_mmap" : true , "use_direct_io" : false , "embeddings" : false , "no_op_offload" : 0 , "no_host" : false , "fit_target" : 0 , "fit_min_ctx" : 0 , "n_prompt" : 512 , "n_gen" : 0 , "n_depth" : 0 , "test_time" : "2025-04-24T11:59:33Z" , "avg_ns" : 70497220 , "stddev_ns" : 883196 , "avg_ts" : 7263.609157 , "stddev_ts" : 90.940578 , "samples_ns" : [ 71551000 , 71222800 , 70364100 , 69439100 , 69909100 ],"samples_ts" : [ 7155.74 , 7188.71 , 7276.44 , 7373.37 , 7323.8 ]}
{"build_commit" : "8cf427ff" , "build_number" : 5163 , "cpu_info" : "AMD Ryzen 7 7800X3D 8-Core Processor" , "gpu_info" : "NVIDIA GeForce RTX 4080" , "backends" : "CUDA" , "model_filename" : "models/Qwen2.5-7B-Instruct-Q4_K_M.gguf" , "model_type" : "qwen2 7B Q4_K - Medium" , "model_size" : 4677120000 , "model_n_params" : 7615616512 , "n_batch" : 2048 , "n_ubatch" : 512 , "n_threads" : 8 , "cpu_mask" : "0x0" , "cpu_strict" : false , "poll" : 50 , "type_k" : "f16" , "type_v" : "f16" , "n_gpu_layers" : -1 , "n_cpu_moe" : 0 , "split_mode" : "layer" , "main_gpu" : 0 , "no_kv_offload" : false , "flash_attn" : -1 , "devices" : "auto" , "tensor_split" : "0.00" , "tensor_buft_overrides" : "none" , "use_mmap" : true , "use_direct_io" : false , "embeddings" : false , "no_op_offload" : 0 , "no_host" : false , "fit_target" : 0 , "fit_min_ctx" : 0 , "n_prompt" : 0 , "n_gen" : 128 , "n_depth" : 0 , "test_time" : "2025-04-24T11:59:33Z" , "avg_ns" : 1068078400 , "stddev_ns" : 6279455 , "avg_ts" : 119.844681 , "stddev_ts" : 0.699739 , "samples_ns" : [ 1066331700 , 1064864900 , 1079042600 , 1063328400 , 1066824400 ],"samples_ts" : [ 120.038 , 120.203 , 118.624 , 120.377 , 119.982 ]}
SQL
SQL output is suitable for importing into a SQLite database. The output can be piped into the sqlite3 command line tool to add the results to a database.
$ ./llama-bench -o sql
CREATE TABLE IF NOT EXISTS llama_bench ( build_commitTEXT , build_numberINTEGER , cpu_infoTEXT , gpu_infoTEXT , backendsTEXT , model_filenameTEXT , model_typeTEXT , model_sizeINTEGER , model_n_paramsINTEGER , n_batchINTEGER , n_ubatchINTEGER , n_threadsINTEGER , cpu_maskTEXT , cpu_strictINTEGER , pollINTEGER , type_kTEXT , type_vTEXT , n_gpu_layersINTEGER , n_cpu_moeINTEGER , split_modeTEXT , main_gpuINTEGER , no_kv_offloadINTEGER , flash_attnINTEGER , devicesTEXT , tensor_splitTEXT , tensor_buft_overridesTEXT , use_mmapINTEGER , use_direct_ioINTEGER , embeddingsINTEGER , no_op_offloadINTEGER , no_hostINTEGER , fit_targetINTEGER , fit_min_ctxINTEGER , n_promptINTEGER , n_genINTEGER , n_depthINTEGER , test_timeTEXT , avg_nsINTEGER , stddev_nsINTEGER , avg_tsREAL , stddev_tsREAL ); INSERT INTO llama_bench ( build_commit, build_number, cpu_info, gpu_info, backends, model_filename, model_type, model_size, model_n_params, n_batch, n_ubatch, n_threads, cpu_mask, cpu_strict, poll, type_k, type_v, n_gpu_layers, n_cpu_moe, split_mode, main_gpu, no_kv_offload, flash_attn, devices, tensor_split, tensor_buft_overrides, use_mmap, use_direct_io, embeddings, no_op_offload, no_host, fit_target, fit_min_ctx, n_prompt, n_gen, n_depth, test_time, avg_ns, stddev_ns, avg_ts, stddev_ts) VALUES ( '8cf427ff' , '5163' , 'AMD Ryzen 7 7800X3D 8-Core Processor' , 'NVIDIA GeForce RTX 4080' , 'CUDA' , 'models/Qwen2.5-7B-Instruct-Q4_K_M.gguf' , 'qwen2 7B Q4_K - Medium' , '4677120000' , '7615616512' , '2048' , '512' , '8' , '0x0' , '0' , '50' , 'f16' , 'f16' , '-1' , '0' , 'layer' , '0' , '0' , '-1' , 'auto' , '0.00' , 'none' , '1' , '0' , '0' , '0' , '0' , '0' , '0' , '512' , '0' , '0' , '2025-04-24T12:00:08Z' , '69905000' , '519516' , '7324.546977' , '54.032613' ); INSERT INTO llama_bench ( build_commit, build_number, cpu_info, gpu_info, backends, model_filename, model_type, model_size, model_n_params, n_batch, n_ubatch, n_threads, cpu_mask, cpu_strict, poll, type_k, type_v, n_gpu_layers, n_cpu_moe, split_mode, main_gpu, no_kv_offload, flash_attn, devices, tensor_split, tensor_buft_overrides, use_mmap, use_direct_io, embeddings, no_op_offload, no_host, fit_target, fit_min_ctx, n_prompt, n_gen, n_depth, test_time, avg_ns, stddev_ns, avg_ts, stddev_ts) VALUES ( '8cf427ff' , '5163' , 'AMD Ryzen 7 7800X3D 8-Core Processor' , 'NVIDIA GeForce RTX 4080' , 'CUDA' , 'models/Qwen2.5-7B-Instruct-Q4_K_M.gguf' , 'qwen2 7B Q4_K - Medium' , '4677120000' , '7615616512' , '2048' , '512' , '8' , '0x0' , '0' , '50' , 'f16' , 'f16' , '-1' , '0' , 'layer' , '0' , '0' , '-1' , 'auto' , '0.00' , 'none' , '1' , '0' , '0' , '0' , '0' , '0' , '0' , '0' , '128' , '0' , '2025-04-24T12:00:09Z' , '1063608780' , '4464130' , '120.346696' , '0.504647' );
1# llama.cpp/tools/llama-bench 2 3Performance testing tool for llama.cpp. 4 5## Table of contents 6 71. [Syntax](#syntax) 82. [Examples](#examples) 91. [Text generation with different models](#text-generation-with-different-models) 102. [Prompt processing with different batch sizes](#prompt-processing-with-different-batch-sizes) 113. [Different numbers of threads](#different-numbers-of-threads) 124. [Different numbers of layers offloaded to the GPU](#different-numbers-of-layers-offloaded-to-the-gpu) 133. [Output formats](#output-formats) 141. [Markdown](#markdown) 152. [CSV](#csv) 163. [JSON](#json) 174. [JSONL](#jsonl) 185. [SQL](#sql) 19 20## Syntax 21 22``` 23usage: llama-bench [options] 24 25options: 26-h, --help 27--numa <distribute|isolate|numactl> numa mode (default: disabled) 28-r, --repetitions <n> number of times to repeat each test (default: 5) 29--prio <-1|0|1|2|3> process/thread priority (default: 0) 30--delay <0...N> (seconds) delay between each test (default: 0) 31-o, --output <csv|json|jsonl|md|sql> output format printed to stdout (default: md) 32-oe, --output-err <csv|json|jsonl|md|sql> output format printed to stderr (default: none) 33--list-devices list available devices and exit 34-v, --verbose verbose output 35--progress print test progress indicators 36--no-warmup skip warmup runs before benchmarking 37-fitt, --fit-target <MiB> fit model to device memory with this margin per device in MiB (default: off) 38-fitc, --fit-ctx <n> minimum ctx size for --fit-target (default: 4096) 39-rpc, --rpc <rpc_servers> register RPC devices (comma separated) 40 41test parameters: 42-m, --model <filename> (default: models/7B/ggml-model-q4_0.gguf) 43-hf, -hfr, --hf-repo <user>/<model>[:quant] Hugging Face model repository; quant is optional, case-insensitive 44default to Q4_K_M, or falls back to the first file in the repo if Q4_K_M doesn't exist. 45example: ggml-org/GLM-4.7-Flash-GGUF:Q4_K_M 46(default: unused) 47-hff, --hf-file <file> Hugging Face model file. If specified, it will override the quant in --hf-repo 48(default: unused) 49-hft, --hf-token <token> Hugging Face access token 50(default: value from HF_TOKEN environment variable) 51-p, --n-prompt <n> (default: 512) 52-n, --n-gen <n> (default: 128) 53-pg <pp,tg> (default: ) 54-d, --n-depth <n> (default: 0) 55-b, --batch-size <n> (default: 2048) 56-ub, --ubatch-size <n> (default: 512) 57-ctk, --cache-type-k <t> (default: f16) 58-ctv, --cache-type-v <t> (default: f16) 59-t, --threads <n> (default: system dependent) 60-C, --cpu-mask <hex,hex> (default: 0x0) 61--cpu-strict <0|1> (default: 0) 62--poll <0...100> (default: 50) 63-ngl, --n-gpu-layers <n> (default: -1) 64-ncmoe, --n-cpu-moe <n> (default: 0) 65-sm, --split-mode <none|layer|row|tensor> (default: layer) 66-mg, --main-gpu <i> (default: 0) 67-nkvo, --no-kv-offload <0|1> (default: 0) 68-fa, --flash-attn <on|off|auto> (default: auto) 69-dev, --device <dev0/dev1/...> (default: auto) 70-lzm, --lazy-mode <on|auto|off> (default: auto) 71-mmp, --mmap <0|1> (DEPRECATED IN FAVOUR OF --load-mode) 72-dio, --direct-io <0|1> (DEPRECATED IN FAVOUR OF --load-mode) 73-embd, --embeddings <0|1> (default: 0) 74-ts, --tensor-split <ts0/ts1/..> (default: 0) 75-ot --override-tensor <tensor name pattern>=<buffer type>;... 76(default: disabled) 77-nopo, --no-op-offload <0|1> (default: 0) 78--no-host <0|1> (default: 0) 79 80Multiple values can be given for each parameter by separating them with ',' 81or by specifying the parameter multiple times. Ranges can be given as 82'first-last' or 'first-last+step' or 'first-last*mult'. 83``` 84 85llama-bench can perform three types of tests: 86 87- Prompt processing (pp): processing a prompt in batches (`-p`) 88- Text generation (tg): generating a sequence of tokens (`-n`) 89- Prompt processing + text generation (pg): processing a prompt followed by generating a sequence of tokens (`-pg`) 90 91With the exception of `-r`, `-o` and `-v`, all options can be specified multiple times to run multiple tests. Each pp and tg test is run with all combinations of the specified options. To specify multiple values for an option, the values can be separated by commas (e.g. `-n 16,32`), or the option can be specified multiple times (e.g. `-n 16 -n 32`). 92 93Each test is repeated the number of times given by `-r`, and the results are averaged. The results are given in average tokens per second (t/s) and standard deviation. Some output formats (e.g. json) also include the individual results of each repetition. 94 95Using the `-d <n>` option, each test can be run at a specified context depth, prefilling the KV cache with `<n>` tokens. 96 97For a description of the other options, see the [completion example](../completion/README.md). 98 99> [!NOTE] 100> The measurements with `llama-bench` do not include the times for tokenization and for sampling. 101 102## Examples 103 104### Text generation with different models 105 106``` sh 107$ ./llama-bench -m models/7B/ggml-model-q4_0.gguf -m models/13B/ggml-model-q4_0.gguf -p 0 -n 128,256,512 108``` 109 110| model | size | params | backend | ngl | test | t/s | 111| ------------------------------ | ---------: | ---------: | ---------- | --: | ---------- | ---------------: | 112| llama 7B mostly Q4_0 | 3.56 GiB | 6.74 B | CUDA | -1 | tg 128 | 132.19 ± 0.55 | 113| llama 7B mostly Q4_0 | 3.56 GiB | 6.74 B | CUDA | -1 | tg 256 | 129.37 ± 0.54 | 114| llama 7B mostly Q4_0 | 3.56 GiB | 6.74 B | CUDA | -1 | tg 512 | 123.83 ± 0.25 | 115| llama 13B mostly Q4_0 | 6.86 GiB | 13.02 B | CUDA | -1 | tg 128 | 82.17 ± 0.31 | 116| llama 13B mostly Q4_0 | 6.86 GiB | 13.02 B | CUDA | -1 | tg 256 | 80.74 ± 0.23 | 117| llama 13B mostly Q4_0 | 6.86 GiB | 13.02 B | CUDA | -1 | tg 512 | 78.08 ± 0.07 | 118 119### Prompt processing with different batch sizes 120 121``` sh 122$ ./llama-bench -n 0 -p 1024 -b 128,256,512,1024 123``` 124 125| model | size | params | backend | ngl | n_batch | test | t/s | 126| ------------------------------ | ---------: | ---------: | ---------- | --: | ---------: | ---------- | ---------------: | 127| llama 7B mostly Q4_0 | 3.56 GiB | 6.74 B | CUDA | -1 | 128 | pp 1024 | 1436.51 ± 3.66 | 128| llama 7B mostly Q4_0 | 3.56 GiB | 6.74 B | CUDA | -1 | 256 | pp 1024 | 1932.43 ± 23.48 | 129| llama 7B mostly Q4_0 | 3.56 GiB | 6.74 B | CUDA | -1 | 512 | pp 1024 | 2254.45 ± 15.59 | 130| llama 7B mostly Q4_0 | 3.56 GiB | 6.74 B | CUDA | -1 | 1024 | pp 1024 | 2498.61 ± 13.58 | 131 132### Different numbers of threads 133 134``` sh 135$ ./llama-bench -n 0 -n 16 -p 64 -t 1,2,4,8,16,32 136``` 137 138| model | size | params | backend | threads | test | t/s | 139| ------------------------------ | ---------: | ---------: | ---------- | ---------: | ---------- | ---------------: | 140| llama 7B mostly Q4_0 | 3.56 GiB | 6.74 B | CPU | 1 | pp 64 | 6.17 ± 0.07 | 141| llama 7B mostly Q4_0 | 3.56 GiB | 6.74 B | CPU | 1 | tg 16 | 4.05 ± 0.02 | 142| llama 7B mostly Q4_0 | 3.56 GiB | 6.74 B | CPU | 2 | pp 64 | 12.31 ± 0.13 | 143| llama 7B mostly Q4_0 | 3.56 GiB | 6.74 B | CPU | 2 | tg 16 | 7.80 ± 0.07 | 144| llama 7B mostly Q4_0 | 3.56 GiB | 6.74 B | CPU | 4 | pp 64 | 23.18 ± 0.06 | 145| llama 7B mostly Q4_0 | 3.56 GiB | 6.74 B | CPU | 4 | tg 16 | 12.22 ± 0.07 | 146| llama 7B mostly Q4_0 | 3.56 GiB | 6.74 B | CPU | 8 | pp 64 | 32.29 ± 1.21 | 147| llama 7B mostly Q4_0 | 3.56 GiB | 6.74 B | CPU | 8 | tg 16 | 16.71 ± 0.66 | 148| llama 7B mostly Q4_0 | 3.56 GiB | 6.74 B | CPU | 16 | pp 64 | 33.52 ± 0.03 | 149| llama 7B mostly Q4_0 | 3.56 GiB | 6.74 B | CPU | 16 | tg 16 | 15.32 ± 0.05 | 150| llama 7B mostly Q4_0 | 3.56 GiB | 6.74 B | CPU | 32 | pp 64 | 59.00 ± 1.11 | 151| llama 7B mostly Q4_0 | 3.56 GiB | 6.74 B | CPU | 32 | tg 16 | 16.41 ± 0.79 | 152 153### Different numbers of layers offloaded to the GPU 154 155``` sh 156$ ./llama-bench -ngl 10,20,30,31,32,33,34,35 157``` 158 159| model | size | params | backend | ngl | test | t/s | 160| ------------------------------ | ---------: | ---------: | ---------- | --: | ---------- | ---------------: | 161| llama 7B mostly Q4_0 | 3.56 GiB | 6.74 B | CUDA | 10 | pp 512 | 373.36 ± 2.25 | 162| llama 7B mostly Q4_0 | 3.56 GiB | 6.74 B | CUDA | 10 | tg 128 | 13.45 ± 0.93 | 163| llama 7B mostly Q4_0 | 3.56 GiB | 6.74 B | CUDA | 20 | pp 512 | 472.65 ± 1.25 | 164| llama 7B mostly Q4_0 | 3.56 GiB | 6.74 B | CUDA | 20 | tg 128 | 21.36 ± 1.94 | 165| llama 7B mostly Q4_0 | 3.56 GiB | 6.74 B | CUDA | 30 | pp 512 | 631.87 ± 11.25 | 166| llama 7B mostly Q4_0 | 3.56 GiB | 6.74 B | CUDA | 30 | tg 128 | 40.04 ± 1.82 | 167| llama 7B mostly Q4_0 | 3.56 GiB | 6.74 B | CUDA | 31 | pp 512 | 657.89 ± 5.08 | 168| llama 7B mostly Q4_0 | 3.56 GiB | 6.74 B | CUDA | 31 | tg 128 | 48.19 ± 0.81 | 169| llama 7B mostly Q4_0 | 3.56 GiB | 6.74 B | CUDA | 32 | pp 512 | 688.26 ± 3.29 | 170| llama 7B mostly Q4_0 | 3.56 GiB | 6.74 B | CUDA | 32 | tg 128 | 54.78 ± 0.65 | 171| llama 7B mostly Q4_0 | 3.56 GiB | 6.74 B | CUDA | 33 | pp 512 | 704.27 ± 2.24 | 172| llama 7B mostly Q4_0 | 3.56 GiB | 6.74 B | CUDA | 33 | tg 128 | 60.62 ± 1.76 | 173| llama 7B mostly Q4_0 | 3.56 GiB | 6.74 B | CUDA | 34 | pp 512 | 881.34 ± 5.40 | 174| llama 7B mostly Q4_0 | 3.56 GiB | 6.74 B | CUDA | 34 | tg 128 | 71.76 ± 0.23 | 175| llama 7B mostly Q4_0 | 3.56 GiB | 6.74 B | CUDA | 35 | pp 512 | 2400.01 ± 7.72 | 176| llama 7B mostly Q4_0 | 3.56 GiB | 6.74 B | CUDA | 35 | tg 128 | 131.66 ± 0.49 | 177 178### Different prefilled context 179 180``` 181$ ./llama-bench -d 0,512 182``` 183 184| model | size | params | backend | ngl | test | t/s | 185| ------------------------------ | ---------: | ---------: | ---------- | --: | --------------: | -------------------: | 186| qwen2 7B Q4_K - Medium | 4.36 GiB | 7.62 B | CUDA | -1 | pp512 | 7340.20 ± 23.45 | 187| qwen2 7B Q4_K - Medium | 4.36 GiB | 7.62 B | CUDA | -1 | tg128 | 120.60 ± 0.59 | 188| qwen2 7B Q4_K - Medium | 4.36 GiB | 7.62 B | CUDA | -1 | pp512 @ d512 | 6425.91 ± 18.88 | 189| qwen2 7B Q4_K - Medium | 4.36 GiB | 7.62 B | CUDA | -1 | tg128 @ d512 | 116.71 ± 0.60 | 190 191## Output formats 192 193By default, llama-bench outputs the results in markdown format. The results can be output in other formats by using the `-o` option. 194 195### Markdown 196 197``` sh 198$ ./llama-bench -o md 199``` 200 201| model | size | params | backend | ngl | test | t/s | 202| ------------------------------ | ---------: | ---------: | ---------- | --: | ---------- | ---------------: | 203| llama 7B mostly Q4_0 | 3.56 GiB | 6.74 B | CUDA | -1 | pp 512 | 2368.80 ± 93.24 | 204| llama 7B mostly Q4_0 | 3.56 GiB | 6.74 B | CUDA | -1 | tg 128 | 131.42 ± 0.59 | 205 206### CSV 207 208``` sh 209$ ./llama-bench -o csv 210``` 211 212``` csv 213build_commit,build_number,cpu_info,gpu_info,backends,model_filename,model_type,model_size,model_n_params,n_batch,n_ubatch,n_threads,cpu_mask,cpu_strict,poll,type_k,type_v,n_gpu_layers,n_cpu_moe,split_mode,main_gpu,no_kv_offload,flash_attn,devices,tensor_split,tensor_buft_overrides,use_mmap,use_direct_io,embeddings,no_op_offload,no_host,fit_target,fit_min_ctx,n_prompt,n_gen,n_depth,test_time,avg_ns,stddev_ns,avg_ts,stddev_ts 214"8cf427ff","5163","AMD Ryzen 7 7800X3D 8-Core Processor","NVIDIA GeForce RTX 4080","CUDA","models/Qwen2.5-7B-Instruct-Q4_K_M.gguf","qwen2 7B Q4_K - Medium","4677120000","7615616512","2048","512","8","0x0","0","50","f16","f16","-1","0","layer","0","0","-1","auto","0.00","none","1","0","0","0","0","0","0","512","0","0","2025-04-24T11:57:09Z","70285660","982040","7285.676949","100.064434" 215"8cf427ff","5163","AMD Ryzen 7 7800X3D 8-Core Processor","NVIDIA GeForce RTX 4080","CUDA","models/Qwen2.5-7B-Instruct-Q4_K_M.gguf","qwen2 7B Q4_K - Medium","4677120000","7615616512","2048","512","8","0x0","0","50","f16","f16","-1","0","layer","0","0","-1","auto","0.00","none","1","0","0","0","0","0","0","0","128","0","2025-04-24T11:57:10Z","1067431600","3834831","119.915244","0.430617" 216``` 217 218### JSON 219 220``` sh 221$ ./llama-bench -o json 222``` 223 224``` json 225[ 226{ 227"build_commit" : "8cf427ff" , 228"build_number" : 5163 , 229"cpu_info" : "AMD Ryzen 7 7800X3D 8-Core Processor" , 230"gpu_info" : "NVIDIA GeForce RTX 4080" , 231"backends" : "CUDA" , 232"model_filename" : "models/Qwen2.5-7B-Instruct-Q4_K_M.gguf" , 233"model_type" : "qwen2 7B Q4_K - Medium" , 234"model_size" : 4677120000 , 235"model_n_params" : 7615616512 , 236"n_batch" : 2048 , 237"n_ubatch" : 512 , 238"n_threads" : 8 , 239"cpu_mask" : "0x0" , 240"cpu_strict" : false , 241"poll" : 50 , 242"type_k" : "f16" , 243"type_v" : "f16" , 244"n_gpu_layers" : -1 , 245"n_cpu_moe" : 0 , 246"split_mode" : "layer" , 247"main_gpu" : 0 , 248"no_kv_offload" : false , 249"flash_attn" : -1 , 250"devices" : "auto" , 251"tensor_split" : "0.00" , 252"tensor_buft_overrides" : "none" , 253"use_mmap" : true , 254"use_direct_io" : false , 255"embeddings" : false , 256"no_op_offload" : 0 , 257"no_host" : false , 258"fit_target" : 0 , 259"fit_min_ctx" : 0 , 260"n_prompt" : 512 , 261"n_gen" : 0 , 262"n_depth" : 0 , 263"test_time" : "2025-04-24T11:58:50Z" , 264"avg_ns" : 72135640 , 265"stddev_ns" : 1453752 , 266"avg_ts" : 7100.002165 , 267"stddev_ts" : 140.341520 , 268"samples_ns" : [ 74601900 , 71632900 , 71745200 , 71952700 , 70745500 ], 269"samples_ts" : [ 6863.1 , 7147.55 , 7136.37 , 7115.79 , 7237.21 ] 270}, 271{ 272"build_commit" : "8cf427ff" , 273"build_number" : 5163 , 274"cpu_info" : "AMD Ryzen 7 7800X3D 8-Core Processor" , 275"gpu_info" : "NVIDIA GeForce RTX 4080" , 276"backends" : "CUDA" , 277"model_filename" : "models/Qwen2.5-7B-Instruct-Q4_K_M.gguf" , 278"model_type" : "qwen2 7B Q4_K - Medium" , 279"model_size" : 4677120000 , 280"model_n_params" : 7615616512 , 281"n_batch" : 2048 , 282"n_ubatch" : 512 , 283"n_threads" : 8 , 284"cpu_mask" : "0x0" , 285"cpu_strict" : false , 286"poll" : 50 , 287"type_k" : "f16" , 288"type_v" : "f16" , 289"n_gpu_layers" : -1 , 290"n_cpu_moe" : 0 , 291"split_mode" : "layer" , 292"main_gpu" : 0 , 293"no_kv_offload" : false , 294"flash_attn" : -1 , 295"devices" : "auto" , 296"tensor_split" : "0.00" , 297"tensor_buft_overrides" : "none" , 298"use_mmap" : true , 299"use_direct_io" : false , 300"embeddings" : false , 301"no_op_offload" : 0 , 302"no_host" : false , 303"fit_target" : 0 , 304"fit_min_ctx" : 0 , 305"n_prompt" : 0 , 306"n_gen" : 128 , 307"n_depth" : 0 , 308"test_time" : "2025-04-24T11:58:51Z" , 309"avg_ns" : 1076767880 , 310"stddev_ns" : 9449585 , 311"avg_ts" : 118.881588 , 312"stddev_ts" : 1.041811 , 313"samples_ns" : [ 1075361300 , 1065089400 , 1071761200 , 1081934900 , 1089692600 ], 314"samples_ts" : [ 119.03 , 120.178 , 119.43 , 118.307 , 117.464 ] 315} 316] 317``` 318 319 320### JSONL 321 322``` sh 323$ ./llama-bench -o jsonl 324``` 325 326``` json lines 327{ "build_commit" : "8cf427ff" , "build_number" : 5163 , "cpu_info" : "AMD Ryzen 7 7800X3D 8-Core Processor" , "gpu_info" : "NVIDIA GeForce RTX 4080" , "backends" : "CUDA" , "model_filename" : "models/Qwen2.5-7B-Instruct-Q4_K_M.gguf" , "model_type" : "qwen2 7B Q4_K - Medium" , "model_size" : 4677120000 , "model_n_params" : 7615616512 , "n_batch" : 2048 , "n_ubatch" : 512 , "n_threads" : 8 , "cpu_mask" : "0x0" , "cpu_strict" : false , "poll" : 50 , "type_k" : "f16" , "type_v" : "f16" , "n_gpu_layers" : -1 , "n_cpu_moe" : 0 , "split_mode" : "layer" , "main_gpu" : 0 , "no_kv_offload" : false , "flash_attn" : -1 , "devices" : "auto" , "tensor_split" : "0.00" , "tensor_buft_overrides" : "none" , "use_mmap" : true , "use_direct_io" : false , "embeddings" : false , "no_op_offload" : 0 , "no_host" : false , "fit_target" : 0 , "fit_min_ctx" : 0 , "n_prompt" : 512 , "n_gen" : 0 , "n_depth" : 0 , "test_time" : "2025-04-24T11:59:33Z" , "avg_ns" : 70497220 , "stddev_ns" : 883196 , "avg_ts" : 7263.609157 , "stddev_ts" : 90.940578 , "samples_ns" : [ 71551000 , 71222800 , 70364100 , 69439100 , 69909100 ], "samples_ts" : [ 7155.74 , 7188.71 , 7276.44 , 7373.37 , 7323.8 ]} 328{ "build_commit" : "8cf427ff" , "build_number" : 5163 , "cpu_info" : "AMD Ryzen 7 7800X3D 8-Core Processor" , "gpu_info" : "NVIDIA GeForce RTX 4080" , "backends" : "CUDA" , "model_filename" : "models/Qwen2.5-7B-Instruct-Q4_K_M.gguf" , "model_type" : "qwen2 7B Q4_K - Medium" , "model_size" : 4677120000 , "model_n_params" : 7615616512 , "n_batch" : 2048 , "n_ubatch" : 512 , "n_threads" : 8 , "cpu_mask" : "0x0" , "cpu_strict" : false , "poll" : 50 , "type_k" : "f16" , "type_v" : "f16" , "n_gpu_layers" : -1 , "n_cpu_moe" : 0 , "split_mode" : "layer" , "main_gpu" : 0 , "no_kv_offload" : false , "flash_attn" : -1 , "devices" : "auto" , "tensor_split" : "0.00" , "tensor_buft_overrides" : "none" , "use_mmap" : true , "use_direct_io" : false , "embeddings" : false , "no_op_offload" : 0 , "no_host" : false , "fit_target" : 0 , "fit_min_ctx" : 0 , "n_prompt" : 0 , "n_gen" : 128 , "n_depth" : 0 , "test_time" : "2025-04-24T11:59:33Z" , "avg_ns" : 1068078400 , "stddev_ns" : 6279455 , "avg_ts" : 119.844681 , "stddev_ts" : 0.699739 , "samples_ns" : [ 1066331700 , 1064864900 , 1079042600 , 1063328400 , 1066824400 ], "samples_ts" : [ 120.038 , 120.203 , 118.624 , 120.377 , 119.982 ]} 329``` 330 331 332### SQL 333 334SQL output is suitable for importing into a SQLite database. The output can be piped into the `sqlite3` command line tool to add the results to a database. 335 336``` sh 337$ ./llama-bench -o sql 338``` 339 340``` sql 341CREATE TABLE IF NOT EXISTS llama_bench ( 342build_commit TEXT , 343build_number INTEGER , 344cpu_info TEXT , 345gpu_info TEXT , 346backends TEXT , 347model_filename TEXT , 348model_type TEXT , 349model_size INTEGER , 350model_n_params INTEGER , 351n_batch INTEGER , 352n_ubatch INTEGER , 353n_threads INTEGER , 354cpu_mask TEXT , 355cpu_strict INTEGER , 356poll INTEGER , 357type_k TEXT , 358type_v TEXT , 359n_gpu_layers INTEGER , 360n_cpu_moe INTEGER , 361split_mode TEXT , 362main_gpu INTEGER , 363no_kv_offload INTEGER , 364flash_attn INTEGER , 365devices TEXT , 366tensor_split TEXT , 367tensor_buft_overrides TEXT , 368use_mmap INTEGER , 369use_direct_io INTEGER , 370embeddings INTEGER , 371no_op_offload INTEGER , 372no_host INTEGER , 373fit_target INTEGER , 374fit_min_ctx INTEGER , 375n_prompt INTEGER , 376n_gen INTEGER , 377n_depth INTEGER , 378test_time TEXT , 379avg_ns INTEGER , 380stddev_ns INTEGER , 381avg_ts REAL , 382stddev_ts REAL 383); 384 385INSERT INTO llama_bench (build_commit, build_number, cpu_info, gpu_info, backends, model_filename, model_type, model_size, model_n_params, n_batch, n_ubatch, n_threads, cpu_mask, cpu_strict, poll, type_k, type_v, n_gpu_layers, n_cpu_moe, split_mode, main_gpu, no_kv_offload, flash_attn, devices, tensor_split, tensor_buft_overrides, use_mmap, use_direct_io, embeddings, no_op_offload, no_host, fit_target, fit_min_ctx, n_prompt, n_gen, n_depth, test_time, avg_ns, stddev_ns, avg_ts, stddev_ts) VALUES ( '8cf427ff' , '5163' , 'AMD Ryzen 7 7800X3D 8-Core Processor' , 'NVIDIA GeForce RTX 4080' , 'CUDA' , 'models/Qwen2.5-7B-Instruct-Q4_K_M.gguf' , 'qwen2 7B Q4_K - Medium' , '4677120000' , '7615616512' , '2048' , '512' , '8' , '0x0' , '0' , '50' , 'f16' , 'f16' , '-1' , '0' , 'layer' , '0' , '0' , '-1' , 'auto' , '0.00' , 'none' , '1' , '0' , '0' , '0' , '0' , '0' , '0' , '512' , '0' , '0' , '2025-04-24T12:00:08Z' , '69905000' , '519516' , '7324.546977' , '54.032613' ); 386INSERT INTO llama_bench (build_commit, build_number, cpu_info, gpu_info, backends, model_filename, model_type, model_size, model_n_params, n_batch, n_ubatch, n_threads, cpu_mask, cpu_strict, poll, type_k, type_v, n_gpu_layers, n_cpu_moe, split_mode, main_gpu, no_kv_offload, flash_attn, devices, tensor_split, tensor_buft_overrides, use_mmap, use_direct_io, embeddings, no_op_offload, no_host, fit_target, fit_min_ctx, n_prompt, n_gen, n_depth, test_time, avg_ns, stddev_ns, avg_ts, stddev_ts) VALUES ( '8cf427ff' , '5163' , 'AMD Ryzen 7 7800X3D 8-Core Processor' , 'NVIDIA GeForce RTX 4080' , 'CUDA' , 'models/Qwen2.5-7B-Instruct-Q4_K_M.gguf' , 'qwen2 7B Q4_K - Medium' , '4677120000' , '7615616512' , '2048' , '512' , '8' , '0x0' , '0' , '50' , 'f16' , 'f16' , '-1' , '0' , 'layer' , '0' , '0' , '-1' , 'auto' , '0.00' , 'none' , '1' , '0' , '0' , '0' , '0' , '0' , '0' , '0' , '128' , '0' , '2025-04-24T12:00:09Z' , '1063608780' , '4464130' , '120.346696' , '0.504647' ); 387```