GenAI-Bench
使用 WorldFoundry 仓内 runner、资产、命令和指标执行 pairwise human-preference GenAI-Bench 评测。
评测内容
GenAI-Bench 评估多模态 judge 是否与人类 pairwise preference 一致。本地 GenAI-Bench README 描述了三类 preference track:image generation、image editing 和 video generation。每条样本让 judge 在两个生成产物之间选择,标签包括 A>B、B>A、A=B=Good 和 A=B=Bad。
WorldFoundry 使用仓内 runner:worldfoundry/evaluation/tasks/execution/runners/genai_bench/run_genai_bench_official_runner.py。日常使用不需要为该 benchmark 另建官方 repo 副本。上游 paper 和官方 README 只作为协议参考;WorldFoundry 可运行代码已经在本仓内。
准备数据与资产
可以使用三种输入形态:
- 已有 preference 结果:JSONL、JSON、CSV 或 TSV,包含
human_label或human_preference、prediction或judge_prediction、task。 - 仓内 scorer 输入:preference-pair JSONL,包含
prompt、human_label、可选的left_artifact/right_artifact、task。 - 生成产物:一个目录,保存 preference pair 引用到的候选图像或视频。
仓内资产:
worldfoundry/data/benchmarks/assets/genai-bench/metadata.jsonworldfoundry/data/benchmarks/assets/genai-bench/preference_pairs.fixture.jsonlworldfoundry/data/benchmarks/assets/genai-bench/sample_results.jsonl
如果需要 HF 数据或 scorer 权重,可以单独下载:
hf download TIGER-Lab/GenAI-Bench \
--repo-type dataset \
--local-dir /path/to/datasets/GenAI-Bench
hf download zhiqiulin/clip-flant5-xxl \
--local-dir /path/to/checkpoints/clip-flant5-xxl使用 VQAScore 风格 scorer 时,设置 backend 和 checkpoint cache:
export WORLDFOUNDRY_GENAI_BENCH_SCORER_BACKEND=vqascore
export WORLDFOUNDRY_T2V_METRICS_MODEL=clip-flant5-xxl
export WORLDFOUNDRY_T2V_METRICS_CACHE_DIR=/path/to/checkpoints
export WORLDFOUNDRY_T2V_METRICS_DEVICE=cuda输入与输出布局
生成产物示例:
/path/to/genai/generated_artifacts/
video_left_001.mp4
video_right_001.mp4
image_left_002.png
image_right_002.pngpreference 结果 JSONL 示例:
{"task":"video_generation","human_label":"A>B","prediction":"A>B","pair_id":"video-001"}
{"task":"image_generation","human_label":"B>A","judge_prediction":"A>B","pair_id":"image-002"}WorldFoundry 输出布局:
tmp/genai-bench/official-validation/
scorecard.json
raw_metric_table.jsonl
per_sample_scores.jsonl
runner_runtime_report.json
specialized_normalizer_stdout.log
specialized_normalizer_stderr.log直接 runner 也会输出 scorecard.json、raw_metric_table.jsonl 和 per_sample_scores.jsonl。启动 scorer 时,上游形态的结果行会写到 upstream/ 下。
公开 CLI
该页面在 catalog 中支持的公开命令是用 official-validation 导入结果:
cd /path/to/WorldFoundry
worldfoundry-eval zoo benchmark-run \
--benchmark-id genai-bench \
--mode official-validation \
--official-results-path /path/to/genai_preference_results.jsonl \
--generated-artifact-dir /path/to/genai/generated_artifacts \
--output-dir tmp/genai-bench/official-validation \
--jsonGenAI-Bench 的公开 catalog 条目没有发布完整 official-run 命令。需要使用仓内 scorer 时,用下面的直接 runner。
直接 Runner
导入已有 preference 结果:
cd /path/to/WorldFoundry
PYTHONPATH=. "${WORLDFOUNDRY_UNIFIED_PYTHON:-python}" \
worldfoundry/evaluation/tasks/execution/runners/genai_bench/run_genai_bench_official_runner.py \
--official-results-path /path/to/genai_preference_results.jsonl \
--generated-artifact-dir /path/to/genai/generated_artifacts \
--output-dir tmp/genai-bench/direct-import \
--json用仓内 scorer 处理 preference-pair 文件:
cd /path/to/WorldFoundry
export WORLDFOUNDRY_GENAI_BENCH_SCORER_BACKEND=vqascore
export WORLDFOUNDRY_T2V_METRICS_MODEL=clip-flant5-xxl
export WORLDFOUNDRY_T2V_METRICS_CACHE_DIR=/path/to/checkpoints
PYTHONPATH=. "${WORLDFOUNDRY_UNIFIED_PYTHON:-python}" \
worldfoundry/evaluation/tasks/execution/runners/genai_bench/run_genai_bench_official_runner.py \
--run-official \
--preference-pairs-path /path/to/preference_pairs.jsonl \
--generated-artifact-dir /path/to/genai/generated_artifacts \
--output-dir tmp/genai-bench/direct-run \
--json本地连通性验证可设置 WORLDFOUNDRY_GENAI_BENCH_SCORER_BACKEND=mock。该 backend 生成的是确定性占位分数,不能作为 leaderboard 依据。
指标
| Metric ID | 含义 |
|---|---|
pairwise_accuracy | 所有导入 pair 行中,judge prediction 与人类 preference 标签一致的比例。 |
image_generation_preference_accuracy | task 归一到 image generation 的样本准确率。 |
image_editing_preference_accuracy | task 归一到 image editing 的样本准确率。 |
video_preference_accuracy | task 归一到 video generation 的样本准确率。 |
genai_bench_average | 可用 task-level preference accuracy 的平均值;主指标。 |
所有指标都会归一到 [0, 1],越高越好。
限制与缺口
- WorldFoundry 当前页面面向 pairwise preference rows,不复现完整上游 model-submission workflow。
- 完整 leaderboard 对齐仍需要官方 human-preference split、真实生成产物,以及真实 judge 或 VQAScore backend。
mockbackend 只用于本地连通性验证。- VQAScore backend 需要可用的视频解码、对应 checkpoint,以及足够的 GPU 显存。