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
86573234
Unverified
Commit
86573234
authored
Mar 21, 2024
by
Roy
Committed by
GitHub
Mar 21, 2024
Browse files
[Misc][Log] Add log for tokenizer length not equal to vocabulary size (#3500)
parent
4c07dd28
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
0 deletions
+16
-0
vllm/engine/llm_engine.py
vllm/engine/llm_engine.py
+8
-0
vllm/entrypoints/openai/serving_engine.py
vllm/entrypoints/openai/serving_engine.py
+8
-0
No files found.
vllm/engine/llm_engine.py
View file @
86573234
...
@@ -169,6 +169,14 @@ class LLMEngine:
...
@@ -169,6 +169,14 @@ class LLMEngine:
self
.
tokenizer
:
BaseTokenizerGroup
=
get_tokenizer_group
(
self
.
tokenizer
:
BaseTokenizerGroup
=
get_tokenizer_group
(
self
.
parallel_config
.
tokenizer_pool_config
,
**
init_kwargs
)
self
.
parallel_config
.
tokenizer_pool_config
,
**
init_kwargs
)
if
len
(
self
.
get_tokenizer
())
!=
self
.
model_config
.
get_vocab_size
():
logger
.
warning
(
f
"The tokenizer's vocabulary size
{
len
(
self
.
get_tokenizer
())
}
"
f
" does not match the model's vocabulary size "
f
"
{
self
.
model_config
.
get_vocab_size
()
}
. This might "
f
"cause an error in decoding. Please change config.json "
"to match the tokenizer's vocabulary size."
)
def
_verify_args
(
self
)
->
None
:
def
_verify_args
(
self
)
->
None
:
self
.
model_config
.
verify_with_parallel_config
(
self
.
parallel_config
)
self
.
model_config
.
verify_with_parallel_config
(
self
.
parallel_config
)
self
.
cache_config
.
verify_with_parallel_config
(
self
.
parallel_config
)
self
.
cache_config
.
verify_with_parallel_config
(
self
.
parallel_config
)
...
...
vllm/entrypoints/openai/serving_engine.py
View file @
86573234
...
@@ -68,6 +68,14 @@ class OpenAIServing:
...
@@ -68,6 +68,14 @@ class OpenAIServing:
tokenizer_mode
=
engine_model_config
.
tokenizer_mode
,
tokenizer_mode
=
engine_model_config
.
tokenizer_mode
,
trust_remote_code
=
engine_model_config
.
trust_remote_code
)
trust_remote_code
=
engine_model_config
.
trust_remote_code
)
if
len
(
self
.
tokenizer
)
!=
engine_model_config
.
get_vocab_size
():
logger
.
warning
(
f
"The tokenizer's vocabulary size
{
len
(
self
.
tokenizer
)
}
"
f
" does not match the model's vocabulary size "
f
"
{
engine_model_config
.
get_vocab_size
()
}
. This might "
f
"cause an error in decoding. Please change config.json "
"to match the tokenizer's vocabulary size."
)
async
def
show_available_models
(
self
)
->
ModelList
:
async
def
show_available_models
(
self
)
->
ModelList
:
"""Show available models. Right now we only have one model."""
"""Show available models. Right now we only have one model."""
model_cards
=
[
model_cards
=
[
...
...
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