{"_id":"6929870f02675ff68df68192","id":"mistralai/Devstral-Small-2-24B-Instruct-2512","private":false,"library_name":"vllm","tags":["vllm","safetensors","mistral3","mistral-common","arxiv:2501.19399","base_model:mistralai/Mistral-Small-3.1-24B-Base-2503","base_model:quantized:mistralai/Mistral-Small-3.1-24B-Base-2503","license:apache-2.0","fp8","deploy:azure","region:us"],"downloads":303520,"likes":676,"modelId":"mistralai/Devstral-Small-2-24B-Instruct-2512","author":"mistralai","sha":"55c5b41e98c2dbd21b0c8afffc540dcfc9eb5128","lastModified":"2026-07-15T12:20:36.000Z","gated":false,"disabled":false,"model-index":null,"config":{"architectures":["Mistral3ForConditionalGeneration"],"model_type":"mistral3","quantization_config":{"modules_to_not_convert":["model.vision_tower","model.multi_modal_projector","lm_head"],"quant_method":"fp8"},"tokenizer_config":{"bos_token":"<s>","eos_token":"</s>","pad_token":"<pad>","unk_token":"<unk>"},"chat_template_jinja":"{#- Default system message if no system prompt is passed. #}\n{%- set default_system_message = 'You are operating as and within Mistral Vibe, a CLI coding-agent built by Mistral AI and powered by default by the Devstral family of models. It wraps Mistral\\'s Devstral models to enable natural language interaction with a local codebase. Use the available tools when helpful.\n\nYou can:\n\n- Receive user prompts, project context, and files.\n- Send responses and emit function calls (e.g., shell commands, code edits).\n- Apply patches, run commands, based on user approvals.\n\nAnswer the user\\'s request using the relevant tool(s), if they are available. Check that all the required parameters for each tool call are provided or can reasonably be inferred from context. IF there are no relevant tools or there are missing values for required parameters, ask the user to supply these values; otherwise proceed with the tool calls. If the user provides a specific value for a parameter (for example provided in quotes), make sure to use that value EXACTLY. DO NOT make up values for or ask about optional parameters. Carefully analyze descriptive terms in the request as they may indicate required parameter values that should be included even if not explicitly quoted.\n\nAlways try your hardest to use the tools to answer the user\\'s request. If you can\\'t use the tools, explain why and ask the user for more information.\n\nAct as an agentic assistant, if a user asks for a long task, break it down and do it step by step.\n\nWhen you want to commit changes, you will always use the \\'git commit\\' bash command. It will always be suffixed with a line telling it was generated by Mistral Vibe with the appropriate co-authoring information. The format you will always use is the following heredoc.\n\n```bash\ngit commit -m \"<Commit message here>\n\nGenerated by Mistral Vibe.\nCo-Authored-By: Mistral Vibe <vibe@mistral.ai>\"\n```' %}\n\n{#- Begin of sequence token. #}\n{{- bos_token }}\n\n\n{#- Handle system prompt if it exists. #}\n{%- set loop_messages = messages %}\n{%- if messages[0]['role'] != 'system' and default_system_message != '' %}\n    {{- '[SYSTEM_PROMPT]' + default_system_message + '[/SYSTEM_PROMPT]' }}\n{%- endif %}\n\n\n{#- Tools definition #}\n{%- set available_tools = '' %}\n{%- set has_tools = false %}\n{%- if tools is defined and tools is not none and tools|length > 0 %}\n    {%- set has_tools = true %}\n    {%- set available_tools = '[AVAILABLE_TOOLS]' + (tools| tojson) + '[/AVAILABLE_TOOLS]' %}\n{%- endif %}\n\n{#- Macros #}\n{%- macro render_content(content, context_name, supported_types_desc, support_images) -%}\n    {%- if content is string -%}\n        {{- content -}}\n    {%- elif content -%}\n        {%- for block in content -%}\n            {%- if block['type'] == 'text' -%}\n                {{- block['text'] -}}\n            {%- elif support_images and block['type'] in ['image', 'image_url'] -%}\n                {{- '[IMG]' -}}\n            {%- else -%}\n                {{- raise_exception('Only ' + supported_types_desc + ' chunks are supported in ' + context_name + '.') -}}\n            {%- endif -%}\n        {%- endfor -%}\n    {%- else -%}\n        {{- raise_exception(context_name + ' must have non-empty content.') -}}\n    {%- endif -%}\n{%- endmacro -%}\n\n{#- Aggregate consecutive messages with the same role except system and tool. #}\n{#- A sentinel message is appended so the last group gets flushed inside the loop. #}\n{%- set ns_agg = namespace(messages=[], current_group=[], current_role=none) %}\n{%- for message in loop_messages + [{'role': '__sentinel__'}] %}\n    {%- if message['role'] != ns_agg.current_role or message['role'] == 'system' or message['role'] == 'tool' %}\n        {%- if ns_agg.current_role == 'tool' %}\n            {%- set ns_agg.messages = ns_agg.messages + ns_agg.current_group %}\n        {%- elif ns_agg.current_role is not none %}\n            {%- set ns_c = namespace(text_parts=[], chunks=[], has_non_text=false, tool_calls=[]) %}\n            {%- for msg in ns_agg.current_group %}\n                {%- if msg['content'] is string %}\n                    {%- set ns_c.text_parts = ns_c.text_parts + [msg['content']] %}\n                {%- elif msg['content'] is not none %}\n                    {%- for block in msg['content'] %}\n                        {%- if block['type'] == 'text' %}\n                            {%- set ns_c.text_parts = ns_c.text_parts + [block['text']] %}\n                        {%- else %}\n                            {%- if ns_c.text_parts | length > 0 %}\n                                {%- set ns_c.chunks = ns_c.chunks + [{'type': 'text', 'text': ns_c.text_parts | join('\\n\\n')}] %}\n                                {%- set ns_c.text_parts = [] %}\n                            {%- endif %}\n                            {%- set ns_c.chunks = ns_c.chunks + [block] %}\n                            {%- set ns_c.has_non_text = true %}\n                        {%- endif %}\n                    {%- endfor %}\n                {%- endif %}\n                {%- if msg['tool_calls'] is defined and msg['tool_calls'] is not none %}\n                    {%- set ns_c.tool_calls = ns_c.tool_calls + msg['tool_calls'] | list %}\n                {%- endif %}\n            {%- endfor %}\n            {%- if ns_c.has_non_text %}\n                {%- if ns_c.text_parts | length > 0 %}\n                    {%- set ns_c.chunks = ns_c.chunks + [{'type': 'text', 'text': ns_c.text_parts | join('\\n\\n')}] %}\n                {%- endif %}\n                {%- set merged_content = ns_c.chunks %}\n            {%- else %}\n                {%- set merged_content = ns_c.text_parts | join('\\n\\n') %}\n            {%- endif %}\n            {%- if ns_c.tool_calls | length > 0 %}\n                {%- set ns_agg.messages = ns_agg.messages + [{'role': ns_agg.current_role, 'content': merged_content, 'tool_calls': ns_c.tool_calls}] %}\n            {%- else %}\n                {%- set ns_agg.messages = ns_agg.messages + [{'role': ns_agg.current_role, 'content': merged_content}] %}\n            {%- endif %}\n        {%- endif %}\n        {%- if message['role'] != '__sentinel__' %}\n            {%- set ns_agg.current_group = [message] %}\n            {%- set ns_agg.current_role = message['role'] %}\n        {%- endif %}\n    {%- else %}\n        {%- set ns_agg.current_group = ns_agg.current_group + [message] %}\n    {%- endif %}\n{%- endfor %}\n{%- set loop_messages = ns_agg.messages %}\n\n{#- Validates message ordering. #}\n{%- set ns = namespace(available_tools_emitted=false) %}\n{%- if loop_messages | length > 0 and loop_messages[0]['role'] not in ['user', 'system'] %}\n    {{- raise_exception('Conversation must start with a user or system message, got ' + loop_messages[0]['role'] + '.') }}\n{%- endif %}\n{%- set ns_order = namespace(previous_role=none) %}\n{%- for message in loop_messages %}\n    {%- set current_role = message['role'] %}\n    {%- if ns_order.previous_role is not none %}\n        {%- if ns_order.previous_role == 'system' %}\n            {%- if current_role not in ['user', 'assistant', 'system'] %}\n                {{- raise_exception('Unexpected role \\'' + current_role + '\\' after role \\'' + ns_order.previous_role + '\\'') }}\n            {%- endif %}\n        {%- elif ns_order.previous_role == 'user' %}\n            {%- if current_role not in ['assistant', 'system', 'user'] %}\n                {{- raise_exception('Unexpected role \\'' + current_role + '\\' after role \\'' + ns_order.previous_role + '\\'') }}\n            {%- endif %}\n        {%- elif ns_order.previous_role == 'assistant' %}\n            {%- if current_role not in ['assistant', 'user', 'tool'] %}\n                {{- raise_exception('Unexpected role \\'' + current_role + '\\' after role \\'' + ns_order.previous_role + '\\'') }}\n            {%- endif %}\n        {%- elif ns_order.previous_role == 'tool' %}\n            {%- if current_role not in ['assistant', 'tool', 'user'] %}\n                {{- raise_exception('Unexpected role \\'' + current_role + '\\' after role \\'' + ns_order.previous_role + '\\'') }}\n            {%- endif %}\n        {%- endif %}\n    {%- endif %}\n    {%- set ns_order.previous_role = current_role %}\n{%- endfor %}\n\n{#- Handle conversation messages. #}\n{%- for message in loop_messages %}\n    {#- User messages supports text, image and image_url content. #}\n    {%- if message['role'] == 'user' %}\n        {%- if not ns.available_tools_emitted %}\n            {{- available_tools }}\n            {%- set ns.available_tools_emitted = true %}\n        {%- endif %}\n        {%- if message['content'] is not string and message['content'] %}\n            {#- When content has exactly one image and one text block, put image first. #}\n            {%- if message['content'] | length == 2 and message['content'][0]['type'] == 'text' and message['content'][1]['type'] in ['image', 'image_url'] %}\n                {%- set blocks = [message['content'][1], message['content'][0]] %}\n            {%- else %}\n                {%- set blocks = message['content'] %}\n            {%- endif %}\n            {%- set user_content = blocks %}\n        {%- else %}\n            {%- set user_content = message['content'] %}\n        {%- endif %}\n        {{- '[INST]' -}}\n        {{- render_content(user_content, 'user message content', supported_types_desc='text, image and image_url', support_images=true) -}}\n        {{- '[/INST]' }}\n\n    {#- Assistant messages supports text content. #}\n    {%- elif message['role'] == 'assistant' %}\n        {%- 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) %}\n            {{- raise_exception('Assistant message must have a string or a list of chunks in content or a list of tool calls.') }}\n        {%- endif %}\n\n        {%- if message['content'] %}\n            {{- render_content(message['content'], 'assistant message contents', supported_types_desc='text', support_images=false) -}}\n        {%- endif %}\n\n        {%- if message['tool_calls'] is defined and message['tool_calls'] is not none and message['tool_calls']|length > 0 %}\n            {%- for tool in message['tool_calls'] %}\n                {{- '[TOOL_CALLS]' }}\n                {%- set name = tool['function']['name'] %}\n                {%- set arguments = tool['function']['arguments'] %}\n                {%- if arguments is not string %}\n                    {%- set arguments = arguments|tojson|safe %}\n                {%- elif arguments == '' %}\n                    {%- set arguments = '{}' %}\n                {%- endif %}\n                {{- name + '[ARGS]' + arguments }}\n            {%- endfor %}\n        {%- endif %}\n\n        {{- eos_token }}\n\n    {#- Tool messages only supports text content. #}\n    {%- elif message['role'] == 'tool' %}\n        {{- '[TOOL_RESULTS]' + message['content']|string + '[/TOOL_RESULTS]' }}\n\n    {#- System messages. #}\n    {%- elif message['role'] == 'system' %}\n        {{- '[SYSTEM_PROMPT]' -}}\n        {{- render_content(message['content'], 'system message contents', supported_types_desc='text', support_images=false) -}}\n        {{- '[/SYSTEM_PROMPT]' -}}\n\n    {#- Raise exception for unsupported roles. #}\n    {%- else %}\n        {{- raise_exception('Only user, assistant, system and tool roles are supported, got ' + message['role'] + '.') }}\n    {%- endif %}\n{%- endfor %}\n"},"cardData":{"library_name":"vllm","inference":false,"base_model":["mistralai/Mistral-Small-3.1-24B-Base-2503"],"extra_gated_description":"If you want to learn more about how we process your personal data, please read our <a href=\"https://mistral.ai/terms/\">Privacy Policy</a>.","tags":["mistral-common"],"license":"apache-2.0"},"siblings":[{"rfilename":".gitattributes"},{"rfilename":"CHAT_SYSTEM_PROMPT.txt"},{"rfilename":"README.md"},{"rfilename":"VIBE_SYSTEM_PROMPT.txt"},{"rfilename":"chat_template.jinja"},{"rfilename":"config.json"},{"rfilename":"consolidated-00001-of-00002.safetensors"},{"rfilename":"consolidated-00002-of-00002.safetensors"},{"rfilename":"consolidated.safetensors.index.json"},{"rfilename":"generation_config.json"},{"rfilename":"model-00001-of-00006.safetensors"},{"rfilename":"model-00002-of-00006.safetensors"},{"rfilename":"model-00003-of-00006.safetensors"},{"rfilename":"model-00004-of-00006.safetensors"},{"rfilename":"model-00005-of-00006.safetensors"},{"rfilename":"model-00006-of-00006.safetensors"},{"rfilename":"model.safetensors.index.json"},{"rfilename":"params.json"},{"rfilename":"processor_config.json"},{"rfilename":"tekken.json"},{"rfilename":"tokenizer.json"},{"rfilename":"tokenizer_config.json"}],"spaces":["tardellirs/model-pulse","embedl/hfviewer","hadadxyz/ai","YuZijie123/myyy-woof","akhaliq/anycoder-bb481273","vakilrathod67/ai","superfluz/ai","Dar1us-Khan/ai","joethuram/ai","amadsyufi/ai","charlieshawn/llm","damincordova/chat","ramirosolis/ai","inigovaldorin/ai","tariqimani/ai","hikapi/ai","DamianRoss/ai","siakatara/ai","wilsonses/ai","hekergod11/AI-Playground","Kalibro/ai","SampleCraft/hi","SampleCraft/ai","wang468/ai","abarra/demo","Mdz87/ai","cassianrook/ai","Linacre/ai","LuisJeRU/ai","Maher12345/ai","justinhearn/ai","timiu999/ai","VikVib/ai","Saksak65/ai","Saksak65/Chat","yuan111556/ai","Devil200501/ai","gdfgdgdfghghyt/ai","grafikfotograf/usta-kod"],"createdAt":"2025-11-28T11:27:11.000Z","safetensors":{"parameters":{"BF16":1781550080,"F8_E4M3":22229811200},"total":24011361840},"usedStorage":51653757679}