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>BB>AA=B=GoodA=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_labelhuman_preferencepredictionjudge_predictiontask
  • 仓内 scorer 输入:preference-pair JSONL,包含 prompthuman_label、可选的 left_artifact / right_artifacttask
  • 生成产物:一个目录,保存 preference pair 引用到的候选图像或视频。

仓内资产:

  • worldfoundry/data/benchmarks/assets/genai-bench/metadata.json
  • worldfoundry/data/benchmarks/assets/genai-bench/preference_pairs.fixture.jsonl
  • worldfoundry/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.png

preference 结果 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.jsonraw_metric_table.jsonlper_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 \
  --json

GenAI-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_accuracytask 归一到 image generation 的样本准确率。
image_editing_preference_accuracytask 归一到 image editing 的样本准确率。
video_preference_accuracytask 归一到 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。
  • mock backend 只用于本地连通性验证。
  • VQAScore backend 需要可用的视频解码、对应 checkpoint,以及足够的 GPU 显存。

返回 Benchmark Hub