Installation Guide¶
This guide covers all the ways to install GenAI Bench, from simple PyPI installation to full development setup.
Installation Methods¶
Method 1: PyPI Installation (Recommended)¶
The simplest way to install GenAI Bench:
For a specific version:
Method 2: Development Installation¶
For development or to use the latest features:
- Please make sure you have Python3.11 installed. You can check out online how to set it up.
- Use the virtual environment from uv
Activate the virtual environment to ensure the dev environment is correctly set up:
- Install the Project in Editable Mode
If not already done, install your project in editable mode using make. This ensures that any changes you make are immediately reflected:
Method 3: Docker Installation¶
For containerized environments:
Pull the latest docker image:
Building from Source¶
Alternatively, you can build the image locally from the Dockerfile:
Verification¶
After installation, verify that GenAI Bench is working:
# Check version
genai-bench --version
# Check help
genai-bench --help
# Check benchmark command
genai-bench benchmark --help
Environment Setup¶
Environment Variables¶
Set these environment variables for optimal performance:
# For Hugging Face tokenizer downloads
export HF_TOKEN="your-huggingface-token"
# Disable torch warnings (not needed for benchmarking)
export TRANSFORMERS_VERBOSITY=error
# Optional: Set log level
export GENAI_BENCH_LOG_LEVEL=INFO
API Keys¶
Depending on your backend, you may need API keys:
# OpenAI-compatible APIs
export OPENAI_API_KEY="your-api-key"
# Cohere API
export COHERE_API_KEY="your-cohere-key"
# OCI Cohere
export OCI_CONFIG_FILE="~/.oci/config"
Troubleshooting¶
Common Issues¶
Python Version Issues¶
# Check Python version
python3 --version
# If you have multiple Python versions, use specific version
python3.11 -m pip install genai-bench
Permission Issues¶
# Use user installation
pip install --user genai-bench
# Or use virtual environment
python3 -m venv genai-bench-env
source genai-bench-env/bin/activate
pip install genai-bench
Missing Dependencies¶
Getting Help¶
If you encounter issues:
- Check the GitHub Issues
- Search for similar problems
- Create a new issue with:
- Your operating system and Python version
- Installation method used
- Full error message
- Steps to reproduce
Next Steps¶
After successful installation:
- Read the Task Definition Guide to understand different benchmark tasks
- Explore the User Guide for detailed usage
- Check out Command Guidelines for practical scenarios