Skip to content

[model] support minimax_m3 - #9553

Merged
Jintao-Huang merged 12 commits into
modelscope:mainfrom
Jintao-Huang:support_minimax_m3
Jun 16, 2026
Merged

Jintao-Huang merged 12 commits into
modelscope:mainfrom
Jintao-Huang:support_minimax_m3

Conversation

@Jintao-Huang

Copy link
Copy Markdown
Collaborator

No description provided.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds support for the MiniMax-M3 VL multimodal model, introducing the MinimaxM3AgentTemplate for XML-based tool calling and the MinimaxM3VLTemplate for handling image and video inputs alongside thinking instructions. The code reviewer identified several issues and improvement opportunities: a bug in XML parsing where nested lists fail to parse correctly due to non-greedy regex matching, a type mismatch in token splitting where a list is passed instead of an integer, and redundant code including an unused _iter_tagged helper and an unnecessary _data_collator_mm_data method override.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread swift/agent_template/minimax_m3.py
Comment thread swift/agent_template/minimax_m3.py
Comment thread swift/template/templates/minimax.py Outdated
Comment thread swift/template/templates/minimax.py Outdated
@Jintao-Huang

Copy link
Copy Markdown
Collaborator Author

/gemini review

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds support for the MiniMax-M3 multimodal model and its corresponding agent template, including documentation updates, model registration, and architecture configuration. The feedback highlights several critical improvement opportunities: adding validation to prevent mismatches between media tokens and provided media in the template encoder, implementing a recursive helper function to safely replace placeholders in nested template prompts, and adding robust checks for malformed tool calls in the agent template.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread swift/template/templates/minimax.py
Comment thread swift/agent_template/minimax_m3.py
Comment thread swift/agent_template/minimax_m3.py
@Jintao-Huang
Jintao-Huang merged commit f1f5756 into modelscope:main Jun 16, 2026
5 of 6 checks passed
Jintao-Huang added a commit that referenced this pull request Jun 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants