Repository navigation
Conversation
Live replies are discarded and the next turn is built from the recording, so a longer or shorter live reply changes the output token count and the throughput without changing anything else. The scenario allows EOS and does not lock output-shaping --extra-inputs. - agentperf-v2 requires ignore_eos, so each reply runs to the turn's max_tokens. - New require_turn_max_tokens scenario field: the DAG loader rejects a dataset in which any turn lacks max_tokens. - New forbid_extra_input_keys scenario field: agentperf-v2 rejects --extra-inputs keys that would override output length, stop, reasoning or sampling settings. Requires a dataset release that sets each turn's max_tokens to its recorded output token count. Signed-off-by: Bofeng Luo <bofengl@nvidia.com>
Try out this PRQuick install: pip install --upgrade --force-reinstall git+https://github.com/ai-dynamo/aiperf.git@0acfcfe1de3c818f3ccbd6075a0ad7535dfb1172Recommended with virtual environment (using uv): uv venv --python 3.12 && source .venv/bin/activate
uv pip install --upgrade --force-reinstall git+https://github.com/ai-dynamo/aiperf.git@0acfcfe1de3c818f3ccbd6075a0ad7535dfb1172Last updated for commit: |
Signed-off-by: Bofeng Luo <bofengl@nvidia.com>
Signed-off-by: Bofeng Luo <bofengl@nvidia.com>
roborluo
marked this pull request as ready for review
November 12, 2026 23:45
- Skip turns that send no request (orchestrator turns) in the per-turn max_tokens check, so orchestrator sessions load. - Reject request turns whose per-turn extra sets ignore_eos=false or a forbidden key, since per-turn extra is merged last. - New require_endpoint_types scenario field; agentperf-v2 accepts only the chat endpoint, so a payload template cannot replace max_tokens. - Extend the forbidden --extra-inputs keys (stop_regex, reasoning, structured outputs, payload_template, more sampling keys) and list them accurately in the tutorial. Signed-off-by: Bofeng Luo <bofengl@nvidia.com>
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.
Problem
Live replies are discarded and the next turn is built from the recording. A longer or shorter live reply therefore changes only the output token count, and with it the output tokens per second, without changing anything the server has to do next. The scenario allows EOS and does not lock output-shaping
--extra-inputs(max_tokens,min_tokens,stop, reasoning effort, chat-template options, sampling), so reply length varies with sampling and with submitter settings.Change
agentperf-v2setsrequire_ignore_eos=True, so each reply runs to its turn'smax_tokens.ScenarioSpec.require_turn_max_tokens: the DAG loader rejects a dataset in which any request turn lacksmax_tokens, or whose per-turnextrasetsignore_eos=falseor a forbidden key (per-turnextrais merged last). Turns that send no request, such as orchestrator turns, are skipped. This is a load error, so--unsafe-overridedoes not bypass it.ScenarioSpec.forbid_extra_input_keys:agentperf-v2rejects--extra-inputskeys that would override output length or stopping, reasoning, chat templates, constrained decoding or the main sampling settings. Extra inputs are merged into each request body after the per-turnmax_tokens, so they would otherwise replace it.ScenarioSpec.require_endpoint_types:agentperf-v2accepts only--endpoint-type chat, so a custom payload template cannot replacemax_tokens.Dataset side (needed before merge)
max_tokensto that turn's recorded output token count (thecompletion_tokensof the recorded response, reasoning and tool-call tokens included). That is more exact than any client-side retokenization.max_tokens.Follow-up (not in this PR)
A per-run check that each reply's streamed token count matches its turn's
max_tokenswould catch servers that stop early despiteignore_eos.Tests
tests/unit/dataset/loader/test_dag_jsonl_turn_max_tokens.py: agentperf-v2 accepts turns withmax_tokens, rejects a request turn without it or with an overriding per-turnextra, and accepts orchestrator sessions. No requirement without a scenario or under another scenario.tests/unit/common/scenario/test_agentperf_v2_output_length.py: agentperf-v2 injectsignore_eos, rejects each output-shaping--extra-inputskey, and rejects the template and completions endpoints.🤖 Generated with Claude Code