Skip to content

fix(agentx): use 10 output tokens for agentic warmup requests - #74

Closed
whiz-Tuhin wants to merge 1 commit into
SemiAnalysisAI:masterfrom
whiz-Tuhin:warmup-max-tokens-10
Closed

whiz-Tuhin wants to merge 1 commit into
SemiAnalysisAI:masterfrom
whiz-Tuhin:warmup-max-tokens-10

Conversation

@whiz-Tuhin

@whiz-Tuhin whiz-Tuhin commented Nov 17, 2026 •

Copy link
Copy Markdown

What changed

  • _WARMUP_MAX_TOKENS in src/aiperf/timing/strategies/agentic_replay.py goes from 1 to 10. It caps the output length of every agentic warmup request (snapshot primers and the cache-pressure stage). Profiling requests are unchanged.
  • The warmup tests in tests/unit/timing/strategies/test_agentic_replay.py now assert against the constant instead of the literal 1.
  • The --agentic-cache-warmup-duration help text said "one-token outputs"; it now says "outputs capped at 10 tokens". docs/cli-options.md and the config schema are regenerated.

Why

With 1 output token the prefill produces the only token, so warmup never runs decode. With 10, warmup now exercises the decode path, including the KV transfer in disaggregated serving.

How tested

  • make test: all unit tests pass except tests/unit/property/test_finite_invariants.py::test_every_numeric_field_has_bounds, which fails the same way on master (ScenarioSpec.environment_defaults has no numeric bound), unrelated to this change.
  • The updated warmup tests fail if the constant and the test values disagree, and the existing profiling assertion (max_tokens_override is None) still passes.
  • ruff check, ruff format, make check-ergonomics, make check-ruff-baselined, make check-config-schema pass.

Relation to PR 68

PR 68 makes the synthesized agentic warmup opt-in (--agentic-warmup) but keeps the warmup code path and this constant. The two changes are independent: this one sets the output length used when the warmup runs. A trial merge of the two branches gives no conflict in the files this PR touches.

Signed-off-by is on the commit (DCO).


Note

Low Risk
Scoped to agentic replay warmup request shaping and docs; profiling behavior is unchanged, with a modest increase in warmup decode load.

Overview
Raises _WARMUP_MAX_TOKENS in agentic_replay.py from 1 to 10, so agentic replay warmup (snapshot primers and cache-pressure stage) requests cap output length at 10 tokens instead of 1. Profiling turns are unchanged (max_tokens_override stays unset).

CLI/config help and regenerated docs/cli-options.md now describe “outputs capped at 10 tokens” for --agentic-cache-warmup-duration. Unit tests import the constant and assert against _WARMUP_MAX_TOKENS instead of the literal 1.

Reviewed by Cursor Bugbot for commit d1dd085. Bugbot is set up for automated code reviews on this repo. Configure here.

Warmup capped every request at 1 output token, which the prefill
produces alone, so warmup never ran the decode path or, in
disaggregated serving, the KV transfer to decode. Raise the cap to 10,
have the tests reference the constant, and update the
--agentic-cache-warmup-duration help text and generated docs.

Signed-off-by: Tuhin Khare <tkhare@nvidia.com>
@github-actions

Copy link
Copy Markdown

Try out this PR

Quick install:

pip install --upgrade --force-reinstall git+https://github.com/ai-dynamo/aiperf.git@d1dd085779ab2fdeb08004e67ccd43e36f07b3ee

Recommended 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@d1dd085779ab2fdeb08004e67ccd43e36f07b3ee

Last updated for commit: d1dd085 • Browse code

@cquil11

cquil11 commented Dec 3, 2026

Copy link
Copy Markdown

Moved upstream as ai-dynamo#1795, with your commit and authorship kept. Once it merges there we will cherry-pick it into sync/agentx-v1.1, so it ships with the 1.1 line and 1.0.x stays at one token.

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