Skip to content

llama-bench : log benchmark progress - #9287

Merged
slaren merged 2 commits into
ggml-org:masterfrom
akx:benchmark-progress
Sep 6, 2024
Merged

llama-bench : log benchmark progress#9287
slaren merged 2 commits into
ggml-org:masterfrom
akx:benchmark-progress

Conversation

@akx

@akx akx commented Sep 3, 2024

Copy link
Copy Markdown
Contributor

Simply adds logging for the parameter set index and number of parameter sets before each test in llama-bench, to make it easier to gauge how long it'll still take.


@akx
akx force-pushed the benchmark-progress branch from b3ff9a5 to 893f9f4 Compare September 3, 2024 13:14
@slaren

slaren commented Sep 3, 2024

Copy link
Copy Markdown
Member

This will break every use case except when redirecting stdout.

@slaren

slaren commented Sep 3, 2024

Copy link
Copy Markdown
Member

Are you aware that you can use -oe to choose a printer to use with stderr?

I could see this implemented as type of printer that only prints a detailed progress report so that you can use eg. llama-bench -o json -oe progress > out.json. You can add more methods to the printer class if necessary to be able to print a more detailed progress progress. Do not use the LOG macro.

@akx

akx commented Sep 3, 2024

Copy link
Copy Markdown
Contributor Author

This will break every use case except when redirecting stdout.

Every use case? 😱 😄

Fair, I added a commit to only print them when -verbose (i.e. when you'd get more stuff on stderr anyway). Would that work?

Are you aware that you can use -oe to choose a printer to use with stderr?

Yep, I am (via #9288 :) )

@akx
akx force-pushed the benchmark-progress branch from 7c3023e to 02ac357 Compare September 4, 2024 06:49
@akx

akx commented Sep 4, 2024

Copy link
Copy Markdown
Contributor Author

@slaren Mind taking another look? Thanks :)

@slaren

slaren commented Sep 5, 2024

Copy link
Copy Markdown
Member

I do not really see the point of this change. Even with verbose, this would add output that I would rather not see in verbose mode. It seems that it is trying to solve the same problem for which -oe was added, and for me that works well enough.

@akx

akx commented Sep 5, 2024

Copy link
Copy Markdown
Contributor Author

My UC is simply being able to see the progress of a benchmark run more granularly.

For instance, it's not quite clear that there's a warmup thing – I was initially mightily confused seeing 6 llama_print_timingses for what was supposed to be a 5-benchmark run, etc.

I think progress indication is also useful to figure out if e.g. a remote benchmark run may have crashed or timed out.

@slaren

slaren commented Sep 6, 2024

Copy link
Copy Markdown
Member

I wouldn't want to see this even in verbose mode, but that wouldn't be a problem if it was optional and gated behind a command line parameter. Also please change the LOG to fprintf to stderr directly, the logging library is not used in llama-bench.

@akx

akx commented Sep 6, 2024

Copy link
Copy Markdown
Contributor Author

but that wouldn't be a problem if it was optional and gated behind a command line parameter.

Sure.

Also please change the LOG to fprintf to stderr directly

Will do.

the logging library is not used in llama-bench.

It is (since #8672 last week), which is why I was using it:

https://github.com/ggerganov/llama.cpp/blob/8ebe8ddebd68526757c631cd019de009697c63c2/examples/llama-bench/llama-bench.cpp#L1559

https://github.com/ggerganov/llama.cpp/blob/8ebe8ddebd68526757c631cd019de009697c63c2/examples/llama-bench/llama-bench.cpp#L1568

Should these get changed too?

@akx
akx force-pushed the benchmark-progress branch from 02ac357 to eb9f945 Compare September 6, 2024 09:43
@slaren

slaren commented Sep 6, 2024

Copy link
Copy Markdown
Member

Should these get changed too?

Yes, thanks for pointing that. It can be done in a different PR.
Edit: pushed a fix together with other fix.

@slaren
slaren merged commit 134bc38 into ggml-org:master Sep 6, 2024
dsx1986 pushed a commit to dsx1986/llama.cpp that referenced this pull request Oct 29, 2024
* llama-bench : add optional progress messages
arthw pushed a commit to arthw/llama.cpp that referenced this pull request Nov 15, 2024
* llama-bench : add optional progress messages
arthw pushed a commit to arthw/llama.cpp that referenced this pull request Nov 18, 2024
* llama-bench : add optional progress messages
Seunghhon pushed a commit to Seunghhon/llama.cpp that referenced this pull request Apr 26, 2026
* llama-bench : add optional progress messages
ljubomirj pushed a commit to ljubomirj/llama.cpp that referenced this pull request May 6, 2026
* llama-bench : add optional progress messages
my-other-github-account pushed a commit to my-other-github-account/llama.cpp that referenced this pull request May 15, 2026
* llama-bench : add optional progress messages
my-other-github-account pushed a commit to my-other-github-account/llama.cpp that referenced this pull request May 15, 2026
* llama-bench : add optional progress messages
phibya pushed a commit to ziee-ai/llama.cpp that referenced this pull request May 29, 2026
* llama-bench : add optional progress messages
AlexiAlp pushed a commit to minghaop/llama.cpp that referenced this pull request Jun 2, 2026
* llama-bench : add optional progress messages
AlexiAlp pushed a commit to minghaop/llama.cpp that referenced this pull request Jun 2, 2026
* llama-bench : add optional progress messages
fukuro-kun pushed a commit to fukuro-kun/fukuro-llama-cpp-turboquant that referenced this pull request Jul 5, 2026
* llama-bench : add optional progress messages
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants