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
d615b5c9
Unverified
Commit
d615b5c9
authored
Oct 17, 2024
by
sasha0552
Committed by
GitHub
Oct 17, 2024
Browse files
[Bugfix] Print warnings related to `mistral_common` tokenizer only once (#9468)
parent
d65049da
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
vllm/entrypoints/chat_utils.py
vllm/entrypoints/chat_utils.py
+4
-3
No files found.
vllm/entrypoints/chat_utils.py
View file @
d615b5c9
...
...
@@ -33,6 +33,7 @@ from vllm.multimodal.utils import (async_get_and_parse_audio,
async_get_and_parse_image
,
get_and_parse_audio
,
get_and_parse_image
)
from
vllm.transformers_utils.tokenizer
import
AnyTokenizer
,
MistralTokenizer
from
vllm.utils
import
print_warning_once
logger
=
init_logger
(
__name__
)
...
...
@@ -564,14 +565,14 @@ def apply_mistral_chat_template(
**
kwargs
:
Any
,
)
->
List
[
int
]:
if
chat_template
is
not
None
:
logger
.
warning
(
print_
warning
_once
(
"'chat_template' cannot be overridden for mistral tokenizer."
)
if
"add_generation_prompt"
in
kwargs
:
logger
.
warning
(
print_
warning
_once
(
"'add_generation_prompt' is not supported for mistral tokenizer, "
"so it will be ignored."
)
if
"continue_final_message"
in
kwargs
:
logger
.
warning
(
print_
warning
_once
(
"'continue_final_message' is not supported for mistral tokenizer, "
"so it will be ignored."
)
...
...
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