需先安装 uv 并用 uv pip install 装依赖,直接 pip 装可能与锁文件版本不一致;跑 coco/refcoco/nocaps 等 caption 任务需要 java==1.8.0 才能用 pycocoeval;httpx、protobuf、numpy 2.x 常报错,README 建议降到 httpx==0.23.3、protobuf==3.20、numpy==1.26 并装 sentencepiece;调用闭源模型需先 export OPENAI_API_KEY 等环境变量。
lmms-eval
EvolvingLMMs-Lab活跃维护统一评测文本、图像、视频和音频任务的多模态大模型工具箱,一套流程跑完各类基准,省去为每个模态单独搭评测脚本的麻烦。
One-for-All Multimodal Evaluation Toolkit Across Text, Image, Video, and Audio Tasks
git clone https://github.com/EvolvingLMMs-Lab/lmms-eval.git
cd lmms-eval && uv pip install -e ".[all]"
python -m lmms_eval --model qwen2_5_vl --model_args pretrained=Qwen/Qwen2.5-VL-3B-Instruct --tasks mme --batch_size 1 --limit 8README 未说明具体显存要求;示例默认用 Qwen2.5-VL-3B 等模型,实际显存取决于所选模型与后端,也可通过 OpenAI 兼容接口或 Ollama 走本地/远程服务。
统一评测文本、图像、视频、音频多模态模型的开源工具包,让同一模型同一基准跑出可复现的数字
统一评测文本、图像、视频和音频任务的多模态大模型工具箱,一套流程跑完各类基准,省去为每个模态单独搭评测脚本的麻烦。
核心能力
- 用统一流水线跑 100+ 任务、30+ 模型,结果可复现
- 支持 vLLM、SGLang、OpenAI 兼容接口与 Ollama 后端
- 异步服务与自适应批处理让 GPU 持续跑满
- 输出置信区间、配对 t 检验等统计量而非单一准确率
- Chat 模型接口支持图文音视频交错输入与 chat template
容易踩的坑
- v0.7.4最新正式版2026-10-30 · 2026-10-30 13:51 UTC
What's Changed
- docs: update localized README hero images by @pufanyi in https://github.com/EvolvingLMMs-Lab/lmms-eval/pull/1484
- docs: fix hero image rendering on PyPI by @pufanyi in https://github.com/EvolvingLMMs-Lab/lmms-eval/pull/1485
- chore: update PyPI homepage URL by @pufanyi in https://github.com/EvolvingLMMs-Lab/lmms-eval/pull/1486
- fix(video_llava): pass num_frm to read_video by keyword by @Anai-Guo in https://github.com/EvolvingLMMs-Lab/lmms-eval/pull/1487
- fix(vllm): avoid eager Decord loading by @pufanyi in https://github.com/EvolvingLMMs-Lab/lmms-eval/pull/1480
- feat: add LongVideo-Reason long-video reasoning benchmark by @ngquangtrung57 in https://github.com/EvolvingLMMs-Lab/lmms-eval/pull/1488
- fix: report aggregate MVBench accuracy by @pufanyi in https://github.com/EvolvingLMMs-Lab/lmms-eval/pull/1489
- fix(distributed): call destroy_process_group() on exit to prevent NCC… by @mandanajignesh-byte in https://github.com/EvolvingLMMs-Lab/lmms-eval/pull/1391
- fix(oryx): make the video call sites match what load_video/read_video return by @Anai-Guo in https://github.com/EvolvingLMMs-Lab/lmms-eval/pull/1493
- fix(llava_vid): call read_video with its actual signature on the pyav path by @Anai-Guo in https://github.com/EvolvingLMMs-Lab/lmms-eval/pull/1492
- fix: Qwen3-VL pixel budgets to use the 32×32 visual-token grid by @gertelrina in https://github.com/EvolvingLMMs-Lab/lmms-eval/pull/1490
- fix(mdpbench): pass line_type when match_gt2pred_no_split calls get_gt_pred_lines by @Anai-Guo in https://github.com/EvolvingLMMs-Lab/lmms-eval/pull/1500
- style: fix Qwen3-VL lint failure by @pufanyi in https://github.com/EvolvingLMMs-Lab/lmms-eval/pull/1501
- fix(qwen3_vl): preserve the 256-2048 visual-token budget by @pufanyi in https://github.com/EvolvingLMMs-Lab/lmms-eval/pull/1502
- feat: vLLM-Omni and sglang-diffusion for video generation models by @pufanyi in https://github.com/EvolvingLMMs-Lab/lmms-eval/pull/1314
- style: fix lint for video generation backends by @pufanyi in https://github.com/EvolvingLMMs-Lab/lmms-eval/pull/1503
- feat: add HERBench benchmark (CVPR 2026, multi-evidence video QA) by @GabrieleSerussi in https://github.com/EvolvingLMMs-Lab/lmms-eval/pull/1504
- feat: add normalized physics benchmarks by @Luodian in https://github.com/EvolvingLMMs-Lab/lmms-eval/pull/1272
- ci: (PR 1/2) add the hermetic CPU contract suite by @Luodian in https://github.com/EvolvingLMMs-Lab/lmms-eval/pull/1440
- test: (PR 2/2) remove mirrored request-layout checks by @Luodian in https://github.com/EvolvingLMMs-Lab/lmms-eval/pull/1451
- security(tui): (collector) land structured execution and origin guards by @Luodian in https://github.com/EvolvingLMMs-Lab/lmms-eval/pull/1445
- fix(evaluator): resolve sample limits independently per task by @Luodian in https://github.com/EvolvingLMMs-Lab/lmms-eval/pull/1441
- fix(cache): validate recovered responses and repair invalid entries by @Luodian in https://github.com/EvolvingLMMs-Lab/lmms-eval/pull/1513
- fix: change decord to lazy import by @microslaw in https://github.com/EvolvingLMMs-Lab/lmms-eval/pull/1517
- feat: add MET-Bench entity tracking tasks by @vanyacohen in https://github.com/EvolvingLMMs-Lab/lmms-eval/pull/1518
- fix (vllm_generate): forward trust_remote_code to AutoProcessor by @jbyczkow in https://github.com/EvolvingLMMs-Lab/lmms-eval/pull/1531
- fix(vllm_generate): fix video metadata handling for zai-org/GLM-4.1V-9B-Thinking by @jbyczkow in https://github.com/EvolvingLMMs-Lab/lmms-eval/pull/1535
- chore: upgrade PyAV to 17.1 by @pufanyi in https://github.com/EvolvingLMMs-Lab/lmms-eval/pull/1536
- fix: bound memory during PyAV packet sampling by @pentaoa in https://github.com/EvolvingLMMs-Lab/lmms-eval/pull/1520
- chore: bump package version to 0.7.3 by @pufanyi in https://github.com/EvolvingLMMs-Lab/lmms-eval/pull/1537
- chore: enable Ruff builtin-shadowing and async checks by @pufanyi in https://github.com/EvolvingLMMs-Lab/lmms-eval/pull/1538
- feat(mmmu
- v0.7.32026-08-28 · 2026-08-28 14:33 UTC
查看更新说明
What's Changed
- fix(visualwebbench): allow anonymous dataset load by @ts-kim in https://github.com/EvolvingLMMs-Lab/lmms-eval/pull/1370
- fix(grounding/rec): guard empty metric bucket against ZeroDivisionError by @ts-kim in https://github.com/EvolvingLMMs-Lab/lmms-eval/pull/1371
- feat: add CC-OCR benchmark by @kcz358 in https://github.com/EvolvingLMMs-Lab/lmms-eval/pull/1372
- feat: add refcoco/refcoco+/refcocog grounding tasks by @kcz358 in https://github.com/EvolvingLMMs-Lab/lmms-eval/pull/1373
- feat: add ODinW-13 open-vocabulary detection task by @kcz358 in https://github.com/EvolvingLMMs-Lab/lmms-eval/pull/1374
- feat(odinw13): add COCO mAP metrics by @kcz358 in https://github.com/EvolvingLMMs-Lab/lmms-eval/pull/1375
- feat: add SUNRGBD 3D object detection task by @kcz358 in https://github.com/EvolvingLMMs-Lab/lmms-eval/pull/1376
- fix(llm_judge): OpenAI base URL, max_completion_tokens for reasoning models, PIL image support by @Luodian in https://github.com/EvolvingLMMs-Lab/lmms-eval/pull/1381
- feat(gemini): migrate to google-genai SDK, keep gemini_api alias by @Luodian in https://github.com/EvolvingLMMs-Lab/lmms-eval/pull/1382
- feat(entrypoints): job scheduler improvements for the HTTP eval server by @Luodian in https://github.com/EvolvingLMMs-Lab/lmms-eval/pull/1383
- fix: core evaluator/cache/utils correctness fixes by @Luodian in https://github.com/EvolvingLMMs-Lab/lmms-eval/pull/1378
- feat(tasks): add IntPhys2 and VANTAGE-Bench VQA by @Luodian in https://github.com/EvolvingLMMs-Lab/lmms-eval/pull/1387
- feat(loggers): add SwanLab logger as a wandb alternative (--swanlab_args) by @Luodian in https://github.com/EvolvingLMMs-Lab/lmms-eval/pull/1385
- feat: add verifiers module - pluggable per-sample verification pipeline by @Luodian in https://github.com/EvolvingLMMs-Lab/lmms-eval/pull/1379
- feat: auto-strip thinking blocks from generations before scoring by @Luodian in https://github.com/EvolvingLMMs-Lab/lmms-eval/pull/1380
- fix(tasks): utils improvements across 7 benchmarks by @Luodian in https://github.com/EvolvingLMMs-Lab/lmms-eval/pull/1386
- refactor: remove Lance-based data paths — HF/local data hosting only by @Luodian in https://github.com/EvolvingLMMs-Lab/lmms-eval/pull/1384
- feat(models): add diffusers-based world-model generation backends (Wan 2.1/2.2, Cosmos, LTX-Video, MAGI-1, fal.ai) by @Luodian in https://github.com/EvolvingLMMs-Lab/lmms-eval/pull/1389
- fix(packaging): include extensionless task template files in pip wheel by @mandanajignesh-byte in https://github.com/EvolvingLMMs-Lab/lmms-eval/pull/1390
- feat(tasks): add SLAKE bilingual medical VQA benchmark by @hiajoo in https://github.com/EvolvingLMMs-Lab/lmms-eval/pull/1392
- Add MMOU and RVOS tracking benchmarks by @kcz358 in https://github.com/EvolvingLMMs-Lab/lmms-eval/pull/1394
- fix(rvos, mmou): parse truncated tracks + switch MMOU to self-contained repo by @kcz358 in https://github.com/EvolvingLMMs-Lab/lmms-eval/pull/1395
- refactor(mmou, rvos): write submissions under <output_path>/submissions/ by @kcz358 in https://github.com/EvolvingLMMs-Lab/lmms-eval/pull/1396
- feat: add MultihopSpatial task by @youngwanLEE in https://github.com/EvolvingLMMs-Lab/lmms-eval/pull/1402
- feat(task): add SIS-Bench evaluation by @choucisan in https://github.com/EvolvingLMMs-Lab/lmms-eval/pull/1401
- fix: raise RoboSpatial context generation limit by @lx88882222 in https://github.com/EvolvingLMMs-Lab/lmms-eval/pull/1400
- fix: key RoboSpatial mask cache by content by @lx88882222 in https://github.com/EvolvingLMMs-Lab/lmms-eval/pull/1399
- feat: add CG-Bench and CG-AV-Counting tasks by @jscslld in https://github.com/EvolvingLMMs-Lab/lmms-eval/pull/1405
- Add LFM2.5-VL model wrapper by @Saad1926Q in https://github.com/EvolvingLMMs-Lab/lmms-eval/pull/1411
- feat(tasks): add MDPBench benchmark by @Delores-Lin in https://github.com/EvolvingLMMs-Lab/lmms-eval/pull/1407
- Add Qwen-native JSON coordinate variants for pointing tasks by @lx88882222 in https:/
- v0.7.22026-06-24 · 2026-06-24 08:43 UTC
查看更新说明
What's Changed
- fix(qwen2_5_vl): pass video metadata to processor for correct temporal encoding by @kcz358 in https://github.com/EvolvingLMMs-Lab/lmms-eval/pull/1269
- Fix missing VideoReader imports in FALCONBench and LongVideoBench by @akawincent in https://github.com/EvolvingLMMs-Lab/lmms-eval/pull/1258
- Feat: add model support for penguinvl by @taintaintainu in https://github.com/EvolvingLMMs-Lab/lmms-eval/pull/1257
- feat: add PushUpBench video repetition counting benchmark by @anonymous-atom in https://github.com/EvolvingLMMs-Lab/lmms-eval/pull/1262
- Add VSI-SUPER benchmark by @akawincent in https://github.com/EvolvingLMMs-Lab/lmms-eval/pull/1267
- add Qwen 3.5 chat model and example by @ArdalanM in https://github.com/EvolvingLMMs-Lab/lmms-eval/pull/1264
- refactor: consolidate Qwen3-VL and Qwen3.5 into unified base class by @Luodian in https://github.com/EvolvingLMMs-Lab/lmms-eval/pull/1270
- Add CambriansVSR/VSC/VSCStreaming model integrations by @akawincent in https://github.com/EvolvingLMMs-Lab/lmms-eval/pull/1268
- [Task] Updated sitebench to report sub category score by @oscarqjh in https://github.com/EvolvingLMMs-Lab/lmms-eval/pull/1282
- [Task] Report sub category score for 3DSRBench and Viewspatial by @oscarqjh in https://github.com/EvolvingLMMs-Lab/lmms-eval/pull/1285
- fix: handle internvl_hf video-only inputs and enable frame sampling by @akawincent in https://github.com/EvolvingLMMs-Lab/lmms-eval/pull/1279
- Add
trust_remote_codeparam for huggingface model. by @sablin39 in https://github.com/EvolvingLMMs-Lab/lmms-eval/pull/1280 - feat: add Video-MME-v2 benchmark task by @mwxely in https://github.com/EvolvingLMMs-Lab/lmms-eval/pull/1289
- Fix the incompatibility issue caused by
top_p=0when using vllm to inference (#1265) by @akawincent in https://github.com/EvolvingLMMs-Lab/lmms-eval/pull/1277 - fix: preserve HME100k prediction case in OCRBench scoring by @akawincent in https://github.com/EvolvingLMMs-Lab/lmms-eval/pull/1278
- feat: add process_results_use_image and video metadata dict support in task API by @Luodian in https://github.com/EvolvingLMMs-Lab/lmms-eval/pull/1275
- feat: add COVER and WM-aBench video understanding benchmarks by @Luodian in https://github.com/EvolvingLMMs-Lab/lmms-eval/pull/1273
- feat: add MMBench static evaluation mode (no OpenAI API needed) by @Luodian in https://github.com/EvolvingLMMs-Lab/lmms-eval/pull/1276
- fix: improve evaluation logic across 10+ existing benchmarks by @Luodian in https://github.com/EvolvingLMMs-Lab/lmms-eval/pull/1274
- feat: add video holmes and perceptioncomp by @ngquangtrung57 in https://github.com/EvolvingLMMs-Lab/lmms-eval/pull/1296
- Add UniG2U benchmark task with model support by @nssmd in https://github.com/EvolvingLMMs-Lab/lmms-eval/pull/1297
- chore: Delete gitignore scripts directory by @kcz358 in https://github.com/EvolvingLMMs-Lab/lmms-eval/pull/1299
- Add WISE Benchmark Task by @Purshow in https://github.com/EvolvingLMMs-Lab/lmms-eval/pull/1301
- feat: add LiteLLM as AI gateway backend by @RheagalFire in https://github.com/EvolvingLMMs-Lab/lmms-eval/pull/1302
- feat: Support FastVideo for Video Generation Models by @pufanyi in https://github.com/EvolvingLMMs-Lab/lmms-eval/pull/1303
- fix: release accelerator model refs during cleanup by @xk-huang in https://github.com/EvolvingLMMs-Lab/lmms-eval/pull/1321
- fix(api/task): handle None generation responses in process_results by @dankit in https://github.com/EvolvingLMMs-Lab/lmms-eval/pull/1311
- fix: preserve OpenAI max_new_tokens by @Genmin in https://github.com/EvolvingLMMs-Lab/lmms-eval/pull/1318
- feat: add VideoNet benchmark by @yadavta in https://github.com/EvolvingLMMs-Lab/lmms-eval/pull/1308
- feat: add ReVSI evaluation by @eamonn-zh in https://github.com/EvolvingLMMs-Lab/lmms-eval/pull/1307
- feat: add TimeLens benchmark by @kcz358 in https://github.com/EvolvingLMMs-Lab/lmms-eval/pull/1323
- feat: add HD-EPIC VQA benchmark (CVPR 2025) by @aliazani in https://github.com/Evo
- v0.7.12026-03-15 · 2026-03-15 09:14 UTC
查看更新说明
Changes since v0.7
Features
- SGLang model wrapper refactor with distributed eval (TP+DP) support (#1253)
- Qwen3.5 model implementation and registration (#1249)
- Layered response cache with sealed segment promotion
- Batch watchdog for eval heartbeat monitoring
- OmniDocBench language subset support (#1250)
- OmniDocBench normalized Levenshtein distance metric (#1246)
- VisRes Bench benchmark (CVPR 2026) (#1245)
Fixes
- Cross-class filelock deadlock in datasets loading (#1253)
- CharXiv lazy-init OpenAI client and configurable model version (#1252)
- Qwen3 VL video metadata preservation for video tasks (#1248)
- FPS initialization for qwen3_vl and qwen2_5_vl chat path (#1239)
- MMMU Pro unbound variable fix
- Dataset loading stabilization (num_proc default)
- v0.7v0.7 - Operational Simplicity & Pipeline Maturity2026-02-28 · 2026-02-28 17:02 UTC
查看更新说明
v0.7 — Operational Simplicity & Pipeline Maturity
Highlights
- 25+ new benchmark tasks spanning document, video, math, spatial, AGI, audio, and safety domains
- Unified video decode — single
read_videoentry point with TorchCodec backend (up to 3.58x faster), DALI GPU decode, and LRU caching - Lance-backed video distribution — MINERVA videos in a single Lance table on Hugging Face
- YAML config-driven evaluation —
--configreplaces fragile CLI one-liners with validated, reproducible YAML files - Reasoning tag stripping — pipeline-level
<think>block removal for reasoning models, configurable via--reasoning_tags - Safety & red-teaming baselines — JailbreakBench with ASR, refusal rate, toxicity, and over-refusal metrics
- Token efficiency metrics — per-sample input/output/reasoning token counts and run-level throughput
- Agentic task evaluation —
generate_until_agenticoutput type with iterative tool-call loops and deterministic simulators - Async OpenAI
message_format— replacesis_qwen3_vlflag with extensible format system - Flattened JSONL logs — cleaner output format for
generate_untilresponses
New Model Backends
- NanoVLM — lightweight local inference backend
- Async multi-GPU HF — parallel inference across GPUs with HuggingFace Transformers
Full Release Notes
See the complete v0.7 release notes for detailed documentation of every feature, migration guide, and architecture decisions.
Install
pip install lmms-eval==0.7 # or uv pip install lmms-eval==0.7
用户点评
登录用户的真实使用记录,可按版本和硬件筛选还没有人点评。第一个说出真实体验的人最有价值。
LMMs-Eval: Probing Intelligence in the Real World
We are building the unified evaluation toolkit for frontier models and probing the abilities in real world, shape what we build next.
简体中文 | 繁體中文 | 日本語 | 한국어 | Español | Français | Deutsch | Português | Русский | Italiano | Nederlands | Polski | Türkçe | العربية | हिन्दी | Tiếng Việt | Indonesia
📚 Documentation | 📖 100+ Tasks | 🌟 30+ Models | ⚡ Quickstart
🏠 Homepage | 💬 Discord | 🤝 Contributing
Why lmms-eval?
Benchmarks decide what gets built next. A model team that trusts its eval numbers can focus on real improvements instead of chasing noise. But the multimodal evaluation ecosystem is fragmented - scattered datasets, inconsistent post-processing, and single-number accuracy scores that hide whether a gain is real or random. Two teams evaluating the same model on the same benchmark routinely report different results.
We believe better evals lead to better models. Good evaluation maps the border of what models can do and shapes what we build next.
We are building lmms-eval and focusing on three core principles:
- Reproducible - One pipeline, deterministic results. Same model, same benchmark, same numbers, every time.
- Efficient - Evaluation should not be the bottleneck, even at large scale. Async serving, adaptive batching, and video I/O optimizations keep your GPUs saturated end to end.
- Trustworthy - Not just accuracy. Confidence intervals, clustered standard errors, paired comparisons, and ongoing research into evaluation methodology. Results you can trust enough to act on.
For how the pipeline works and the concrete mechanisms behind these principles, see How the Evaluation Pipeline Works and Why it's Efficient and Trustworthy.
What's New
v0.7 (Feb 2026) - Operational simplicity and pipeline maturity. 25+ new tasks across 8 domains, 2 new model backends, agentic task evaluation (generate_until_agentic), video I/O overhaul with TorchCodec (up to 3.58x faster), safety/red-teaming baselines, efficiency metrics (per-sample token counts, run-level throughput), and streamlined flattened JSONL log output for cleaner post-analysis. Release notes | Changelog.
v0.6 (Feb 2026) - Evaluation as a service. Standalone HTTP eval server, ~7.5x throughput over v0.5, statistically grounded results (CI, paired t-test), 50+ new tasks. Release notes | Changelog.
v0.5 (Oct 2025) - Audio expansion. Comprehensive audio evaluation, response caching, 50+ benchmark variants across audio, vision, and reasoning. Release notes.
- [2025-01] Video-MMMU - Knowledge acquisition from multi-discipline professional videos.
- [2024-12] MME-Survey - Comprehensive survey on evaluation of multimodal LLMs.
- [2024-11] v0.3 - Audio evaluation support (Qwen2-Audio, Gemini-Audio). Release notes.
- [2024-06] v0.2 - Video evaluation (LLaVA-NeXT Video, Gemini 1.5 Pro, VideoMME, EgoSchema). Blog.
- [2024-03] v0.1 - First release. Blog.
Quickstart
Install and run your first evaluation in under 5 minutes:
git clone https://github.com/EvolvingLMMs-Lab/lmms-eval.git
cd lmms-eval && uv pip install -e ".[all]"
# Run a quick evaluation (Qwen2.5-VL on MME, 8 samples)
python -m lmms_eval \
--model qwen2_5_vl \
--model_args pretrained=Qwen/Qwen2.5-VL-3B-Instruct \
--tasks mme \
--batch_size 1 \
--limit 8
If it prints metrics, your environment is ready. For the full guide, see docs/getting-started/quickstart.md.
Installation
Using uv (Recommended for consistent environments)
We use uv for package management to ensure all developers use exactly the same package versions. First, install uv:
curl -LsSf https://astral.sh/uv/install.sh | sh
For development with consistent environment:
git clone https://github.com/EvolvingLMMs-Lab/lmms-eval
cd lmms-eval
# Recommend
uv pip install -e ".[all]"
# If you want to use uv sync
# uv sync # This creates/updates your environment from uv.lock
To run commands:
uv run python -m lmms_eval --help # Run any command with uv run
To add new dependencies:
uv add <package> # Updates both pyproject.toml and uv.lock
Alternative Installation
For direct usage from Git:
uv venv eval
uv venv --python 3.12
source eval/bin/activate
# You might need to add and include your own task yaml if using this installation
uv pip install git+https://github.com/EvolvingLMMs-Lab/lmms-eval.git
You can check the torch environment info and results check to reproduce LLaVA-1.5's paper results. We found torch/cuda versions difference would cause small variations in the results.
If you want to test on caption dataset such as coco, refcoco, and nocaps, you will need to have java==1.8.0 to let pycocoeval api to work. If you don't have it, you can install by using conda
conda install openjdk=8
you can then check your java version by java -version
As demonstrated by the extensive table below, we aim to provide detailed information for readers to understand the datasets included in lmms-eval and some specific details about these datasets (we remain grateful for any corrections readers may have during our evaluation process).
We provide a Google Sheet for the detailed results of the LLaVA series models on different datasets. You can access the sheet here. It's a live sheet, and we are updating it with new results.
We also provide the raw data exported from Weights & Biases for the detailed results of the LLaVA series models on different datasets. You can access the raw data here.
If you want to test VILA, you should install the following dependencies:
pip install s2wrapper@git+https://github.com/bfshi/scaling_on_scales
Our Development will be continuing on the main branch, and we encourage you to give us feedback on what features are desired and how to improve the library further, or ask questions, either in issues or PRs on GitHub.
Usage Examples
More examples can be found in examples/models
Evaluation with vLLM
Qwen2.5-VL:
bash examples/models/vllm_qwen2vl.sh
Qwen3-VL:
bash examples/models/vllm_qwen3vl.sh
Qwen3.5:
bash examples/models/vllm_qwen35.sh
Evaluation with SGLang
bash examples/models/sglang.sh
Qwen3.5:
bash examples/models/sglang_qwen35.sh
Wan2.2-I2V on VBVR:
bash examples/models/sglang_wan22_vbvr.sh
Evaluation of OpenAI-Compatible Model
bash examples/models/openai_compatible.sh
Evaluation with Ollama (Local)
bash examples/models/ollama.sh
Evaluation of Qwen2.5-VL
bash examples/models/qwen25vl.sh
Evaluation of Qwen3-VL
bash examples/models/qwen3vl.sh
More Parameters
python3 -m lmms_eval --help
Environmental Variables
Before running experiments and evaluations, we recommend you to export following environment variables to your environment. Some are necessary for certain tasks to run.
export OPENAI_API_KEY="<YOUR_API_KEY>"
export HF_HOME="<Path to HF cache>"
export HF_TOKEN="<YOUR_API_KEY>"
export HF_HUB_ENABLE_HF_TRANSFER="1"
export REKA_API_KEY="<YOUR_API_KEY>"
# Other possible environment variables include
# ANTHROPIC_API_KEY,DASHSCOPE_API_KEY etc.
Common Environment Issues
Sometimes you might encounter some common issues for example error related to httpx or protobuf. To solve these issues, you can first try
python3 -m pip install httpx==0.23.3;
python3 -m pip install protobuf==3.20;
# If you are using numpy==2.x, sometimes may cause errors
python3 -m pip install numpy==1.26;
# Sometimes sentencepiece is required for tokenizer to work
python3 -m pip install sentencepiece;
Custom Model Integration
lmms-eval supports two types of models: Chat (recommended) and Simple (legacy).
Chat Models (Recommended) 🌟
- Location:
lmms_eval/models/chat/ - Use:
doc_to_messagesfunction from task - Input: Structured
ChatMessageswith roles (user,system,assistant) and content types (text,image,video,audio) - Supports: Interleaved multimodal content
- Uses: Model's
apply_chat_template()method - Reference:
lmms_eval/models/chat/qwen2_5_vl.pyorlmms_eval/models/chat/qwen3_vl.py
Example input format:
[
{"role": "user", "content": [
{"type": "image", "url": <image>},
{"type": "text", "text": "What's in this image?"}
]}
]
Simple Models (Legacy)
- Location:
lmms_eval/models/simple/ - Use:
doc_to_visual+doc_to_textfunctions from task - Input: Plain text with
<image>placeholders + separate visual list - Supports: Limited (mainly images)
- Manual processing: No chat template support
- Reference:
lmms_eval/models/simple/instructblip.py
Example input format:
# Separate visual and text
doc_to_visual -> [PIL.Image]
doc_to_text -> "What's in this image?"
Key Differences
| Aspect | Chat Models | Simple Models |
|---|---|---|
| File location | models/chat/ | models/simple/ |
| Input method | doc_to_messages | doc_to_visual + doc_to_text |
| Message format | Structured (roles + content types) | Plain text with placeholders |
| Interleaved support | ✅ Yes | ❌ Limited |
| Chat template | ✅ Built-in | ❌ Manual/None |
| Recommendation | Use this | Legacy only |
Why Use Chat Models?
- ✅ Built-in chat template support
- ✅ Interleaved multimodal content
- ✅ Structured message protocol
- ✅ Better video/audio support
- ✅ Consistent with modern LLM APIs
Chat Model Implementation Example
from lmms_eval.api.registry import register_model
from lmms_eval.api.model import lmms
from lmms_eval.protocol import ChatMessages
@register_model("my_chat_model")
class MyChatModel(lmms):
is_simple = False # Use chat interface
def generate_until(self, requests):
for request in requests:
# 5 elements for chat models
doc_to_messages, gen_kwargs, doc_id, task, split = request.args
# Get structured messages
raw_messages = doc_to_messages(self.task_dict[task][split][doc_id])
messages = ChatMessages(messages=raw_messages)
# Extract media and apply chat template
images, videos, audios = messages.extract_media()
hf_messages = messages.to_hf_messages()
text = self.processor.apply_chat_template(hf_messages)
# Generate...
For more details, see the Model Guide.
Custom Dataset Integration
Task Configuration with doc_to_messages
Implement doc_to_messages to transform dataset documents into structured chat messages:
def my_doc_to_messages(doc, lmms_eval_specific_kwargs=None):
# Extract visuals and text from doc
visuals = my_doc_to_visual(doc)
text = my_doc_to_text(doc, lmms_eval_specific_kwargs)
# Build structured messages
messages = [{"role": "user", "content": []}]
# Add visuals first
for visual in visuals:
messages[0]["content"].append({"type": "image", "url": visual})
# Add text
messages[0]["content"].append({"type": "text", "text": text})
return messages
YAML Configuration
task: "my_benchmark"
dataset_path: "my-org/my-dataset"
test_split: test
output_type: generate_until
# For chat models (recommended)
doc_to_messages: !function utils.my_doc_to_messages
# OR legacy approach:
doc_to_visual: !function utils.my_doc_to_visual
doc_to_text: !function utils.my_doc_to_text
process_results: !function utils.my_process_results
metric_list:
- metric: acc
Key Features
doc_to_messages
- Transforms dataset document into structured chat messages
- Returns: List of message dicts with
roleandcontent - Content supports:
text,image,video,audiotypes - Protocol: Defined in
lmms_eval/protocol.py(ChatMessagesclass) - Auto-fallback: If not provided, uses
doc_to_visual+doc_to_text
For more details, see the Task Guide.
Web UI
LMMS-Eval includes an optional Web UI for interactive evaluation configuration.
Requirements
- Node.js 18+ (for building the frontend, auto-built on first run)
Usage
# Start the Web UI (opens browser automatically)
uv run lmms-eval-ui
# Custom port
LMMS_SERVER_PORT=3000 LMMS_EVAL_TUI_ALLOWED_ORIGINS=http://localhost:3000 uv run lmms-eval-ui
The web UI provides:
- Model selection from all available models
- Task selection with search/filter
- Real-time command preview
- Live evaluation output streaming
- Start/Stop evaluation controls
- Log Viewer for browsing saved evaluation results and samples
For more details, see Web UI README.
HTTP Evaluation Server
LMMS-Eval includes a production-ready HTTP server for remote evaluation workflows.
Why Use Eval Server?
- Decoupled evaluation: Run evaluations on dedicated GPU nodes while training continues
- Async workflow: Submit jobs without blocking training loops
- Queue management: Sequential job processing with automatic resource management
- Remote access: Evaluate models from any machine
Start Server
from lmms_eval.entrypoints import ServerArgs, launch_server
# Configure server
args = ServerArgs(
host="0.0.0.0",
port=8000,
max_completed_jobs=200,
temp_dir_prefix="lmms_eval_"
)
# Launch server
launch_server(args)
Server runs at http://host:port with auto-generated API docs at /docs
Client Usage
Sync Client:
from lmms_eval.entrypoints import EvalClient
client = EvalClient("http://eval-server:8000")
# Submit evaluation (non-blocking)
job = client.evaluate(
model="qwen2_5_vl",
tasks=["mmmu_val", "mme"],
model_args={"pretrained": "Qwen/Qwen2.5-VL-7B-Instruct"},
num_fewshot=0,
batch_size=1,
device="cuda:0",
)
# Continue training...
# Later, retrieve results
result = client.wait_for_job(job["job_id"])
print(result["result"])
Async Client:
from lmms_eval.entrypoints import AsyncEvalClient
async with AsyncEvalClient("http://eval-server:8000") as client:
job = await client.evaluate(
model="qwen3_vl",
tasks=["mmmu_val"],
model_args={"pretrained": "Qwen/Qwen3-VL-4B-Instruct"},
)
result = await client.wait_for_job(job["job_id"])
Server API Endpoints
| Endpoint | Method | Description |
|---|---|---|
/health | GET | Server health check |
/evaluate | POST | Submit evaluation job |
/jobs/{job_id} | GET | Get job status and results |
/queue | GET | View queue status |
/tasks | GET | List available tasks |
/models | GET | List available models |
/jobs/{job_id} | DELETE | Cancel queued job |
/merge | POST | Merge FSDP2 sharded checkpoints |
Example Workflow
# Training loop pseudocode
for epoch in range(num_epochs):
train_one_epoch()
# After every N epochs, evaluate checkpoint
if epoch % 5 == 0:
checkpoint_path = f"checkpoints/epoch_{epoch}"
# Submit async evaluation (non-blocking)
eval_job = client.evaluate(
model="vllm",
model_args={"model": checkpoint_path},
tasks=["mmmu_val", "mathvista"],
)
# Training continues immediately
print(f"Evaluation job submitted: {eval_job['job_id']}")
# After training completes, retrieve all results
results = []
for job_id in eval_jobs:
result = client.wait_for_job(job_id)
results.append(result)
Security Note
⚠️ This server is intended for trusted environments only. Do NOT expose to untrusted networks without additional security layers (authentication, rate limiting, network isolation).
For more details, see the v0.6 release notes.
Frequently Asked Questions
We support 30+ model families out of the box, including Qwen2.5-VL, Qwen3-VL, LLaVA-OneVision, InternVL-2, VILA, and more. Any OpenAI-compatible API endpoint is also supported. See the full list in lmms_eval/models/.
Qwen3.5 is supported through existing runtime backends (--model vllm and --model sglang) by setting model=Qwen/Qwen3.5-397B-A17B in --model_args.
The Qwen3.5 example scripts align with official runtime references (for example, max_model_len/context_length=262144 and reasoning_parser=qwen3).
If a new model family is already fully supported by vLLM or SGLang at runtime, we generally only need documentation and examples instead of adding a dedicated model wrapper.
Over 100 evaluation tasks across image, video, and audio modalities, including MMMU, MME, MMBench, MathVista, VideoMME, EgoSchema, and many more. Check docs/advanced/current_tasks.md for the full list.
Create a YAML config under lmms_eval/tasks/ with dataset path, splits, and a doc_to_messages function. See docs/guides/task_guide.md for a step-by-step guide.
Yes. Use --model openai with --model_args model=gpt-4o and set OPENAI_API_KEY. Any OpenAI-compatible endpoint works, including local vLLM/SGLang/Ollama servers.
Use accelerate launch or pass --device cuda with tensor parallelism via vLLM/SGLang backends. See docs/getting-started/commands.md for multi-GPU flags.
Use the BibTeX entries below, or click the "Cite this repository" button in the GitHub sidebar (powered by our CITATION.cff).
Acknowledgement
lmms_eval is a fork of lm-eval-harness. We recommend you to read through the docs of lm-eval-harness for relevant information.
Below are the changes we made to the original API:
- Build context now only pass in idx and process image and doc during the model responding phase. This is due to the fact that dataset now contains lots of images and we can't store them in the doc like the original lm-eval-harness otherwise the cpu memory would explode.
- Instance.args (lmms_eval/api/instance.py) now contains a list of images to be inputted to lmms.
- lm-eval-harness supports all HF language models as single model class. Currently this is not possible for lmms because the input/output format of lmms in HF are not yet unified. Therefore, we have to create a new class for each lmms model. This is not ideal and we will try to unify them in the future.
Citations
@misc{zhang2024lmmsevalrealitycheckevaluation,
title={LMMs-Eval: Reality Check on the Evaluation of Large Multimodal Models},
author={Kaichen Zhang and Bo Li and Peiyuan Zhang and Fanyi Pu and Joshua Adrian Cahyono and Kairui Hu and Shuai Liu and Yuanhan Zhang and Jingkang Yang and Chunyuan Li and Ziwei Liu},
year={2024},
eprint={2407.12772},
archivePrefix={arXiv},
primaryClass={cs.CL},
url={https://arxiv.org/abs/2407.12772},
}
@misc{lmms_eval2024,
title={LMMs-Eval: Accelerating the Development of Large Multimodal Models},
url={https://github.com/EvolvingLMMs-Lab/lmms-eval},
author={Bo Li*, Peiyuan Zhang*, Kaichen Zhang*, Fanyi Pu*, Xinrun Du, Yuhao Dong, Haotian Liu, Yuanhan Zhang, Ge Zhang, Chunyuan Li and Ziwei Liu},
publisher = {Zenodo},
version = {v0.1.0},
month={March},
year={2024}
}