mirror of
https://git.datalinker.icu/vllm-project/vllm.git
synced 2025-12-10 09:45:49 +08:00
[Frontend] Perform offline path replacement to tokenizer (#29706)
Signed-off-by: Tsukasa OI <floss_llm@irq.a4lg.com>
This commit is contained in:
parent
b2c50eda50
commit
762a4a6ca9
@ -23,6 +23,16 @@ MODEL_CONFIGS = [
|
|||||||
"max_num_seqs": 64,
|
"max_num_seqs": 64,
|
||||||
"tensor_parallel_size": 1,
|
"tensor_parallel_size": 1,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"model": "Qwen/Qwen3-0.6B",
|
||||||
|
"enforce_eager": True,
|
||||||
|
"gpu_memory_utilization": 0.50,
|
||||||
|
"max_model_len": 64,
|
||||||
|
"max_num_batched_tokens": 64,
|
||||||
|
"max_num_seqs": 64,
|
||||||
|
"tensor_parallel_size": 1,
|
||||||
|
"tokenizer": "Qwen/Qwen3-4B",
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"model": "mistralai/Mistral-7B-Instruct-v0.1",
|
"model": "mistralai/Mistral-7B-Instruct-v0.1",
|
||||||
"enforce_eager": True,
|
"enforce_eager": True,
|
||||||
|
|||||||
@ -581,15 +581,26 @@ class EngineArgs:
|
|||||||
from vllm.plugins import load_general_plugins
|
from vllm.plugins import load_general_plugins
|
||||||
|
|
||||||
load_general_plugins()
|
load_general_plugins()
|
||||||
# when use hf offline,replace model id to local model path
|
# when use hf offline,replace model and tokenizer id to local model path
|
||||||
if huggingface_hub.constants.HF_HUB_OFFLINE:
|
if huggingface_hub.constants.HF_HUB_OFFLINE:
|
||||||
model_id = self.model
|
model_id = self.model
|
||||||
self.model = get_model_path(self.model, self.revision)
|
self.model = get_model_path(self.model, self.revision)
|
||||||
logger.info(
|
if model_id is not self.model:
|
||||||
"HF_HUB_OFFLINE is True, replace model_id [%s] to model_path [%s]",
|
logger.info(
|
||||||
model_id,
|
"HF_HUB_OFFLINE is True, replace model_id [%s] to model_path [%s]",
|
||||||
self.model,
|
model_id,
|
||||||
)
|
self.model,
|
||||||
|
)
|
||||||
|
if self.tokenizer is not None:
|
||||||
|
tokenizer_id = self.tokenizer
|
||||||
|
self.tokenizer = get_model_path(self.tokenizer, self.tokenizer_revision)
|
||||||
|
if tokenizer_id is not self.tokenizer:
|
||||||
|
logger.info(
|
||||||
|
"HF_HUB_OFFLINE is True, replace tokenizer_id [%s] "
|
||||||
|
"to tokenizer_path [%s]",
|
||||||
|
tokenizer_id,
|
||||||
|
self.tokenizer,
|
||||||
|
)
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def add_cli_args(parser: FlexibleArgumentParser) -> FlexibleArgumentParser:
|
def add_cli_args(parser: FlexibleArgumentParser) -> FlexibleArgumentParser:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user