Upload folder using huggingface_hub
Browse files- chat_template.jinja +4 -4
- config.json +8 -3
- consolidated.safetensors +0 -3
- tokenizer_config.json +0 -0
chat_template.jinja
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
|
|
| 1 |
{#- Default system message if no system prompt is passed. #}
|
| 2 |
{%- set default_system_message = 'You are Ministral-3-14B-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 |
|
|
@@ -79,13 +80,10 @@
|
|
| 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 %}
|
| 87 |
{{- message['content'] }}
|
| 88 |
-
{%- elif message['content'] | length > 0 %}
|
| 89 |
{%- for block in message['content'] %}
|
| 90 |
{%- if block['type'] == 'text' %}
|
| 91 |
{{- block['text'] }}
|
|
@@ -119,3 +117,5 @@
|
|
| 119 |
{{- raise_exception('Only user, assistant and tool roles are supported, got ' + message['role']) }}
|
| 120 |
{%- endif %}
|
| 121 |
{%- endfor %}
|
|
|
|
|
|
|
|
|
| 1 |
+
{#- Unsloth template fixes #}
|
| 2 |
{#- Default system message if no system prompt is passed. #}
|
| 3 |
{%- set default_system_message = 'You are Ministral-3-14B-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.' %}
|
| 4 |
|
|
|
|
| 80 |
|
| 81 |
{#- Assistant messages supports text content or text and image chunks. #}
|
| 82 |
{%- elif message['role'] == 'assistant' %}
|
|
|
|
|
|
|
|
|
|
| 83 |
|
| 84 |
{%- if message['content'] is string %}
|
| 85 |
{{- message['content'] }}
|
| 86 |
+
{%- elif message['content'] is iterable and message['content'] | length > 0 %}
|
| 87 |
{%- for block in message['content'] %}
|
| 88 |
{%- if block['type'] == 'text' %}
|
| 89 |
{{- block['text'] }}
|
|
|
|
| 117 |
{{- raise_exception('Only user, assistant and tool roles are supported, got ' + message['role']) }}
|
| 118 |
{%- endif %}
|
| 119 |
{%- endfor %}
|
| 120 |
+
|
| 121 |
+
{#- Copyright 2025-present Unsloth. Apache 2.0 License. #}
|
config.json
CHANGED
|
@@ -2,14 +2,18 @@
|
|
| 2 |
"architectures": [
|
| 3 |
"Mistral3ForConditionalGeneration"
|
| 4 |
],
|
| 5 |
-
"
|
|
|
|
|
|
|
| 6 |
"image_token_index": 10,
|
| 7 |
"model_type": "mistral3",
|
| 8 |
"multimodal_projector_bias": false,
|
|
|
|
| 9 |
"projector_hidden_act": "gelu",
|
| 10 |
"spatial_merge_size": 2,
|
| 11 |
"text_config": {
|
| 12 |
"attention_dropout": 0.0,
|
|
|
|
| 13 |
"head_dim": 128,
|
| 14 |
"hidden_act": "silu",
|
| 15 |
"hidden_size": 5120,
|
|
@@ -38,8 +42,10 @@
|
|
| 38 |
"vocab_size": 131072
|
| 39 |
},
|
| 40 |
"transformers_version": "5.0.0.dev0",
|
|
|
|
| 41 |
"vision_config": {
|
| 42 |
"attention_dropout": 0.0,
|
|
|
|
| 43 |
"head_dim": 64,
|
| 44 |
"hidden_act": "silu",
|
| 45 |
"hidden_size": 1024,
|
|
@@ -54,8 +60,7 @@
|
|
| 54 |
"rope_parameters": {
|
| 55 |
"rope_theta": 10000.0,
|
| 56 |
"rope_type": "default"
|
| 57 |
-
}
|
| 58 |
-
"rope_theta": 10000.0
|
| 59 |
},
|
| 60 |
"vision_feature_layer": -1
|
| 61 |
}
|
|
|
|
| 2 |
"architectures": [
|
| 3 |
"Mistral3ForConditionalGeneration"
|
| 4 |
],
|
| 5 |
+
"bos_token_id": 1,
|
| 6 |
+
"torch_dtype": "bfloat16",
|
| 7 |
+
"eos_token_id": 2,
|
| 8 |
"image_token_index": 10,
|
| 9 |
"model_type": "mistral3",
|
| 10 |
"multimodal_projector_bias": false,
|
| 11 |
+
"pad_token_id": 11,
|
| 12 |
"projector_hidden_act": "gelu",
|
| 13 |
"spatial_merge_size": 2,
|
| 14 |
"text_config": {
|
| 15 |
"attention_dropout": 0.0,
|
| 16 |
+
"torch_dtype": "bfloat16",
|
| 17 |
"head_dim": 128,
|
| 18 |
"hidden_act": "silu",
|
| 19 |
"hidden_size": 5120,
|
|
|
|
| 42 |
"vocab_size": 131072
|
| 43 |
},
|
| 44 |
"transformers_version": "5.0.0.dev0",
|
| 45 |
+
"unsloth_fixed": true,
|
| 46 |
"vision_config": {
|
| 47 |
"attention_dropout": 0.0,
|
| 48 |
+
"torch_dtype": "bfloat16",
|
| 49 |
"head_dim": 64,
|
| 50 |
"hidden_act": "silu",
|
| 51 |
"hidden_size": 1024,
|
|
|
|
| 60 |
"rope_parameters": {
|
| 61 |
"rope_theta": 10000.0,
|
| 62 |
"rope_type": "default"
|
| 63 |
+
}
|
|
|
|
| 64 |
},
|
| 65 |
"vision_feature_layer": -1
|
| 66 |
}
|
consolidated.safetensors
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:52c3772c85a9fdd26ac51a2f42aae24316f7fc797a2e95fa5e45837876897b01
|
| 3 |
-
size 27890132928
|
|
|
|
|
|
|
|
|
|
|
|
tokenizer_config.json
CHANGED
|
The diff for this file is too large to render.
See raw diff
|
|
|