Skip to main content

FairBench

AI model benchmarking suite with SWE-bench integration.

Evaluate AI models across multiple dimensions: quality, speed, memory usage, and software engineering capability.

Quick Start

# Install everything (core + LM evaluation + SWE-bench)
pip install fairbench-ai[all]

# Interactive setup wizard (creates config, checks dependencies)
fairbench init

# Run benchmarks on a GGUF model
fairbench run ~/models/qwen3-35b-q4_k_m.gguf

Nota: fairbench-ai[all] installa automaticamente anche llama-cpp-python. Se fallisce, il comando ti guiderà nell'installazione manuale. Su Apple Silicon serve Xcode command-line tools (xcode-select --install).

Benchmarks

Quality

FairBench evaluates models on 8 quality benchmarks (7 lite, 1 full):

Benchmark Description Lite Subjects/Tasks
MMLU Massive Multitask Language Understanding Yes 57 subjects
HellaSwag Commonsense reasoning Yes 10,000+ tasks
GSM8K Grade school math word problems Yes 8,500+ problems
IFEval Instruction following Yes 2,400+ instances
TruthfulQA Truthfulness evaluation Yes 800+ questions
ARC-Challenge Scientific reasoning Yes 2,590 questions
LiveBench 2024/2025 anti-contamination benchmark Yes Multiple tasks
HumanEval Code generation (Pass@1) No 164 tasks

Speed

  • TTFT (Time to First Token) — latency
  • TPOT (Tokens Per Second) — throughput
  • Measured via llama-cpp-python

Memory

  • VRAM peak — GPU memory usage
  • RAM peak — CPU memory usage

SWE-bench

  • Evaluate models on GitHub issue resolution tasks
  • Splits: full (all issues), lite (10% stratified sample), verified (human-verified only)
  • Fetches real issues from the SWE-bench dataset

Usage

Run benchmarks

# All categories (quality + speed + memory)
fairbench run ~/models/model.gguf --category all

# Quality only with specific benchmarks
fairbench run ~/models/model.gguf --category quality --tasks mmlu hellaswag

# Lite mode (faster, smaller benchmark subsets)
fairbench run ~/models/model.gguf --category all --lite

# SWE-bench evaluation
fairbench run ~/models/model.gguf --category swebench --swebench-split lite

# SWE-bench with limit
fairbench run ~/models/model.gguf --category swebench --swebench-split verified -l 10

# Custom context window and GPU layers
fairbench run ~/models/model.gguf --n-ctx 8192 --n-gpu-layers 30

List available benchmarks

fairbench list-benchmarks
fairbench list-swebench

View results

fairbench results

View leaderboard

fairbench leaderboard

Manage configuration

fairbench config --show       # Show current config
fairbench config --set key=value  # Set a config value

Setup e paths

fairbench init                # Interactive setup wizard
fairbench show-paths          # Show config & results locations

fairbench init crea la directory ~/.fairbench/, genera un config di default se non esiste, verifica le dipendenze disponibili (lm-eval, llama-cpp-python, swebench) e mostra una quick start guide.

fairbench show-paths elenca tutti i percorsi usati da FairBench (config, results, package location) senza hardcoded strings.

Configuration

Edit ~/.fairbench/config.yaml:

api_url: https://fairbench.vercel.app/api
default_n_ctx: 4096
default_n_gpu_layers: -1
default_quant: q4_k_m
default_threads: 0
publish: true
results_dir: ~/.fairbench/results
Key Default Description
api_url https://fairbench.vercel.app/api Leaderboard API endpoint
default_n_ctx 4096 Default context window size
default_n_gpu_layers -1 GPU offload layers (-1 = all)
default_quant q4_k_m Default quantization type
default_threads 0 CPU threads (0 = auto)
publish true Auto-publish results to leaderboard
results_dir ~/.fairbench/results Local results storage

Publishing

By default, every benchmark run is automatically published to the public leaderboard. Set publish: false in config to disable.

Optional Dependencies

FairBench installs core dependencies automatically with pip install fairbench-ai.

# All components (lm-eval + llama-cpp-python + swebench)
pip install fairbench-ai[all]

# ML benchmarks only (lm-eval, llama-cpp-python)
pip install fairbench-ai[ml]

# SWE-bench evaluation
pip install fairbench-ai[swebench]

# Development (pytest, ruff, mypy, huggingface-hub)
pip install fairbench-ai[dev]

Nota: Se lm-eval non è installato quando esegui un benchmark, FairBench ti chiederà interattivamente se vuoi installarlo automaticamente. In ambienti non-interactive (CI/cron) salta il benchmark qualità e stampa un warning.

Requirements

Metadata

Release files for fairbench-ai 0.4.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fairbench-ai 0.4.1
File Size Uploaded Provenance Actions
fairbench_ai-0.4.1.tar.gz 33.7 kB Without provenance Details for fairbench_ai-0.4.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for fairbench-ai 0.4.1
File Interpreter ABI Platform Actions
fairbench_ai-0.4.1-py3-none-any.whl Python 3 none any Details for fairbench_ai-0.4.1-py3-none-any.whl

Total release size: 64.3 kB

Release files / fairbench_ai-0.4.1.tar.gz

Download URL fairbench_ai-0.4.1.tar.gz
Size 33.7 kB
Tags Source
SHA-256 checksum
How to use checksums
9a5a4b08752f392f415f04876d8dea4bfe016319f5a1778c7a868a9239ea7a77
BLAKE2b-256 checksum
How to use checksums
bd6446bddafbba33d338739da2f84fcd5d60908851078ae410b64d92797ebb88
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Release files / fairbench_ai-0.4.1-py3-none-any.whl

Download URL fairbench_ai-0.4.1-py3-none-any.whl
Size 30.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f6feeb4ddad8871b47c58edecc8e0bdd9a9adf931512733a0318deda93ec7336
BLAKE2b-256 checksum
How to use checksums
a15a7965e802048cbf9b4bb01444ae2f6868b7d8ece3e4d34347ae177eb41f6e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Security for fairbench-ai 0.4.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.4.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page