AIPerf is a comprehensive benchmarking tool for measuring the performance of generative AI model inference services, supporting stress testing of self-selected inference solutions, providing real-time command-line metric display and detailed benchmark performance reports.
Main capabilities: adopts a multi-process architecture (10 services communicating via ZMQ); provides three UI modes: dashboard (real-time TUI), simple (progress bar), and none (no interface); supports multiple benchmark modes such as concurrency, request rate, request rate plus maximum concurrency, and trace replay; features an extensible plugin system covering endpoints, datasets, transports, and metrics; supports public datasets such as ShareGPT and custom formats; compatible with OpenAI chat completions, completions, embeddings, audio, and image interfaces, as well as NIM embeddings and ranking.
Usage: first create a virtual environment and install AIPerf, for example pip install aiperf; optional extensions include pip install "aiperf[tdigest]" (t-digest list metrics backend), pip install "aiperf[mlflow]", pip install "aiperf[otel]", pip install "aiperf[wandb]". To get started quickly, you can use Ollama in Docker Desktop, run granite4:350m, and then perform a simple benchmark test against the local service. It also supports driving via YAML configuration files, interactive inspection with aiperf chat, automatic plotting with aiperf plot, and benchmark recipes and parameter sweeps on Kubernetes.
Applicable scenarios: evaluating the throughput, latency, and SLO performance of inference services such as vLLM, SGLang, TensorRT-LLM, Hugging Face TGI, OpenAI-compatible interfaces, and AWS SageMaker; replaying production traces; testing models for vision, video, audio, embeddings, ranking, image generation, etc.; performing parameter sweeps, adaptive search, and multi-run confidence analysis.
Limitations: the output sequence length constraint (--output-tokens-mean) cannot be guaranteed unless ignore_eos and/or min_tokens are passed via --extra-inputs and the inference service supports it; extremely high concurrency (usually above 15000) may cause port exhaustion; invalid configuration maycause AIPerf to hang indefinitely; copying selected text in the dashboard UI may be unreliable; you can use the c key to copy all logs. The project is licensed under the Apache License 2.0.