Add Python inference benchmark CLI#694
Open
RitwijParmar wants to merge 3 commits into
Open
Conversation
Author
|
I pushed a follow-up that turns this into more of a regression harness rather than just a runner. New pieces:
I also added tests around the sweep generation, comparison logic, Markdown output, and parser paths. |
RitwijParmar
force-pushed
the
codex/cactus-inference-benchmark-cli
branch
from
June 9, 2026 22:03
fb04db1 to
c688914
Compare
Author
|
Rebased this on current main and resolved the CLI conflicts. The benchmark command now sits next to the newer run/list/test CLI changes instead of replacing them. I also checked the touched Python files with Python 3.11 compile. Local pytest is not available in this environment, so I could not run the focused pytest here. |
RitwijParmar
force-pushed
the
codex/cactus-inference-benchmark-cli
branch
from
June 10, 2026 16:16
c688914 to
1b9d74a
Compare
Signed-off-by: Ritwij Aryan Parmar <ritwij.aryan.parmar@gmail.com>
Signed-off-by: Ritwij Aryan Parmar <ritwij.aryan.parmar@gmail.com>
Signed-off-by: Ritwij Aryan Parmar <ritwij.aryan.parmar@gmail.com>
RitwijParmar
force-pushed
the
codex/cactus-inference-benchmark-cli
branch
from
June 10, 2026 17:13
96ae88f to
b54ff28
Compare
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.
Adds a
cactus benchmarkcommand for repeatable local inference measurements from the Python CLI.Why this felt useful: the Python API already returns TTFT, prefill throughput, decode throughput, RAM, and token counts, but there was not a small built-in way to run the same prompt profiles repeatedly and save artifacts for comparing runtime, quantization, or long-context changes.
What changed:
--keep-cachewhen cache reuse is intentionalI used Codex to help implement and test this, and reviewed the code locally before opening the PR.
Tests:
/Users/ritwij/Documents/oss-work/cactus/.venv-codex/bin/python -m pytest python/tests/test_cli_benchmark.py python/tests/test_cli_run.py -q/Users/ritwij/Documents/oss-work/cactus/.venv-codex/bin/python -m pytest python/tests/test_bindings.py::TestCliParser python/tests/test_cli_benchmark.py -qBoth passed locally before I removed the temporary test venv.