@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / 8b3e94a357
Fork 0

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 15, 18:30 UTC

[Model] Remove duplicated message check in Mistral chat completion request (#15069)

Signed-off-by: Brayden Zhong <b8zhong@uwaterloo.ca>

Brayden Zhong committed Mar 19, 2025 at 01:09 UTC 8b3e94a3575a0f36fe22b55d2a584b411e3b83f1
1 file changed -4
vllm/transformers_utils/tokenizers/mistral.py
-4
@@ -143,10 +143,6 @@ def make_mistral_chat_completion_request(
143 if last_message["role"] == "assistant":
144 last_message["prefix"] = True
145
146 - last_message = cast(Dict[str, Any], messages[-1])
147 - if last_message["role"] == "assistant":
148 - last_message["prefix"] = True
149 -
146 # mistral-common requires AssistantMessage content to be string [1].
147 #
148 # [1]: https://github.com/mistralai/mistral-common/blob/f4a06998b75ed78bbf5aaf569590b772ea26c9f6/src/mistral_common/protocol/instruct/messages.py#L80