Skip to content

support kimi_k25 mm#113

Merged
Jintao-Huang merged 8 commits into
modelscope:mainfrom
Jintao-Huang:support_kimi_k25_mm
Jun 5, 2026
Merged

support kimi_k25 mm#113
Jintao-Huang merged 8 commits into
modelscope:mainfrom
Jintao-Huang:support_kimi_k25_mm

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

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 image inputs in the Kimi-K25 model (KimiK25Vit) by implementing image feature extraction, projection, and embedding masking in get_inputs_embeds, and introduces a placeholder PackedQuantizationCompressor class. The review feedback highlights a potential TypeError when passing a list of tensors directly to the projector instead of mapping over them, and recommends replacing a hardcoded image token ID with a dynamic configuration lookup.

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 src/mcore_bridge/model/mm_gpts/kimi_vl.py
Comment thread src/mcore_bridge/model/mm_gpts/kimi_vl.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

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 introduces support for packed dequantization of INT4/INT8 weights in the compressed-tensors format by adding a new PackedDequantizer utility. It integrates this dequantizer into the GPT bridge for loading MLP weights and updates the Kimi-VL model to support multi-modal inputs and image feature extraction. The review feedback identifies two critical issues in gpt_bridge.py: a potential TypeError when quantization_config is None, and a logic error where gate_proj.weight_packed is checked instead of down_proj.weight_packed when loading down-projection weights.

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 src/mcore_bridge/bridge/gpt_bridge.py
Comment thread src/mcore_bridge/bridge/gpt_bridge.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

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 introduces support for compressed-tensors quantization by adding a PackedDequantizer utility and integrating it into the GPT bridge to unpack INT4/INT8 weights. It also enables multimodal input support for the Kimi-K25 model. The review feedback highlights critical issues, including a redundant projection of image features in kimi_vl.py that could lead to incorrect outputs, the need to safely handle quantization_config when it is not a raw dictionary, and missing safety checks and zero-point handling when converting packed weights in gpt_bridge.py.

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 src/mcore_bridge/model/mm_gpts/kimi_vl.py Outdated
Comment thread src/mcore_bridge/bridge/gpt_bridge.py
Comment thread src/mcore_bridge/bridge/gpt_bridge.py
Comment thread src/mcore_bridge/bridge/gpt_bridge.py
@Jintao-Huang Jintao-Huang merged commit b500c9b into modelscope:main Jun 5, 2026
1 check passed
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