# VESPER evaluation code Minimal code to evaluate a vision-language model on VESPER. It queries the model through an OpenAI-compatible chat-completions API, labels each answer as stop or continue with an LLM judge, and reports the paper's metrics. ## Setup ```bash cd code pip install -r requirements.txt export VLM_API_BASE="https://your-provider.example" # /v1/chat/completions is appended export VLM_API_KEY="" ``` If your endpoint's path does not end in `/v1/chat/completions`, pass the full URL with `--api-url`. Model names are passed through unchanged, so use the names your provider expects. ## Usage Run the commands from this `code/` directory. The annotations and clips are in the parent directory. ```bash # 1. Query the model under the four prompt conditions. python -m evaluation.run_inference \ --scenarios ../benchmark.json \ --model gemini-2.5-pro \ --output-dir ./eval_results # 2. Label each answer with the LLM judge. The paper used GPT-5.2. python -m evaluation.run_judge \ --output-dir ./eval_results \ --judge-model gpt-5.2 # 3. Report dangerous (D) and safe (S) accuracy and Geo = sqrt(D * S). python -m evaluation.summarize_results \ --output-dir ./eval_results ``` ## Settings used in the paper | Models | Visual input | |---|---| | Gemini 2.5 Pro, Gemini 2.5 Flash, Gemini 3 Flash | the whole clip as one video (`--input-mode gemini_video`, chosen automatically) | | GPT-5.1 | 32 frames (`--input-mode openai_frames --max-frames 32`) | | Claude Sonnet 4.6 | 16 frames (`--input-mode openai_frames --max-frames 16`) | | Kimi K2.5 | 10 frames (`--input-mode openai_frames --max-frames 10`) | - `--input-mode auto`, the default, sends frames to models whose name contains `gpt-` or `/gpt`, and the whole clip to every other model. The whole clip goes as a base64 `data:video/mp4` URL in an `image_url` part; if your endpoint does not accept video that way, use `--input-mode openai_frames`. - Frames are spread evenly from the first to the last frame of the clip. - Model requests carry only the model name and the messages. Each judge request sends `temperature: 0` and `max_tokens: 64`. ## License The code is released under the [NVIDIA OneWay Noncommercial License](https://developer.download.nvidia.com/licenses/NVIDIA-OneWay-Noncommercial-License-22Mar2022.pdf); see [LICENSE](LICENSE). It may be used non-commercially, meaning for research or evaluation purposes only. The dataset in the parent directory is covered by the NVIDIA Evaluation Dataset License Agreement.