GenAI-Perf is a command-line interface (CLI) tool designed for measuring the throughput and latency of generative AI models (Large Language Models, Vision Language Models, Embedding Models, Ranking Models, and LoRA Adapters) served through an inference server. It generates load, measures key performance metrics such as output token throughput, time to first token, inter-token latency, and request throughput, and reports the results to the console, CSV, and JSON files. While currently at version 0.0.16 and under rapid development, it is being actively phased out in favor of NVIDIA's new `AIPerf` tool for generative AI benchmarking.
pip install genai-perfVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to run a performance profile against a hypothetical GPT-2 model served by Triton Inference Server using synthetic data. Ensure your inference server and model are already running before executing this command. The output will include metrics like Time to First Token, Inter-Token Latency, and Request Latency.
For new projects or existing projects requiring continued support, evaluate and transition to `AIPerf`. Consult NVIDIA's documentation for migration guides.
Ensure your inference server is configured and running, and your target model is loaded and ready to receive requests, before invoking `genai-perf` commands.
Refer to the latest official documentation or `genai-perf --help` for the most up-to-date command-line arguments. Pin exact versions in production environments to avoid unexpected changes.
Set the `HF_TOKEN` environment variable with a valid Hugging Face token (e.g., `export HF_TOKEN='hf_YOUR_TOKEN'`) before running `genai-perf` if using such models.
If installed via `pip install genai-perf`, ensure your Python virtual environment is activated. If using the Triton SDK container, run `genai-perf` from *inside* the container (`docker run -it ... genai-perf --help`).
Increase the `--measurement-interval` (e.g., `-p 10000` for 10 seconds or higher) to allow sufficient time for requests to complete and data to be recorded. Ensure you are using a consistent and recommended `genai-perf` container version as per NVIDIA's documentation, or check the `--profile-export-file` for other output files.
Verify that your Triton Inference Server (or other endpoint) is running and reachable at the `--url` provided. Confirm the model specified by `-m` or `--model` is correctly loaded and the `--backend` and `--endpoint-type` (e.g., `chat`, `completions`, `embeddings`) match the server's configuration and model's capabilities.