@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / 1dafb29f91
Fork 0

A high-throughput and memory-efficient inference and serving engine for LLMs

Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git

Synced Nov 7, 12:45 UTC

[Benchmark] Avoid unnecessary video download in MMVU (#35618)

Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>

Cyrus Leung committed Mar 1, 2026 at 01:07 UTC 1dafb29f91661778d3bcb6a83c7ff03f02c049d4
1 file changed +12 -1
vllm/benchmarks/datasets.py
+12 -1
@@ -31,6 +31,7 @@ from tempfile import NamedTemporaryFile
31 from typing import Any, cast
32
33 import numpy as np
34 +from huggingface_hub import snapshot_download
35 from PIL import Image
36 from typing_extensions import deprecated
37
@@ -2680,6 +2681,14 @@ class MMVUDataset(HuggingFaceDataset):
2681 + (" ".join(f"{k}.{v}" for k, v in x["choices"].items())),
2682 }
2683
2684 + def __init__(self, **kwargs) -> None:
2685 + super().__init__(**kwargs)
2686 +
2687 + self._remote_path_root = (
2688 + f"https://huggingface.co/datasets/{self.hf_name}/resolve/main"
2689 + )
2690 + self._local_path_root = snapshot_download(self.hf_name, repo_type="dataset")
2691 +
2692 def sample(
2693 self,
2694 tokenizer: TokenizerLike,
@@ -2702,7 +2711,9 @@ class MMVUDataset(HuggingFaceDataset):
2711 break
2712
2713 prompt = parser_fn(item)
2705 - mm_content = process_video(item["video"])
2714 + mm_content = process_video(
2715 + item["video"].replace(self._remote_path_root, self._local_path_root)
2716 + )
2717 prompt_len = len(tokenizer.encode(prompt))
2718 if enable_multimodal_chat:
2719 # Note: when chat is enabled the request prompt_len is no longer