Skip to content

llama-bench: support --version to print build info - #28971

Merged
taronaeo merged 2 commits into
ggml-org:masterfrom
GGUF-LLM-Test:llama-bench/version
Sep 16, 2026
Merged

taronaeo merged 2 commits into
ggml-org:masterfrom
GGUF-LLM-Test:llama-bench/version

Conversation

@asbelin

@asbelin asbelin commented Sep 15, 2026 •

Copy link
Copy Markdown
Contributor

Adds a --version\ command-line flag to llama-bench for parity with other llama.cpp tools (e.g. llama-perplexity) that support it.

Changes

  • \llama-bench --version\ now prints build/version info via \llama_print_build_info(llama_version())\ (build number, commit, compiler, target) to stderr and exits 0
  • identical behavior to the common --version\ option registered in \common/arg.cpp\ (used by llama-perplexity)
  • documents the flag in \print_usage\

No new dependencies: \build-info.h, \llama.h, and <cstdlib>\ are already included by llama-bench.cpp. Base is v0.4.1; llama-bench.cpp is unchanged between v0.4.1 and master.

Add a --version command-line flag that prints build/version info via llama_print_build_info(llama_version()) and exits 0, for parity with llama-perplexity and other llama.cpp tools.

@nikwen nikwen left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested locally and it works:

nikwen@MacBook-Pro llama.cpp % ./build/bin/llama-bench --version      
version: 0.4.1-dev (build 10991, commit 930e2fa59)
built with AppleClang 21.0.0.21000334 for Darwin arm64

The output is identical to what llama-cli prints.

@nikwen nikwen added the merge ready A maintainer can use this label to indicate that they consider the changes final and ready to merge. label Sep 16, 2026
@taronaeo
taronaeo merged commit e13469a into ggml-org:master Sep 16, 2026
26 of 27 checks passed
quimmedes pushed a commit to quimmedes/cafe-llama.cpp that referenced this pull request Sep 16, 2026
zsogitbe pushed a commit to zsogitbe/llama.cpp that referenced this pull request Sep 17, 2026
frostyautumnleaf pushed a commit to frostyautumnleaf/llama.cpp that referenced this pull request Oct 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

examples merge ready A maintainer can use this label to indicate that they consider the changes final and ready to merge.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants