CLI-first Python harness for evaluating vision-language models (VLMs) and multimodal LLMs.
Project description
VLM Eval Harness
CLI-first Python harness for evaluating vision-language models (VLMs) and multimodal LLMs across multiple benchmarks with unified logging and reports.
Run many VLM benchmarks with one command, with typed configs and reproducible JSON/CSV logs.
Status: ✨ Planning / scaffolding — API and benchmark list may evolve.
Why you might care
- You want a single CLI to run many VLM benchmarks without copy‑pasting ad‑hoc scripts.
- You care about reproducible JSON/CSV logs instead of screenshots of leaderboards.
- You want a typed benchmark protocol so new tasks and model adapters plug in cleanly.
10-second example
Run the working slice — the in-repo toy_qa benchmark against the trivial
echo model — straight from the CLI:
# 10-second example: run the toy QA benchmark with the echo model
vlm-eval run \
--benchmark toy_qa \
--model echo \
--config configs/toy_qa_echo.yml
This writes records.jsonl, records.csv, and summary.json under
runs/toy_qa_echo/. The echo model only echoes the question, so its accuracy
is honestly 0.0 — the example proves the pipeline runs end to end, not model
quality. See Quickstart for details.
Architecture
The CLI parses flags into a config, which selects a benchmark and a model adapter; the benchmark yields examples, the model adapter answers them, the evaluation step scores the answers, and everything is written to JSON/CSV logs.
Regenerate the diagram with python scripts/generate_architecture_diagram.py.
Goals
- Provide a single CLI to run multiple VLM benchmarks.
- Support both hosted APIs (e.g., OpenAI, Anthropic) and local models.
- Log results in a unified JSON / CSV schema for leaderboard analysis.
- Make it easy to plug in new tasks, prompts, and models.
Planned Features
vlm-eval run \with:--benchmark(or--suite) flag--model/--provider(openai,local, etc.)--configYAML for prompts, decoding, and logging
- Built-in adapters for common VLM / MLLM APIs
- Evaluation datasets wired through the
awesome-vlm-evaluationlist - Simple Python API on top of the CLI
Repository Layout (planned)
vlm-eval-harness/
vlm_eval/
cli.py # Typer / Click CLI entrypoint
config.py # Pydantic / OmegaConf config definitions
models/ # Model adapters (OpenAI, local, etc.)
benchmarks/ # Benchmark runners and task definitions
logging/ # JSON / CSV logging utilities
evaluation/ # Metric computation, aggregation
scripts/
run_benchmark.py # Example invocations
configs/
openai-gpt4o.yml
local-llava.yml
tests/
README.md
pyproject.toml
Getting Started
This repository is currently in the design and scaffolding phase.
Planned steps:
- Finalize the minimal benchmark set and logging schema.
- Implement a thin model adapter interface.
- Add 1–2 reference configs and example runs.
- Tag an
0.1.0pre-release once something reproducible and useful exists.
If you are interested in collaborating, feel free to open an issue with suggestions on:
- Benchmarks you would like to see wired in first.
- Model providers you care about.
- Logging / schema constraints you need for your own analysis.
Quickstart (minimal working slice)
A first runnable vertical slice is implemented: a toy_qa in-repo benchmark
and a trivial echo model adapter, wired through the CLI with unified
JSON / JSONL / CSV logging.
⚠️ This slice exists to prove the pipeline runs end to end. The
echomodel only echoes the question back, so it answers nothing correctly — its accuracy ontoy_qais honestly 0.0. There are no real benchmark numbers here yet; real benchmarks and model adapters are TODO.
Install
pip install -e . # installs the `vlm-eval` CLI
# optional: dev/test extras
pip install -e ".[dev]"
Requires Python 3.10+. Runtime deps are intentionally small: typer,
pydantic, pyyaml (plus pytest for tests).
Run the toy benchmark
vlm-eval run --benchmark toy_qa --model echo --config configs/toy_qa_echo.yml
CLI flags (--benchmark, --model, --output-dir, --limit) override the
YAML config. Helpers:
vlm-eval list # show registered benchmarks and models
vlm-eval --version
You can also drive it from Python instead of the CLI:
python scripts/run_toy_qa.py
Output files
Each run writes to <output_dir>/<run_name>/ (default runs/toy_qa_echo/):
| File | Contents |
|---|---|
records.jsonl |
One record per example: {id, question, expected_answer, model_answer, correct} |
records.csv |
The same per-example records as CSV |
summary.json |
Aggregated metrics {num_examples, num_correct, accuracy} + run metadata |
All metrics are computed from actual model outputs — nothing is hard-coded.
Tests
pytest
The tests run the full toy pipeline and check the log files; they need no API keys and no network access.
What's real vs. TODO
- ✅ CLI (
vlm-eval run/list), YAML config, model-adapter interface, toy benchmark, exact-match metric, JSON/JSONL/CSV logging, tests. - ⏳ TODO: real benchmarks, hosted-API and local-model adapters, richer
metrics, and true image inputs (the toy data already carries an
imageplaceholder field so image paths can be plugged in later).
Package layout (as implemented)
vlm_eval_harness/
cli.py # Typer CLI: `vlm-eval`
config.py # Pydantic RunConfig + YAML loader
core.py # shared run_evaluation() orchestrator
models/ # base adapter + echo adapter + registry
benchmarks/ # toy_qa benchmark + registry
evaluation/ # exact-match metric + aggregation
logging/ # JSON / JSONL / CSV logger
scripts/run_toy_qa.py
configs/toy_qa_echo.yml
tests/
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file vlm_eval_harness-0.1.0.tar.gz.
File metadata
- Download URL: vlm_eval_harness-0.1.0.tar.gz
- Upload date:
- Size: 15.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4a6429fca40924fbcf7eafb83064ba86666d3c3bdc8127e65fb1236bb0d977ce
|
|
| MD5 |
ee81a61f4d05cef2166ea31132221440
|
|
| BLAKE2b-256 |
413c2232c4f1eb582f859c3d832c3116405c223523b3511a78b25409cf5c9d8f
|
Provenance
The following attestation bundles were made for vlm_eval_harness-0.1.0.tar.gz:
Publisher:
publish.yml on abhijeetgupta02/vlm-eval-harness
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
vlm_eval_harness-0.1.0.tar.gz -
Subject digest:
4a6429fca40924fbcf7eafb83064ba86666d3c3bdc8127e65fb1236bb0d977ce - Sigstore transparency entry: 1871572592
- Sigstore integration time:
-
Permalink:
abhijeetgupta02/vlm-eval-harness@4af8be809c400f370a3d3949795f3b9bc9c66fff -
Branch / Tag:
refs/heads/main - Owner: https://github.com/abhijeetgupta02
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@4af8be809c400f370a3d3949795f3b9bc9c66fff -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file vlm_eval_harness-0.1.0-py3-none-any.whl.
File metadata
- Download URL: vlm_eval_harness-0.1.0-py3-none-any.whl
- Upload date:
- Size: 15.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
acdefe7d0e19767f1f858338f420dfd8573e922d139e40b5fd87fbea3cafbbfd
|
|
| MD5 |
cbc43c085aa8923d4b709c32b72b833a
|
|
| BLAKE2b-256 |
e66e78b198a680adb3c5725337cd13dad32140faa308d929e5839974af7872a3
|
Provenance
The following attestation bundles were made for vlm_eval_harness-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on abhijeetgupta02/vlm-eval-harness
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
vlm_eval_harness-0.1.0-py3-none-any.whl -
Subject digest:
acdefe7d0e19767f1f858338f420dfd8573e922d139e40b5fd87fbea3cafbbfd - Sigstore transparency entry: 1871572672
- Sigstore integration time:
-
Permalink:
abhijeetgupta02/vlm-eval-harness@4af8be809c400f370a3d3949795f3b9bc9c66fff -
Branch / Tag:
refs/heads/main - Owner: https://github.com/abhijeetgupta02
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@4af8be809c400f370a3d3949795f3b9bc9c66fff -
Trigger Event:
workflow_dispatch
-
Statement type: