Skip to content

Commit

Permalink
[Bugfix] Print warnings related to mistral_common tokenizer only on…
Browse files Browse the repository at this point in the history
  • Loading branch information
sasha0552 authored Oct 17, 2024
1 parent d65049d commit d615b5c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions vllm/entrypoints/chat_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
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__)

Expand Down Expand Up @@ -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.")

Expand Down

0 comments on commit d615b5c

Please sign in to comment.