Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
vllm_cscc
Commits
762a4a6c
Unverified
Commit
762a4a6c
authored
Nov 29, 2025
by
Tsukasa OI
Committed by
GitHub
Nov 28, 2025
Browse files
[Frontend] Perform offline path replacement to `tokenizer` (#29706)
Signed-off-by:
Tsukasa OI
<
floss_llm@irq.a4lg.com
>
parent
b2c50eda
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
6 deletions
+27
-6
tests/entrypoints/offline_mode/test_offline_mode.py
tests/entrypoints/offline_mode/test_offline_mode.py
+10
-0
vllm/engine/arg_utils.py
vllm/engine/arg_utils.py
+17
-6
No files found.
tests/entrypoints/offline_mode/test_offline_mode.py
View file @
762a4a6c
...
...
@@ -23,6 +23,16 @@ MODEL_CONFIGS = [
"max_num_seqs"
:
64
,
"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"
,
"enforce_eager"
:
True
,
...
...
vllm/engine/arg_utils.py
View file @
762a4a6c
...
...
@@ -581,15 +581,26 @@ class EngineArgs:
from
vllm.plugins
import
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
:
model_id
=
self
.
model
self
.
model
=
get_model_path
(
self
.
model
,
self
.
revision
)
logger
.
info
(
"HF_HUB_OFFLINE is True, replace model_id [%s] to model_path [%s]"
,
model_id
,
self
.
model
,
)
if
model_id
is
not
self
.
model
:
logger
.
info
(
"HF_HUB_OFFLINE is True, replace model_id [%s] to model_path [%s]"
,
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
def
add_cli_args
(
parser
:
FlexibleArgumentParser
)
->
FlexibleArgumentParser
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment