llama.cpp icon indicating copy to clipboard operation
llama.cpp copied to clipboard

llama-bench: add `-d` depth arg

Open thevishalagarwal opened this issue 10 months ago • 0 comments

Add -d or --n-depth arg in llama-bench to run tests with prefilled KV cache context

Relevant discussion https://github.com/ggml-org/llama.cpp/pull/12874

Sample output

$ .\llama-bench.exe -d 0,512

| model                          |       size |     params | backend    | ngl |            test |                  t/s |
| ------------------------------ | ---------: | ---------: | ---------- | --: | --------------: | -------------------: |
| qwen2 7B Q4_K - Medium         |   4.36 GiB |     7.62 B | CUDA       |  99 |           pp512 |      7340.20 ± 23.45 |
| qwen2 7B Q4_K - Medium         |   4.36 GiB |     7.62 B | CUDA       |  99 |           tg128 |        120.60 ± 0.59 |
| qwen2 7B Q4_K - Medium         |   4.36 GiB |     7.62 B | CUDA       |  99 |    pp512 @ d512 |      6425.91 ± 18.88 |
| qwen2 7B Q4_K - Medium         |   4.36 GiB |     7.62 B | CUDA       |  99 |    tg128 @ d512 |        116.71 ± 0.60 |

thevishalagarwal avatar Apr 24 '25 12:04 thevishalagarwal