juliendenize commited on
Commit
b953023
·
verified ·
1 Parent(s): 7ab57d5

Add files using upload-large-folder tool

Browse files
Files changed (4) hide show
  1. chat_template.jinja +7 -7
  2. config.json +3 -5
  3. processor_config.json +1 -0
  4. tokenizer.json +2 -2
chat_template.jinja CHANGED
@@ -1,5 +1,5 @@
1
  {#- Default system message if no system prompt is passed. #}
2
- {%- set default_system_message = 'You are Ministral-3-3B-Instruct-2512, a Large Language Model (LLM) created by Mistral AI, a French startup headquartered in Paris.\nYou power an AI assistant called Le Chat.\nYour knowledge base was last updated on 2023-10-01.\nThe current date is {today}.\n\nWhen you\'re not sure about some information or when the user\'s request requires up-to-date or specific data, you must use the available tools to fetch the information. Do not hesitate to use tools whenever they can provide a more accurate or complete response. If no relevant tools are available, then clearly state that you don\'t have the information and avoid making up anything.\nIf the user\'s question is not clear, ambiguous, or does not provide enough context for you to accurately answer the question, you do not try to answer it right away and you rather ask the user to clarify their request (e.g. "What are some good restaurants around me?" => "Where are you?" or "When is the next flight to Tokyo" => "Where do you travel from?").\nYou are always very attentive to dates, in particular you try to resolve dates (e.g. "yesterday" is {yesterday}) and when asked about information at specific dates, you discard information that is at another date.\nYou follow these instructions in all languages, and always respond to the user in the language they use or request.\nNext sections describe the capabilities that you have.\n\n# WEB BROWSING INSTRUCTIONS\n\nYou cannot perform any web search or access internet to open URLs, links etc. If it seems like the user is expecting you to do so, you clarify the situation and ask the user to copy paste the text directly in the chat.\n\n# MULTI-MODAL INSTRUCTIONS\n\nYou have the ability to read images, but you cannot generate images. You also cannot transcribe audio files or videos.\nYou cannot read nor transcribe audio files or videos.\n\n# TOOL CALLING INSTRUCTIONS\n\nYou may have access to tools that you can use to fetch information or perform actions. You must use these tools in the following situations:\n\n1. When the request requires up-to-date information.\n2. When the request requires specific data that you do not have in your knowledge base.\n3. When the request involves actions that you cannot perform without tools.\n\nAlways prioritize using tools to provide the most accurate and helpful response. If tools are not available, inform the user that you cannot perform the requested action at the moment.' %}
3
 
4
  {#- Begin of sequence token. #}
5
  {{- bos_token }}
@@ -79,8 +79,8 @@
79
 
80
  {#- Assistant messages supports text content or text and image chunks. #}
81
  {%- elif message['role'] == 'assistant' %}
82
- {%- if message['content'] is not none and message['content'] | length > 0 and message['tool_calls'] is defined and message['tool_calls'] is not none and message['tool_calls'] | length > 0 %}
83
- {{- raise_exception('Assistant message cannot have both content and tool calls.') }}
84
  {%- endif %}
85
 
86
  {%- if message['content'] is string %}
@@ -93,7 +93,9 @@
93
  {{- raise_exception('Only text chunks are supported in assistant message contents.') }}
94
  {%- endif %}
95
  {%- endfor %}
96
- {%- elif message['tool_calls'] is defined and message['tool_calls'] is not none and message['tool_calls'] | length > 0 %}
 
 
97
  {%- for tool in message['tool_calls'] %}
98
  {%- set arguments = tool['function']['arguments'] %}
99
  {%- if arguments is not string %}
@@ -103,8 +105,6 @@
103
  {%- endif %}
104
  {{- '[TOOL_CALLS]' + tool['function']['name'] + '[ARGS]' + arguments }}
105
  {%- endfor %}
106
- {%- else %}
107
- {{- raise_exception('Assistant message must have a string or a list of chunks in content or a list of tool calls.') }}
108
  {%- endif %}
109
 
110
  {#- End of sequence token for each assistant messages. #}
@@ -116,6 +116,6 @@
116
 
117
  {#- Raise exception for unsupported roles. #}
118
  {%- else %}
119
- {{- raise_exception('Only user, assistant and tool roles are supported, got ' + message) }}
120
  {%- endif %}
121
  {%- endfor %}
 
1
  {#- Default system message if no system prompt is passed. #}
2
+ {%- set default_system_message = '' %}
3
 
4
  {#- Begin of sequence token. #}
5
  {{- bos_token }}
 
79
 
80
  {#- Assistant messages supports text content or text and image chunks. #}
81
  {%- elif message['role'] == 'assistant' %}
82
+ {%- if (message['content'] is none or message['content'] == '' or message['content']|length == 0) and (message['tool_calls'] is not defined or message['tool_calls'] is none or message['tool_calls']|length == 0) %}
83
+ {{- raise_exception('Assistant message must have a string or a list of chunks in content or a list of tool calls.') }}
84
  {%- endif %}
85
 
86
  {%- if message['content'] is string %}
 
93
  {{- raise_exception('Only text chunks are supported in assistant message contents.') }}
94
  {%- endif %}
95
  {%- endfor %}
96
+ {%- endif %}
97
+
98
+ {%- if message['tool_calls'] is defined and message['tool_calls'] is not none and message['tool_calls']|length > 0 %}
99
  {%- for tool in message['tool_calls'] %}
100
  {%- set arguments = tool['function']['arguments'] %}
101
  {%- if arguments is not string %}
 
105
  {%- endif %}
106
  {{- '[TOOL_CALLS]' + tool['function']['name'] + '[ARGS]' + arguments }}
107
  {%- endfor %}
 
 
108
  {%- endif %}
109
 
110
  {#- End of sequence token for each assistant messages. #}
 
116
 
117
  {#- Raise exception for unsupported roles. #}
118
  {%- else %}
119
+ {{- raise_exception('Only user, assistant and tool roles are supported, got ' + message['role']) }}
120
  {%- endif %}
121
  {%- endfor %}
config.json CHANGED
@@ -16,8 +16,7 @@
16
  "initializer_range": 0.02,
17
  "intermediate_size": 9216,
18
  "max_position_embeddings": 262144,
19
- "model_type": "mistral",
20
- "mscale": 1,
21
  "num_attention_heads": 32,
22
  "num_hidden_layers": 26,
23
  "num_key_value_heads": 8,
@@ -27,7 +26,8 @@
27
  "beta_slow": 1.0,
28
  "factor": 16.0,
29
  "llama_4_scaling_beta": 0.1,
30
- "mscale_all_dim": 1,
 
31
  "original_max_position_embeddings": 16384,
32
  "rope_theta": 1000000.0,
33
  "rope_type": "yarn",
@@ -44,8 +44,6 @@
44
  "head_dim": 64,
45
  "hidden_act": "silu",
46
  "hidden_size": 1024,
47
- "image_break_id": 12,
48
- "image_end_id": 13,
49
  "image_size": 1540,
50
  "initializer_range": 0.02,
51
  "intermediate_size": 4096,
 
16
  "initializer_range": 0.02,
17
  "intermediate_size": 9216,
18
  "max_position_embeddings": 262144,
19
+ "model_type": "ministral3",
 
20
  "num_attention_heads": 32,
21
  "num_hidden_layers": 26,
22
  "num_key_value_heads": 8,
 
26
  "beta_slow": 1.0,
27
  "factor": 16.0,
28
  "llama_4_scaling_beta": 0.1,
29
+ "mscale": 1.0,
30
+ "mscale_all_dim": 1.0,
31
  "original_max_position_embeddings": 16384,
32
  "rope_theta": 1000000.0,
33
  "rope_type": "yarn",
 
44
  "head_dim": 64,
45
  "hidden_act": "silu",
46
  "hidden_size": 1024,
 
 
47
  "image_size": 1540,
48
  "initializer_range": 0.02,
49
  "intermediate_size": 4096,
processor_config.json CHANGED
@@ -18,6 +18,7 @@
18
  0.40821073
19
  ],
20
  "image_processor_type": "PixtralImageProcessorFast",
 
21
  "image_std": [
22
  0.26862954,
23
  0.26130258,
 
18
  0.40821073
19
  ],
20
  "image_processor_type": "PixtralImageProcessorFast",
21
+ "image_seq_length": null,
22
  "image_std": [
23
  0.26862954,
24
  0.26130258,
tokenizer.json CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:27cc2a0b9ebfda9540615116cbb444ddc4793bfc80da8ca0d730a0b54d2b6581
3
- size 17077993
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:577575622324b2e099e2648be26bdeb5e5815ffe66d7004e9e3ddbf421db6bf1
3
+ size 17078110