[Perf][CI] Add MiniMax-H3 4xH100 diffusion perf config (#5836)
Signed-off-by: David Chen <530634352@qq.com>
This commit is contained in:
1 parent
62bf8d630d
commit
a874b8e09b
5 files changed
+427
-10
No files matched your search
@@ -350,10 +350,49 @@ def _kill_process_tree(pid: int) -> None:
|
||||
|
||||
|
||||
def _resolve_offline_model(model: str) -> str:
|
||||
"""Under HF_HUB_OFFLINE, resolve a HF repo id to its local snapshot dir."""
|
||||
"""Resolve a model string to a local directory.
|
||||
|
||||
Local paths pass through unchanged. HF repo ids are resolved to their local
|
||||
snapshot dir when ``HF_HUB_OFFLINE`` is set. ``repo_id/subfolder`` (e.g.
|
||||
``MiniMaxAI/MiniMax-H3/FL2VA``) is resolved to the matching partition
|
||||
subfolder of the snapshot, downloading only that subfolder when online.
|
||||
"""
|
||||
import huggingface_hub
|
||||
|
||||
if not model or os.path.isdir(model) or not huggingface_hub.constants.HF_HUB_OFFLINE:
|
||||
if not model or os.path.isdir(model):
|
||||
return model
|
||||
|
||||
# MiniMax-H3 custom code uses relative imports across files, which breaks
|
||||
# when the HF cache snapshot is symlinked (``get_class_from_dynamic_module``
|
||||
# resolves ``realpath`` into the blobs dir). Mirror the accuracy test's env
|
||||
# overrides so CI / local runs can point at a materialized partition. The
|
||||
# repo-root key (used with ``--task-type fl2va|ref2va``) expects a
|
||||
# materialized root containing the FL2VA/Ref2VA subfolders.
|
||||
model_env_overrides = {
|
||||
"MiniMaxAI/MiniMax-H3": "VLLM_TEST_MINIMAX_H3_MODEL",
|
||||
"MiniMaxAI/MiniMax-H3/FL2VA": "VLLM_TEST_MINIMAX_H3_FL2VA_MODEL",
|
||||
"MiniMaxAI/MiniMax-H3/Ref2VA": "VLLM_TEST_MINIMAX_H3_REF2VA_MODEL",
|
||||
}
|
||||
env_name = model_env_overrides.get(model)
|
||||
if env_name:
|
||||
env_model = os.environ.get(env_name)
|
||||
if env_model:
|
||||
return env_model
|
||||
|
||||
parts = model.split("/")
|
||||
if len(parts) >= 3:
|
||||
repo_id = "/".join(parts[:2])
|
||||
subfolder = "/".join(parts[2:])
|
||||
from huggingface_hub import snapshot_download
|
||||
|
||||
snapshot_root = snapshot_download(
|
||||
repo_id,
|
||||
allow_patterns=[f"{subfolder}/**"],
|
||||
local_files_only=huggingface_hub.constants.HF_HUB_OFFLINE,
|
||||
)
|
||||
return str(Path(snapshot_root) / subfolder)
|
||||
|
||||
if not huggingface_hub.constants.HF_HUB_OFFLINE:
|
||||
return model
|
||||
from huggingface_hub import snapshot_download
|
||||
|
||||
@@ -387,6 +426,11 @@ class DiffusionServer:
|
||||
def _start_server(self) -> None:
|
||||
env = os.environ.copy()
|
||||
env["VLLM_WORKER_MULTIPROC_METHOD"] = "spawn"
|
||||
# Give each run its own writable video-storage dir. The server default
|
||||
# (/tmp/storage) may be missing or not writable on shared hosts / CI.
|
||||
storage_path = Path(os.environ.get("VLLM_OMNI_STORAGE_PATH", str(BENCHMARK_RESULT_DIR / "storage")))
|
||||
storage_path.mkdir(parents=True, exist_ok=True)
|
||||
env["VLLM_OMNI_STORAGE_PATH"] = str(storage_path)
|
||||
|
||||
cmd = [
|
||||
sys.executable,
|
||||
|
||||
Reference in new issue
Block a user