{"_id":"6a1e8b0b751d8eee461fd678","id":"MiniMaxAI/MiniMax-M3","private":false,"pipeline_tag":"image-text-to-text","library_name":"transformers","tags":["transformers","safetensors","minimax_m3_vl","image-text-to-text","multimodal","moe","agent","coding","video","conversational","custom_code","arxiv:2606.13392","license:other","eval-results","endpoints_compatible","region:us"],"downloads":170783,"likes":1474,"modelId":"MiniMaxAI/MiniMax-M3","author":"MiniMaxAI","sha":"f0e1c1e04d40177e4673a22097036854f536e9c0","lastModified":"2026-07-23T04:25:20.000Z","gated":false,"disabled":false,"widgetData":[{"text":"Hi, what can you help me with?"},{"text":"What is 84 * 3 / 2?"},{"text":"Tell me an interesting fact about the universe!"},{"text":"Explain quantum computing in simple terms."}],"model-index":null,"config":{"architectures":["MiniMaxM3SparseForConditionalGeneration"],"auto_map":{"AutoConfig":"configuration_minimax_m3_vl.MiniMaxM3VLConfig"},"model_type":"minimax_m3_vl","tokenizer_config":{"bos_token":"]~b]","eos_token":"[e~[","pad_token":"]!p~[","unk_token":"[e~["},"chat_template_jinja":"{# ---------- special token variables ---------- #}\n{%- set ns_token               = ']<]minimax[>['                  -%}\n{%- set bod_token              = ']~!b['                          -%}\n{%- set bos_token              = ']~b]'                           -%}\n{%- set eos_token              = '[e~['                           -%}\n{%- set toolcall_begin_token   = ns_token ~ '<tool_call>'         -%}\n{%- set toolcall_end_token     = ns_token ~ '</tool_call>'        -%}\n{%- set think_begin_token      = '<mm:think>'                     -%}\n{%- set think_end_token        = '</mm:think>'                    -%}\n{%- set image_token            = ']<]image[>['                    -%}\n{%- set video_token            = ']<]video[>['                    -%}\n{#- Thinking mode: \"enabled\" / \"disabled\" / \"adaptive\" / not defined -#}\n{#- Recursive XML renderer for tool_call arguments ======================== -#}\n{#- None values are intentionally skipped in mapping iteration so that\n    `<key>null</key>` (which would round-trip to the literal string \"null\")\n    never appears in the rendered tool_call. The convention is: omit the\n    field entirely. The top-level `_args` loop applies the same rule.\n    The `val is none` branch below is a safety net only — upstream cleaning\n    (drop_none_in_tool_arguments) should ensure no None ever reaches here. -#}\n{%- macro to_xml(val, ns) -%}\n{%- if val is mapping -%}\n{%- for k, v in val.items() if v is not none -%}\n{{ ns }}<{{ k }}>{{ to_xml(v, ns) }}{{ ns }}</{{ k }}>\n{%- endfor -%}\n{%- elif val is iterable and val is not string -%}\n{%- for item in val -%}\n{{ ns }}<item>{{ to_xml(item, ns) }}{{ ns }}</item>\n{%- endfor -%}\n{%- elif val is none -%}\n{#- Should be unreachable when upstream cleaning is applied. -#}\n{%- elif val is boolean -%}\n{{ val | tojson }}\n{%- else -%}\n{{ val }}\n{%- endif -%}\n{%- endmacro -%}\n{#- Tool Rendering Functions ============================================== -#}\n{%- macro render_tool_namespace(namespace_name, tool_list) -%}\n{%- for tool in tool_list -%}\n<tool>{{ tool.function | tojson(ensure_ascii=False) }}</tool>\n{% endfor -%}\n{%- endmacro -%}\n{%- macro visible_text(content) -%}\n    {%- if content is string -%}\n        {{ content }}\n    {%- elif content is iterable and content is not mapping -%}\n        {%- for item in content -%}\n            {%- if item is mapping and item.type == 'text' -%}\n                {{- item.text }}\n            {%- elif item is mapping and item.type == 'image' -%}\n                {{- image_token }}\n            {%- elif item is mapping and item.type == 'video' -%}\n                {{- video_token}}\n            {%- elif item is string -%}\n                {{- item }}\n            {%- endif -%}\n        {%- endfor -%}\n    {%- elif content is none -%}\n        {{- '' }}\n    {%- else -%}\n        {{- content }}\n    {%- endif -%}\n{%- endmacro -%}\n{#- System Message Construction ============================================ -#}\n{%- macro build_system_message(system_message) -%}\n    {%- if system_message and system_message.content -%}\n        {{- visible_text(system_message.content) }}\n    {%- else -%}\n        {{- 'Your model version is MiniMax-M3, developed by MiniMax. Knowledge cutoff: January 2026. Founded in early 2022, MiniMax is a global AI foundation model company committed to advancing the frontiers of AI towards AGI.' }}\n    {%- endif -%}\n\n    {#- Thinking mode instructions -#}\n    {{- '\\n\\n<thinking_instructions>\\n' }}\n    {{- 'You have a thinking capability that allows you to reason step by step before responding. When thinking is enabled, wrap your reasoning in ' ~ think_begin_token ~ think_end_token ~ ' tags before your response. When thinking is disabled, begin your response directly after the ' ~ think_end_token ~ ' prefix. When thinking is adaptive, decide on your own whether to think for the current turn.\\n' }}\n    {%- if thinking_mode is defined -%}\n        {%- if thinking_mode == \"enabled\" -%}\n            {{- 'Current thinking mode: enabled. You MUST think step by step before every response, including after receiving function/tool results.\\n' }}\n        {%- elif thinking_mode == \"disabled\" -%}\n            {{- 'Current thinking mode: disabled. Do not output any thinking process.\\n' }}\n        {%- elif thinking_mode == \"adaptive\" -%}\n            {{- 'Current thinking mode: adaptive. You are encouraged to think for complex decision-making, multi-step reasoning, or when analyzing function/tool results.\\n' }}\n        {%- endif -%}\n    {%- else -%}\n        {{- 'Current thinking mode: adaptive. You are encouraged to think for complex decision-making, multi-step reasoning, or when analyzing function/tool results.\\n' }}\n    {%- endif -%}\n    {{- '</thinking_instructions>' }}\n{%- endmacro -%}\n{%- macro build_developer_message(developer_message) -%}\n    {%- if developer_message and developer_message.content -%}\n        {{- visible_text(developer_message.content) }}\n    {%- else -%}\n        {%- if model_identity is not defined -%}\n            {%- set model_identity = \"You are a helpful assistant.\" -%}\n        {%- endif -%}\n        {{- model_identity }}\n    {%- endif -%}\n{%- endmacro -%}\n{#- Main Template Logic ================================================= -#}\n{#- Role mapping: root -> system sp (high priority), system/developer -> developer sp (low priority) -#}\n{%- set system_message = none -%}\n{%- set developer_message = none -%}\n{%- set conversation_messages = messages -%}\n{%- if messages and messages[0].role == \"root\" -%}\n    {%- set system_message = messages[0] -%}\n    {%- set conversation_messages = messages[1:] -%}\n    {%- if conversation_messages and conversation_messages[0].role in [\"system\", \"developer\"] -%}\n        {%- set developer_message = conversation_messages[0] -%}\n        {%- set conversation_messages = conversation_messages[1:] -%}\n    {%- endif -%}\n{%- elif messages and messages[0].role in [\"system\", \"developer\"] -%}\n    {%- set developer_message = messages[0] -%}\n    {%- set conversation_messages = messages[1:] -%}\n{%- endif -%}\n{#- Render system sp (higher priority, root role only) -#}\n{{- bod_token ~ bos_token ~ 'system' ~ '\\n' }}\n{{- build_system_message(system_message) }}\n{{- eos_token ~ '\\n' }}\n\n{#- Render developer sp (lower priority: system/developer role + tools) -#}\n{{- bos_token ~ 'developer' ~ '\\n' }}\n{{- build_developer_message(developer_message) }}\n{%- if tools -%}\n    {{- '\\n\\n' ~ '# Tools' ~ '\\n' ~ 'You may call one or more tools to assist with the user query.\\nHere are the tools available in JSONSchema format:' ~ '\\n' }}\n    {{- '\\n' ~ '<tools>' ~ '\\n' }}\n    {{- render_tool_namespace(\"functions\", tools) }}\n    {{- '</tools>' ~ '\\n\\n' }}\n    {{- 'To call tools, wrap all invocations in a single ' ~ toolcall_begin_token ~ toolcall_end_token ~ ' block. Parameter values containing nested objects or arrays are recursively expanded into XML elements. Example:\\n' }}\n    {{- '\\n' ~ toolcall_begin_token ~ '\\n' }}\n    {{- ns_token + '<invoke name=\"tool-name-1\">' }}\n    {{- ns_token + '<param-1>value-1' + ns_token + '</param-1>' }}\n    {{- ns_token + '<param-2>' }}\n    {{- ns_token + '<item>' }}\n    {{- ns_token + '<key-a>val-a' + ns_token + '</key-a>' }}\n    {{- ns_token + '<key-b>val-b' + ns_token + '</key-b>' }}\n    {{- ns_token + '</item>' }}\n    {{- ns_token + '</param-2>' }}\n    {{- ns_token + '</invoke>\\n' }}\n    {{- ns_token + '<invoke name=\"tool-name-2\">' }}\n    {{- ns_token + '<param-1>value-1' + ns_token + '</param-1>' }}\n    {{- ns_token + '</invoke>\\n' }}\n    {{- toolcall_end_token }}\n{%- endif -%}\n{{- eos_token ~ '\\n' }}\n\n{#- Render messages -#}\n{%- set last_tool_call = namespace(name=none) -%}\n{%- for message in conversation_messages -%}\n    {%- if message.role == 'assistant' -%}\n        {{- bos_token ~ 'ai' ~ '\\n' }}\n\n        {%- set reasoning_content = '' %}\n        {%- set content = visible_text(message.content) %}\n        {%- if message.reasoning_content is string %}\n            {%- set reasoning_content = message.reasoning_content %}\n        {%- else %}\n            {%- if think_end_token in content %}\n                {%- set reasoning_content = content.split(think_end_token)[0].strip('\\n').split(think_begin_token)[-1].strip('\\n') %}\n                {%- set content = content.split(think_end_token)[-1].strip('\\n') %}\n            {%- endif %}\n        {%- endif %}\n\n        {%- if reasoning_content -%}\n            {#- Render thinking for every assistant turn (all-turn visible) -#}\n            {{- think_begin_token ~ reasoning_content ~ think_end_token }}\n        {%- else -%}\n            {#- No thinking rendered → prefix with think_end_token -#}\n            {{- think_end_token }}\n        {%- endif -%}\n\n        {%- if content -%}\n            {{- content }}\n        {%- endif -%}\n        {%- if message.tool_calls -%}\n            {{- toolcall_begin_token ~ '\\n' }}\n\n            {%- for tool_call in message.tool_calls -%}\n                {%- if tool_call.function -%}\n                    {%- set tool_call = tool_call.function -%}\n                {%- endif -%}\n{{- ns_token + '<invoke name=\"' + tool_call.name + '\">' }}\n{%- set _args = tool_call.arguments -%}\n{%- for k, v in _args.items() if v is not none %}\n{{- ns_token + '<' + k + '>' -}}\n{{- to_xml(v, ns_token) -}}\n{{- ns_token + '</' + k + '>' }}\n{%- endfor -%}\n{{- ns_token + '</invoke>' ~ '\\n' }}\n            {%- endfor -%}\n\n            {{- toolcall_end_token }}\n            {%- if message.tool_calls[-1].function -%}\n                {%- set last_tool_call.name = message.tool_calls[-1].function.name -%}\n            {%- else -%}\n                {%- set last_tool_call.name = message.tool_calls[-1].name -%}\n            {%- endif -%}\n        {%- else -%}\n            {%- set last_tool_call.name = none -%}\n        {%- endif -%}\n        {{- eos_token ~ '\\n' }}\n\n    {%- elif message.role == 'tool' -%}\n        {%- if last_tool_call.name is none -%}\n            {{- raise_exception(\"Message has tool role, but there was no previous assistant message with a tool call!\") }}\n        {%- endif -%}\n        {%- if loop.first or (conversation_messages[loop.index0 - 1].role != 'tool') -%}\n            {{- bos_token ~ 'tool' }}\n        {%- endif -%}\n        {{- '\\n<response>' }}\n        {%- if message.content is string -%}\n            {{- message.content }}\n        {%- else -%}\n            {%- for tr in message.content -%}\n                {%- if tr is mapping and tr.type is defined and tr.type == 'image' -%}\n                    {{- image_token }}\n                {%- elif tr is mapping and tr.type is defined and tr.type == 'video' -%}\n                    {{- video_token }}\n                {%- else -%}\n                    {{- tr.output if tr.output is defined else (tr.text if tr.type == 'text' and tr.text is defined else tr) }}\n                {%- endif -%}\n            {%- endfor -%}\n        {%- endif -%}\n        {{- '</response>' }}\n        {%- if loop.last or (conversation_messages[loop.index0 + 1].role != 'tool') -%}\n            {{- eos_token ~ '\\n' -}}\n        {%- endif -%}\n\n    {%- elif message.role == 'user' -%}\n        {{- bos_token ~ 'user' ~ '\\n' }}\n        {{- visible_text(message.content) }}\n        {{- eos_token ~ '\\n' }}\n    {%- endif -%}\n{%- endfor -%}\n\n{#- Generation prompt -#}\n{%- if add_generation_prompt -%}\n{{- bos_token ~ 'ai' ~ '\\n' }}\n{%- if thinking_mode is defined and thinking_mode == \"disabled\" -%}\n    {{- think_end_token }}\n{%- elif thinking_mode is defined and thinking_mode == \"adaptive\" -%}\n    {#- adaptive: no prefix, let model decide -#}\n{%- elif thinking_mode is defined and thinking_mode == \"enabled\" -%}\n    {#- enabled or not defined: default to think -#}\n    {{- think_begin_token }}\n{%- else -%}\n    {#- adaptive: no prefix, let model decide -#}\n{%- endif -%}\n{%- endif -%}\n"},"cardData":{"pipeline_tag":"image-text-to-text","license":"other","license_name":"minimax-community","license_link":"LICENSE","library_name":"transformers","tags":["multimodal","moe","agent","coding","video"]},"transformersInfo":{"auto_model":"AutoModelForMultimodalLM","pipeline_tag":"image-text-to-text","processor":"AutoProcessor"},"siblings":[{"rfilename":".eval_results/lhtb.yaml"},{"rfilename":".eval_results/minimax-m3.yaml"},{"rfilename":".gitattributes"},{"rfilename":"LICENSE"},{"rfilename":"README.md"},{"rfilename":"added_tokens.json"},{"rfilename":"chat_template.jinja"},{"rfilename":"config.json"},{"rfilename":"configuration_minimax_m3_vl.py"},{"rfilename":"figures/benchmark.jpeg"},{"rfilename":"figures/efficiency_gqa_vs_msa.png"},{"rfilename":"figures/logo.svg"},{"rfilename":"generation_config.json"},{"rfilename":"image_processor.py"},{"rfilename":"merges.txt"},{"rfilename":"model-00001-of-00059.safetensors"},{"rfilename":"model-00002-of-00059.safetensors"},{"rfilename":"model-00003-of-00059.safetensors"},{"rfilename":"model-00004-of-00059.safetensors"},{"rfilename":"model-00005-of-00059.safetensors"},{"rfilename":"model-00006-of-00059.safetensors"},{"rfilename":"model-00007-of-00059.safetensors"},{"rfilename":"model-00008-of-00059.safetensors"},{"rfilename":"model-00009-of-00059.safetensors"},{"rfilename":"model-00010-of-00059.safetensors"},{"rfilename":"model-00011-of-00059.safetensors"},{"rfilename":"model-00012-of-00059.safetensors"},{"rfilename":"model-00013-of-00059.safetensors"},{"rfilename":"model-00014-of-00059.safetensors"},{"rfilename":"model-00015-of-00059.safetensors"},{"rfilename":"model-00016-of-00059.safetensors"},{"rfilename":"model-00017-of-00059.safetensors"},{"rfilename":"model-00018-of-00059.safetensors"},{"rfilename":"model-00019-of-00059.safetensors"},{"rfilename":"model-00020-of-00059.safetensors"},{"rfilename":"model-00021-of-00059.safetensors"},{"rfilename":"model-00022-of-00059.safetensors"},{"rfilename":"model-00023-of-00059.safetensors"},{"rfilename":"model-00024-of-00059.safetensors"},{"rfilename":"model-00025-of-00059.safetensors"},{"rfilename":"model-00026-of-00059.safetensors"},{"rfilename":"model-00027-of-00059.safetensors"},{"rfilename":"model-00028-of-00059.safetensors"},{"rfilename":"model-00029-of-00059.safetensors"},{"rfilename":"model-00030-of-00059.safetensors"},{"rfilename":"model-00031-of-00059.safetensors"},{"rfilename":"model-00032-of-00059.safetensors"},{"rfilename":"model-00033-of-00059.safetensors"},{"rfilename":"model-00034-of-00059.safetensors"},{"rfilename":"model-00035-of-00059.safetensors"},{"rfilename":"model-00036-of-00059.safetensors"},{"rfilename":"model-00037-of-00059.safetensors"},{"rfilename":"model-00038-of-00059.safetensors"},{"rfilename":"model-00039-of-00059.safetensors"},{"rfilename":"model-00040-of-00059.safetensors"},{"rfilename":"model-00041-of-00059.safetensors"},{"rfilename":"model-00042-of-00059.safetensors"},{"rfilename":"model-00043-of-00059.safetensors"},{"rfilename":"model-00044-of-00059.safetensors"},{"rfilename":"model-00045-of-00059.safetensors"},{"rfilename":"model-00046-of-00059.safetensors"},{"rfilename":"model-00047-of-00059.safetensors"},{"rfilename":"model-00048-of-00059.safetensors"},{"rfilename":"model-00049-of-00059.safetensors"},{"rfilename":"model-00050-of-00059.safetensors"},{"rfilename":"model-00051-of-00059.safetensors"},{"rfilename":"model-00052-of-00059.safetensors"},{"rfilename":"model-00053-of-00059.safetensors"},{"rfilename":"model-00054-of-00059.safetensors"},{"rfilename":"model-00055-of-00059.safetensors"},{"rfilename":"model-00056-of-00059.safetensors"},{"rfilename":"model-00057-of-00059.safetensors"},{"rfilename":"model-00058-of-00059.safetensors"},{"rfilename":"model-00059-of-00059.safetensors"},{"rfilename":"model.safetensors.index.json"},{"rfilename":"preprocessor_config.json"},{"rfilename":"processing_minimax.py"},{"rfilename":"special_tokens_map.json"},{"rfilename":"tokenizer.json"},{"rfilename":"tokenizer_config.json"},{"rfilename":"video_processor.py"},{"rfilename":"vocab.json"}],"spaces":["MiniMaxAI/MiniMax-Music3-workflow","akhaliq/MiniMax-Music3-workflow","akhaliq/MiniMax-M3","smolagents/ml-intern","sowmiyan-s/Multi-Agent-Data-Analysis-with-CrewAI","vrfefavr/alumini_feedback","diyanmuhhamed/jarvisdataset","sshinmen/shin","taemin1980/shadowbrain","enfoquealafamilia/enfoque-proto-chat","AdhyanshVerma/versioncheckerfordrivepurge","bep40/ml-intern","Sam-max1/healthexpert","akshayyy1/vector-auditor","ayb-bh92/99rou","Sam-max1/nitdaa","VigneshCEO/MiniMaxAI-MiniMax-M3","Jarvis2345/jarvis-cloud","nasimulnoobgamer/MiniMaxAI-MiniMax-M3","gffgbgfbghn/MiniMaxAI-MiniMax-M3","Leakst27/MiniMaxAI-MiniMax-M3","abhay1704/content-generator-rsi","vukmi/MiniMaxAI-MiniMax-M3","developerjeremylive/MiniMax-M3-etheroi","rndashboard/rndashboard","epic98/meta-shorts-agent","Bbd703/MiniMaxAI-MiniMax-M3","SocialMedia007/voice-onboarding-saas","ItsBounvy/bot_host","erdemsanver/DefineX_Bankacilik_Analiz_Platformu","augment17/agentscope","mmrech/ml-intern","zaid646/genai-agent-demo","zaid646/evals-studio-demo","zaid646/rag-pipeline-demo","elmarcito/nvidia","Chris4K/ml-intern","Qian7988/qianxi-blog-backend","ghananlpcommunity/nsanku-mmlu-leaderboard","vijayrad/MiniMaxAI-MiniMax-M3","SabaPivot/repro-envisioning-beyond-the-few-disentangled-semantics-and-primitives-for-few-shot-atypical-lay","Atharv916402/ClaudeCode","mirxa2/laguna-s-21-uncensored-demo","SuperPauly/MiniMax-Music3-workflow"],"createdAt":"2026-06-02T07:49:31.000Z","safetensors":{"parameters":{"BF16":426993800960,"F32":46339200},"total":427040140160},"inference":"warm","usedStorage":1708357470332}