Views
No views yet
[!Tip] This checkpoint in particular is a post-training-activation quantized version of Mistral-Large-3-675B-Instruct-2512. It was created using llm-compressor as part of a collaboration with teams from vLLM & Red Hat. Special thanks goes out to Dipika Sikka, Kyle Sayers, Eldar Kurtić, and Tyler Michael Smith.
[!Warning] For tasks requiring context lengths less than 32k tokens, you should see no performance degradation as compared to Mistral-Large-3-675B-Instruct-2512, for tasks requiring more context you might experience a small degradation in performance.



pip install vllm --upgrademistral_common >= 1.8.6.python -c "import mistral_common; print(mistral_common.__version__)"> 64k) we observed a subsequent drop of performance. In such cases, please use the FP8 weights. Otherwise on B200 (Blackwell 200) we observe a significant speed-up and a minor regression on vision datasets probably due to the calibration that was performed mainly on text data.1vllm serve mistralai/Mistral-Large-3-675B-Instruct-2512-NVFP4 \
2 --max-model-len 262144 --tensor-parallel-size 8 \
3 --tokenizer_mode mistral --config_format mistral --load_format mistral \
4 --enable-auto-tool-choice --tool-call-parser mistral--max-model-len to preserve memory. By default it is set to 262144 which is quite large but not necessary for most scenarios.--max-num-batched-tokens to balance throughput and latency, higher means higher throughput but higher latency.mistralai/Mistral-Large-3-675B-Instruct-2512-NVFP4 is served and you can ping it to the domain localhost with the port 8000 which is the default for vLLM.1from datetime import datetime, timedelta
2
3from openai import OpenAI
4from huggingface_hub import hf_hub_download
5
6# Modify OpenAI's API key and API base to use vLLM's API server.
7openai_api_key = "EMPTY"
8openai_api_base = "http://localhost:8000/v1"
9
10TEMP = 0.15
11MAX_TOK = 262144
12
13client = OpenAI(
14 api_key=openai_api_key,
15 base_url=openai_api_base,
16)
17
18models = client.models.list()
19model = models.data[0].id
20
21
22def load_system_prompt(repo_id: str, filename: str) -> str:
23 file_path = hf_hub_download(repo_id=repo_id, filename=filename)
24 with open(file_path, "r") as file:
25 system_prompt = file.read()
26 today = datetime.today().strftime("%Y-%m-%d")
27 yesterday = (datetime.today() - timedelta(days=1)).strftime("%Y-%m-%d")
28 model_name = repo_id.split("/")[-1]
29 return system_prompt.format(name=model_name, today=today, yesterday=yesterday)
30
31
32SYSTEM_PROMPT = load_system_prompt(model, "SYSTEM_PROMPT.txt")
33image_url = "https://static.wikia.nocookie.net/essentialsdocs/images/7/70/Battle.png/revision/latest?cb=20220523172438"
34
35messages = [
36 {"role": "system", "content": SYSTEM_PROMPT},
37 {
38 "role": "user",
39 "content": [
40 {
41 "type": "text",
42 "text": "What action do you think I should take in this situation? List all the possible actions and explain why you think they are good or bad.",
43 },
44 {"type": "image_url", "image_url": {"url": image_url}},
45 ],
46 },
47]
48
49
50response = client.chat.completions.create(
51 model=model,
52 messages=messages,
53 temperature=TEMP,
54 max_tokens=MAX_TOK,
55)
56
57print(response.choices[0].message.content)1import json
2from openai import OpenAI
3from huggingface_hub import hf_hub_download
4
5# Modify OpenAI's API key and API base to use vLLM's API server.
6openai_api_key = "EMPTY"
7openai_api_base = "http://localhost:8000/v1"
8
9TEMP = 0.15
10MAX_TOK = 262144
11
12client = OpenAI(
13 api_key=openai_api_key,
14 base_url=openai_api_base,
15)
16
17models = client.models.list()
18model = models.data[0].id
19
20
21def load_system_prompt(repo_id: str, filename: str) -> str:
22 file_path = hf_hub_download(repo_id=repo_id, filename=filename)
23 with open(file_path, "r") as file:
24 system_prompt = file.read()
25 return system_prompt
26
27
28SYSTEM_PROMPT = load_system_prompt(model, "SYSTEM_PROMPT.txt")
29
30image_url = "https://math-coaching.com/img/fiche/46/expressions-mathematiques.jpg"
31
32
33def my_calculator(expression: str) -> str:
34 return str(eval(expression))
35
36
37tools = [
38 {
39 "type": "function",
40 "function": {
41 "name": "my_calculator",
42 "description": "A calculator that can evaluate a mathematical equation and compute its results.",
43 "parameters": {
44 "type": "object",
45 "properties": {
46 "expression": {
47 "type": "string",
48 "description": "The mathematical expression to evaluate.",
49 },
50 },
51 "required": ["expression"],
52 },
53 },
54 },
55 {
56 "type": "function",
57 "function": {
58 "name": "rewrite",
59 "description": "Rewrite a given text for improved clarity",
60 "parameters": {
61 "type": "object",
62 "properties": {
63 "text": {
64 "type": "string",
65 "description": "The input text to rewrite",
66 }
67 },
68 },
69 },
70 },
71]
72
73messages = [
74 {"role": "system", "content": SYSTEM_PROMPT},
75 {
76 "role": "user",
77 "content": [
78 {
79 "type": "text",
80 "text": "Thanks to your calculator, compute the results for the equations that involve numbers displayed in the image.",
81 },
82 {
83 "type": "image_url",
84 "image_url": {
85 "url": image_url,
86 },
87 },
88 ],
89 },
90]
91
92response = client.chat.completions.create(
93 model=model,
94 messages=messages,
95 temperature=TEMP,
96 max_tokens=MAX_TOK,
97 tools=tools,
98 tool_choice="auto",
99)
100
101tool_calls = response.choices[0].message.tool_calls
102
103results = []
104for tool_call in tool_calls:
105 function_name = tool_call.function.name
106 function_args = tool_call.function.arguments
107 if function_name == "my_calculator":
108 result = my_calculator(**json.loads(function_args))
109 results.append(result)
110
111messages.append({"role": "assistant", "tool_calls": tool_calls})
112for tool_call, result in zip(tool_calls, results):
113 messages.append(
114 {
115 "role": "tool",
116 "tool_call_id": tool_call.id,
117 "name": tool_call.function.name,
118 "content": result,
119 }
120 )
121
122
123response = client.chat.completions.create(
124 model=model,
125 messages=messages,
126 temperature=TEMP,
127 max_tokens=MAX_TOK,
128)
129
130print(response.choices[0].message.content)1from openai import OpenAI
2from huggingface_hub import hf_hub_download
3
4# Modify OpenAI's API key and API base to use vLLM's API server.
5openai_api_key = "EMPTY"
6openai_api_base = "http://localhost:8000/v1"
7
8TEMP = 0.15
9MAX_TOK = 262144
10
11client = OpenAI(
12 api_key=openai_api_key,
13 base_url=openai_api_base,
14)
15
16models = client.models.list()
17model = models.data[0].id
18
19
20def load_system_prompt(repo_id: str, filename: str) -> str:
21 file_path = hf_hub_download(repo_id=repo_id, filename=filename)
22 with open(file_path, "r") as file:
23 system_prompt = file.read()
24 return system_prompt
25
26
27SYSTEM_PROMPT = load_system_prompt(model, "SYSTEM_PROMPT.txt")
28
29messages = [
30 {"role": "system", "content": SYSTEM_PROMPT},
31 {
32 "role": "user",
33 "content": "Write me a sentence where every word starts with the next letter in the alphabet - start with 'a' and end with 'z'.",
34 },
35]
36
37response = client.chat.completions.create(
38 model=model,
39 messages=messages,
40 temperature=TEMP,
41 max_tokens=MAX_TOK,
42)
43
44assistant_message = response.choices[0].message.content
45print(assistant_message)