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 16, 10:45 UTC
[Bugfix] Print warnings related to `mistral_common` tokenizer only once (#9468)
sasha0552 committed
Oct 17, 2024 at 21:44 UTC
d615b5c9f8fe611613bf9495041363d387a52914
1 file changed
+4
-3
vllm/entrypoints/chat_utils.py
+4
-3
@@ -33,6 +33,7 @@ from vllm.multimodal.utils import (async_get_and_parse_audio,
33
async_get_and_parse_image,
34
get_and_parse_audio, get_and_parse_image)
35
from vllm.transformers_utils.tokenizer import AnyTokenizer, MistralTokenizer
36
+from vllm.utils import print_warning_once
37
38
logger = init_logger(__name__)
39
@@ -564,14 +565,14 @@ def apply_mistral_chat_template(
565
**kwargs: Any,
566
) -> List[int]:
567
if chat_template is not None:
567
- logger.warning(
568
+ print_warning_once(
569
"'chat_template' cannot be overridden for mistral tokenizer.")
570
if "add_generation_prompt" in kwargs:
570
- logger.warning(
571
+ print_warning_once(
572
"'add_generation_prompt' is not supported for mistral tokenizer, "
573
"so it will be ignored.")
574
if "continue_final_message" in kwargs:
574
- logger.warning(
575
+ print_warning_once(
576
"'continue_final_message' is not supported for mistral tokenizer, "
577
"so it will be ignored.")
578