# BenchCheck-FramesPixels: resolution x frame-rate sweep (task 11 run package) Run package for an agent on a separate GPU machine. Goal: for each of 84 video benchmarks, answer the same 300 multiple-choice items with Qwen3-VL-8B-Instruct under a resolution ladder, a frame-rate ladder and a frame-count ladder, and send the per-item outputs back. The analysis (which benchmark prefers pixels, frames, both or neither) is done on the origin side from your outputs. Produce: the new rows appended to `results/conditions_results.csv` and the raw files `results/p1_raw//__DIAG_V.jsonl`, plus `logs/` (section 8). ## 1. Conditions (fixed protocol, do not change) All conditions use the same prompt skeleton and the same 300 items per benchmark; frames are taken from the normalized video (stored at 2 fps or 1024 frames max, short side 720 up to 30 min, 480 beyond), JPEG q=85, time-uniform grids over the stored frame timestamps. `temperature=0`, `max_tokens=128`. | ladder | conditions | note | |---|---|---| | resolution (32 time-uniform frames) | v_32_s168, v_32_s336 (new); v_32_s224, v_32_s448, v_32 (exist for most benchmarks) | short side downscaled to 168 / 224 / 336 / 448 / storage. Videos stored at 480 reuse the v_32 answer for v_32_s448 (rule in the code). | | frame rate (short side 224) | v_fps0.25_s224, v_fps0.5_s224, v_fps1_s224, v_fps2_s224 (new) | nearest stored frame to a fixed-fps grid, deduplicated. Cap = what the context holds: N_max = min(1024, floor((58000 - 1500) / tokens_per_frame)), tokens_per_frame = ceil(w/32)*ceil(h/32)+6 at the 224-px dims (97 for 16:9, so N_max = 582). Longer grids are re-sampled time-uniformly to N_max and the row records meta.capped_ctx = true, n_grid, n_max, n_frames_used. | | frame count (short side 224) | v_8_s224, v_128_s224 (new); v_32_s224 (exists) | v_128_s224: videos with fewer than 128 frames send all frames (meta.capped = true). | | base conditions | v_blind, v_1, v_32, v_32_s224, v_32_s448 | already computed on the origin cluster for most benchmarks; the runner skips rows present in `results/conditions_results.csv` and runs only the missing ones (24 of the 84 benchmarks lack some base condition). | too_short videos (<= 32 stored frames) get `status = NA` for v_128_s224 and the four fps conditions (existing rule). Items without a normalized video are logged as failures, not rows. Work: 84 benchmarks x 300 items x 8 new conditions = 201,600 inferences, plus about 30,000 base-condition inferences for the benchmarks that lack them (see `items/scope_summary.json`, `existing_by_condition`). ## 2. Hardware and software Target: 4x NVIDIA B200 (180 GB each); one vLLM server per GPU. Qwen3-VL-8B bf16 weights ~16.4 GB; each server runs with `--max-model-len 65536` (the fps ladders need it) and `--limit-mm-per-prompt '{"image": 1024}'`. The launcher default `MAX_SEQS=32` suits 180 GB GPUs; on 32 GB GPUs (e.g. RTX 5090) set `MAX_SEQS=8`. ```bash python3 -m venv fp-env && source fp-env/bin/activate pip install -r code/requirements.txt # vllm 0.11.0 + torch 2.8 cu128 (sm_120 for RTX 5090) pip install -U "huggingface_hub[cli]" huggingface-cli download Qwen/Qwen3-VL-8B-Instruct --revision 0c351dd01ed87e9c1b53cbc748cba10e6187ff3b ffmpeg -version # needed only if decord and opencv both fail to decode ``` Disk: videos 94 GB unpacked (+94 GB for the tar shards until deleted), items/results/code 40 MB, model 17 GB. CPU: frame decoding is CPU-bound (the fps ladders decode up to 582 frames per video); 16+ cores recommended. ## 3. Get the data ```bash huggingface-cli download GMLRVigil/BenchCheck-FramesPixels --repo-type dataset --local-dir fp cd fp python3 - <<'PY' import json, hashlib m = json.load(open("videos/videos_manifest.json")) for s in m["shards"]: h = hashlib.sha256(open("videos/" + s["file"], "rb").read()).hexdigest() assert h == s["sha256"], s["file"]; print(s["file"], "OK") PY mkdir -p data/store/normalized && for t in videos/videos_*.tar; do tar -xf "$t" -C data/store/normalized; done ls data/store/normalized | wc -l # expect n_videos of videos_manifest.json (19,633) ``` Layout after this step: `code/`, `items/samples/.jsonl` (84 files), `manifest/manifest_subset.jsonl`, `results/conditions_results.csv` + `results/p1_raw/v_32/` (existing rows, needed for resume and for the stored-480 reuse rule), `data/store/normalized//{video.mp4, meta.json}`. ## 4. Run `code/run_frames_pixels.sh` starts one vLLM server per GPU (ports 8011+i), waits until they answer, then runs the P1 runner once with all endpoints (round-robin). It is resumable: rows already in `results/conditions_results.csv` are skipped, so re-running the same command continues. ```bash cd fp bash code/run_frames_pixels.sh --dry-run # per benchmark x condition: todo / NA / reuse counts PILOT=1 bash code/run_frames_pixels.sh # MVBench, LVBench, TimeScope first python3 - <<'PY' # per-condition timing of the pilot -> report it import json, collections t = collections.defaultdict(lambda: [0, 0.0, 0.0, 0]) for l in open("data/logs/p1_timing.jsonl"): r = json.loads(l); k = r["condition"] t[k][0] += r["infer"]; t[k][1] += r["infer_s"]; t[k][2] += r["decode_s"]; t[k][3] += r["prompt_tokens"] for k, (n, s, d, tok) in sorted(t.items()): print(f"{k:16s} infer={n:5d} infer_s/item={s/max(n,1):6.2f} decode_s/item={d/max(n,1):6.2f} prompt_tok/item={tok/max(n,1):8.0f}") PY bash code/run_frames_pixels.sh # all 84 benchmarks (skips what the pilot did) ``` Environment knobs: `NGPU`, `WORKERS` (default 6 per GPU; the fps ladders are decode-bound, raise it with the core count), `MAX_SEQS` (32), `GPU_UTIL` (0.85), `BENCH="A,B"` to restrict, `CONDS` to restrict conditions (default = the full task-11 list). Logs: `logs/vllm_gpu.log`, `logs/runner.log`, `logs/launch_params.txt`, `data/logs/p1_timing.jsonl` (per benchmark x condition), `data/logs/failures.jsonl`. Time estimate (not measured on this hardware): about 230k inferences; the fps ladders dominate (up to 582 frames x 97 tokens = 56k prompt tokens per item). Expect roughly one day on 4x B200; the pilot timing calibrates it. ## 5. Checks - `--dry-run` before the pilot: the base conditions should show `todo=0` for the 60 benchmarks that have them; every new condition shows `todo=300` (or fewer for benchmarks with < 300 sampled items). - After the pilot: `meta.capped_ctx` is true for the long videos of LVBench / TimeScope at fps1 and fps2 and false at fps0.25; MVBench videos are short and are never capped. `n_max` is 582 for 16:9 videos. - `data/logs/failures.jsonl` should stay short (items without a video, rare decode errors). A benchmark with hundreds of failures for one condition points at a vLLM restart (check `logs/vllm_gpu*.log` for OOM; lower `MAX_SEQS` then re-run, the runner resumes). - Do not delete or edit rows in `results/conditions_results.csv`. ## 6. Do not change Prompts, frame selection, resolutions, the fps grids and the cap rule, JPEG quality, `temperature=0`, model revision, `--token-budget 58000`, `--max-images 1024`. If the machine cannot serve 65536 tokens of context, stop and report instead of lowering it (the fps ladders would silently change). ## 7. Known limits - vLLM 0.11.0 with the CUDA 12.8 torch 2.8 wheels (Blackwell: B200 sm_100, RTX 5090 sm_120). - `data/store/normalized` must keep the `/video.mp4 + meta.json` layout; the runner reads `meta.json` for frame timestamps, resolution and the too_short flag. - 96 of the 25,193 items have no normalized video in this snapshot; they are logged as failures and stay missing (they are handled on the origin cluster). ## 8. Return the results ```bash cd fp tar -czf fp_returns_$(hostname)_$(date +%Y%m%d).tar.gz results/conditions_results.csv results/p1_raw logs data/logs sha256sum fp_returns_*.tar.gz > fp_returns.sha256 huggingface-cli upload GMLRVigil/BenchCheck-FramesPixels fp_returns_$(hostname)_$(date +%Y%m%d).tar.gz returns/fp_returns_$(hostname)_$(date +%Y%m%d).tar.gz --repo-type dataset huggingface-cli upload GMLRVigil/BenchCheck-FramesPixels fp_returns.sha256 returns/fp_returns_$(hostname)_$(date +%Y%m%d).sha256 --repo-type dataset ``` Without a write token, send the tarball and its sha256 by any file transfer. In the report, give the pilot timing table (section 4), total wall time, rows added per condition, the failure count with example item ids, and the exact vLLM launch line from `logs/launch_params.txt`.