[FEAT] Parse prompt and total token throughput from GuideLLM#29
Open
VincentG1234 wants to merge 1 commit into
Open
[FEAT] Parse prompt and total token throughput from GuideLLM#29VincentG1234 wants to merge 1 commit into
VincentG1234 wants to merge 1 commit into
Conversation
Expose prompt_tokens_per_second and tokens_per_second in detailed_metrics so they can be used in log_metrics and objectives (guidellm>=0.5.4). Signed-off-by: Vincent Gimenes <vincent.gimenes@gmail.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Exposes GuideLLM prompt (prefill) throughput and combined prompt+decode throughput by parsing prompt_tokens_per_second and tokens_per_second into trial detailed_metrics, and wiring these base metrics into objective/log-metrics validation and documentation.
Changes:
- Parse
prompt_tokens_per_secondandtokens_per_secondfrom GuideLLM benchmark JSON and include them in the required metrics set. - Extend objective/log-metrics validation to accept the two new base metrics (and their percentile-suffixed identifiers).
- Document the new metrics and add a commented
log_metricsexample in sample configs/docs.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
auto_tune_vllm/benchmarks/providers.py |
Adds parsing/required-metric handling for prompt_tokens_per_second and tokens_per_second from GuideLLM results. |
auto_tune_vllm/core/config.py |
Adds the new base metrics to ObjectiveConfig.valid_metrics so they can be used in objectives/expressions and log_metrics. |
docs/configuration.md |
Documents the new metrics and adds a log_metrics example including prompt_tokens_per_second_median. |
examples/README_optimization_guide.md |
Extends the metrics table to include prompt and combined throughput metrics. |
examples/study_config.yaml |
Adds a commented log_metrics example entry for prompt_tokens_per_second_median. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
395
to
403
| required_metrics = [ | ||
| "requests_per_second", | ||
| "request_latency", | ||
| "output_tokens_per_second", | ||
| "prompt_tokens_per_second", | ||
| "tokens_per_second", | ||
| "time_to_first_token_ms", | ||
| "inter_token_latency_ms", | ||
| ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Expose GuideLLM
prompt_tokens_per_second(input/prefill throughput) andtokens_per_second(prompt + output) in trialdetailed_metrics, so they can be used inoptimization.log_metrics, objectives, and the Optuna dashboard alongside existing output throughput metrics.Why
Users want to track prompt/input throughput in Optuna user attrs (
log_metrics) and optionally optimize or compare prefill vs decode performance. GuideLLM has emitted these metrics since the v0.4+ stats refactor; auto-tuning only parsed the original five benchmark scalars.What changed
auto_tune_vllm/benchmarks/providers.py— parseprompt_tokens_per_secondandtokens_per_secondfrom GuideLLM JSON (totalcategory, same loop as existing metrics).auto_tune_vllm/core/config.py— add both base metrics toObjectiveConfig.valid_metrics(objectives, expressions,log_metricsvalidation).docs/configuration.md— document new metrics andlog_metricsexample.examples/README_optimization_guide.md— metrics table.examples/study_config.yaml— commentedlog_metricsexample.How tested
ruff check .pytest -v tests/(full suite)auto-tune-vllm optimizewithlog_metricsincludingprompt_tokens_per_second_medianVerified parsing against
guidellm/benchmarks_mp.json(GuideLLM >= 0.5.4 export).Risks / limitations
prompt_tokens_per_second(e.g. very old JSON exports). Project already requiresguidellm>=0.5.4inpyproject.toml.tokens_per_secondwas already present in many JSON files but was not parsed until this PR.Links
log_metrics→ Optuna user attrs)