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 6, 18:15 UTC
Mistral common v10 (#36971)
Signed-off-by: juliendenize <julien.denize@mistral.ai> Signed-off-by: Julien Denize <40604584+juliendenize@users.noreply.github.com> Co-authored-by: root <root@h200-bar-196-227.slurm-bar-compute.tenant-slurm.svc.cluster.local> Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> Co-authored-by: Cyrus Leung <tlleungac@connect.ust.hk>
Julien Denize committed
Mar 14, 2026 at 15:26 UTC
e42b49bd69d4b3c814d14e9433ab96cafb5a629a
4 files changed
+22
-3
requirements/common.txt
+1
-1
@@ -31,7 +31,7 @@ partial-json-parser # used for parsing partial JSON outputs
31
pyzmq >= 25.0.0
32
msgspec
33
gguf >= 0.17.0
34
-mistral_common[image] >= 1.9.1
34
+mistral_common[image] >= 1.10.0
35
opencv-python-headless >= 4.13.0 # required for video IO
36
pyyaml
37
six>=1.16.0; python_version > '3.11' # transitive dependency of pandas that needs to be the latest version for python 3.12
requirements/rocm-test.txt
+1
-1
@@ -95,7 +95,7 @@ transformers==4.57.5
95
# Pin HF Hub version
96
huggingface-hub==0.36.2
97
# Pin Mistral Common
98
-mistral-common[image,audio]==1.9.1
98
+mistral-common[image,audio]==1.10.0
99
# Required for Prithvi tests
100
terratorch==1.2.2
101
# Required for Prithvi tests
requirements/test.txt
+1
-1
@@ -482,7 +482,7 @@ mbstrdecoder==1.1.3
482
# typepy
483
mdurl==0.1.2
484
# via markdown-it-py
485
-mistral-common==1.9.1
485
+mistral-common==1.10.0
486
# via -r requirements/test.in
487
more-itertools==10.5.0
488
# via lm-eval
vllm/tokenizers/mistral.py
+19
@@ -7,6 +7,9 @@ from typing import TYPE_CHECKING, Any, cast, overload
7
from mistral_common.protocol.instruct.request import (
8
ChatCompletionRequest as MistralChatCompletionRequest,
9
)
10
+from mistral_common.protocol.instruct.request import (
11
+ ReasoningEffort,
12
+)
13
from mistral_common.protocol.instruct.tool_calls import Function, Tool
14
from mistral_common.protocol.instruct.validator import ValidationMode
15
from mistral_common.tokens.tokenizers.base import (
@@ -192,6 +195,15 @@ def validate_request_params(request: "ChatCompletionRequest"):
195
if request.chat_template is not None or request.chat_template_kwargs is not None:
196
raise ValueError("chat_template is not supported for Mistral tokenizers.")
197
198
+ if request.reasoning_effort and request.reasoning_effort not in list(
199
+ ReasoningEffort
200
+ ):
201
+ raise ValueError(
202
+ f"reasoning_effort={request.reasoning_effort} is not supported by "
203
+ "Mistral models. Supported values are: "
204
+ f"{[e.value for e in ReasoningEffort]}."
205
+ )
206
+
207
208
def _tekken_token_to_id(tokenizer: "Tekkenizer", t: str | bytes) -> int:
209
assert isinstance(tokenizer, Tekkenizer), type(tokenizer)
@@ -419,6 +431,12 @@ class MistralTokenizer(TokenizerLike):
431
truncation = kwargs.get("truncation", False)
432
max_length = kwargs.get("max_length")
433
434
+ version_kwargs = {}
435
+ # NOTE: This is for backward compatibility.
436
+ # Transformers should be passed arguments it knows.
437
+ if self.version >= 15:
438
+ version_kwargs["reasoning_effort"] = kwargs.get("reasoning_effort")
439
+
440
messages, tools = _prepare_apply_chat_template_tools_and_messages(
441
messages, tools, continue_final_message, add_generation_prompt
442
)
@@ -433,6 +451,7 @@ class MistralTokenizer(TokenizerLike):
451
max_length=max_length,
452
return_tensors=None,
453
return_dict=False,
454
+ **version_kwargs,
455
)
456
457
def decode(