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 12, 08:30 UTC
[Frontend] Perform offline path replacement to `tokenizer` (#29706)
Signed-off-by: Tsukasa OI <floss_llm@irq.a4lg.com>
Tsukasa OI committed
Nov 29, 2025 at 11:32 UTC
762a4a6ca9020601220daf9ea11d32493b345442
2 files changed
+27
-6
tests/entrypoints/offline_mode/test_offline_mode.py
+10
@@ -23,6 +23,16 @@ MODEL_CONFIGS = [
23
"max_num_seqs": 64,
24
"tensor_parallel_size": 1,
25
},
26
+ {
27
+ "model": "Qwen/Qwen3-0.6B",
28
+ "enforce_eager": True,
29
+ "gpu_memory_utilization": 0.50,
30
+ "max_model_len": 64,
31
+ "max_num_batched_tokens": 64,
32
+ "max_num_seqs": 64,
33
+ "tensor_parallel_size": 1,
34
+ "tokenizer": "Qwen/Qwen3-4B",
35
+ },
36
{
37
"model": "mistralai/Mistral-7B-Instruct-v0.1",
38
"enforce_eager": True,
vllm/engine/arg_utils.py
+17
-6
@@ -581,15 +581,26 @@ class EngineArgs:
581
from vllm.plugins import load_general_plugins
582
583
load_general_plugins()
584
- # when use hf offline,replace model id to local model path
584
+ # when use hf offline,replace model and tokenizer id to local model path
585
if huggingface_hub.constants.HF_HUB_OFFLINE:
586
model_id = self.model
587
self.model = get_model_path(self.model, self.revision)
588
- logger.info(
589
- "HF_HUB_OFFLINE is True, replace model_id [%s] to model_path [%s]",
590
- model_id,
591
- self.model,
592
- )
588
+ if model_id is not self.model:
589
+ logger.info(
590
+ "HF_HUB_OFFLINE is True, replace model_id [%s] to model_path [%s]",
591
+ model_id,
592
+ self.model,
593
+ )
594
+ if self.tokenizer is not None:
595
+ tokenizer_id = self.tokenizer
596
+ self.tokenizer = get_model_path(self.tokenizer, self.tokenizer_revision)
597
+ if tokenizer_id is not self.tokenizer:
598
+ logger.info(
599
+ "HF_HUB_OFFLINE is True, replace tokenizer_id [%s] "
600
+ "to tokenizer_path [%s]",
601
+ tokenizer_id,
602
+ self.tokenizer,
603
+ )
604
605
@staticmethod
606
def add_cli_args(parser: FlexibleArgumentParser) -> FlexibleArgumentParser: