AIPerf is a package for performance testing of AI models
Actively maintained. Last release 3 days ago. A safe choice.
pip install aiperfAIPerf
AIPerf is a comprehensive benchmarking tool that measures the performance of generative AI models served by your preferred inference solution. It provides detailed metrics using a command line display as well as extensive benchmark performance reports.
Quick Start
This quick start guide leverages Ollama via Docker Desktop.
Setting up a Local Server
In order to set up an Ollama server, run granite4:350m using the following commands:
docker run -d \
--name ollama \
-p 11434:11434 \
-v ollama-data:/root/.ollama \
ollama/ollama:latest
docker exec -it ollama ollama pull granite4:350m
Basic Usage
Create a virtual environment and install AIPerf:
python3 -m venv venv
source venv/bin/activate
pip install aiperf
[!NOTE] The optional
crickdependency has no prebuilt wheel for some platforms, including Linux aarch64 (arm64), and falls back to an sdist that needs a C compiler at install time.crickbacks the non-defaulttdigestlist-metric backend, so a plainpip install aiperfdoes not pull it and needs no toolchain. If you want that backend (AIPERF_METRICS_LIST_BACKEND=tdigest) on a platform that builds it from source, install the system build tools first:sudo apt install build-essential(Debian/Ubuntu), (RHEL/CentOS), or equivalent. Everywhere a wheel exists, is all you need.