@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / ea9fa160e3
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 16, 18:15 UTC

[ci][test] exclude model download time in server start time (#7834)

youkaichao committed Aug 24, 2024 at 01:03 UTC ea9fa160e3b47e0b8aa273f3eb2be410bd1ccab5
1 file changed +5
tests/utils.py
+5
@@ -11,6 +11,7 @@ from typing import Any, Callable, Dict, List, Optional
11
12 import openai
13 import requests
14 +from huggingface_hub import snapshot_download
15 from transformers import AutoTokenizer
16 from typing_extensions import ParamSpec
17
@@ -64,6 +65,10 @@ class RemoteOpenAIServer:
65 env_dict: Optional[Dict[str, str]] = None,
66 auto_port: bool = True,
67 max_wait_seconds: Optional[float] = None) -> None:
68 + if not model.startswith("/"):
69 + # download the model if it's not a local path
70 + # to exclude the model download time from the server start time
71 + model = snapshot_download(model)
72 if auto_port:
73 if "-p" in cli_args or "--port" in cli_args:
74 raise ValueError("You have manually specified the port"