AI Infra Bench
AI Infra Bench measures OpenAI-compatible inference endpoints, evaluates model outputs, and finds the highest load that satisfies a service-level objective. It is backend-independent and does not require a serving framework SDK.
Install
pip install ai-infra-bench
Python 3.10 or newer is required.
CLI
Send one request:
aib req --base-url http://127.0.0.1:30000 --prompt "Who are you?"
Run a random-token benchmark:
aib bench \
--base-url http://127.0.0.1:30000 \
--dataset random \
--input-len 1024 \
--output-len 256 \
--num-requests 100 \
--max-concurrency 16
Other commands cover dataset evaluation, logits and hidden-state comparison, metric plotting, and local Prometheus monitoring:
aib --help
SLO Search
SLO searches are configured in YAML. The command probes the configured range
and returns the highest max_concurrency or request_rate that satisfies every
condition:
endpoint:
base_url: http://127.0.0.1:30000
api_key: EMPTY
model: null
request:
payload:
messages:
- role: user
content: hello
benchmark:
num_requests: 100
warmup_requests: 5
max_concurrency: 32
request_rate: inf
search:
parameter: max_concurrency
min: 1
max: 64
conditions:
- metric: success_rate
operator: ">="
value: 0.99
- metric: p99_latency_ms
operator: "<"
value: 3000
Run it with:
aib slo examples/slo.yaml -o slo-result.yaml
Output
SLO runs write a YAML report with every probe, its metrics, and condition results. Request benchmarks can also write machine-readable JSON or JSONL metrics for later visualization.
Development
python -m pip install -e .
pytest
Licensed under the Apache License 2.0.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ai_infra_bench-0.1.4.post4.tar.gz.
File metadata
- Download URL: ai_infra_bench-0.1.4.post4.tar.gz
- Upload date:
- Size: 73.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.12.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fc72b4954e82f092ec008959ea30149c99dc8ec256424c481fc688a60fcbb232
|
|
| MD5 |
fb79e612576e4883b6ee96f78869d4b5
|
|
| BLAKE2b-256 |
b32a9f6f00fa996a36217e43acbeb121282c0f46c8efba38fe7529c6899566f4
|
File details
Details for the file ai_infra_bench-0.1.4.post4-py3-none-any.whl.
File metadata
- Download URL: ai_infra_bench-0.1.4.post4-py3-none-any.whl
- Upload date:
- Size: 92.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.12.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0978130309c47ff8aa26b80b65384ff0f75a9ffa00c2bed03f67d98b576ad5bd
|
|
| MD5 |
4ad4075a44f029ceb73bd6bc17da112e
|
|
| BLAKE2b-256 |
9c38d9c521ca18fb3a87ef52563f0d1149dc7a70daefe4cd6f703c666a650ff6
|