Skip to content

[model] support kimi-k2.5 transformers & megatron#8239

Open
Jintao-Huang wants to merge 2 commits intomodelscope:mainfrom
Jintao-Huang:support_kimi_k25
Open

[model] support kimi-k2.5 transformers & megatron#8239
Jintao-Huang wants to merge 2 commits intomodelscope:mainfrom
Jintao-Huang:support_kimi_k25

Conversation

@Jintao-Huang
Copy link
Collaborator

No description provided.

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request introduces comprehensive support for the 'kimi-k2.5' model across the system. It involves updating various model type enumerations and architectural definitions to properly recognize and handle this new transformer model, ensuring its compatibility with both general model functionalities and Megatron-specific implementations.

Highlights

  • New Model Support: Added 'kimi_k25' to the list of supported MLLM Megatron model types, enabling its recognition within the Megatron framework.
  • Model Type Recognition Logic: Integrated 'kimi_k25' into the model type grouping logic within the GPT bridge, ensuring correct handling for specific configurations.
  • General Model Type Expansion: Included 'kimi_k25' in the general MLLM model type definitions, broadening the system's overall model compatibility.
  • Model Architecture Definition: Registered 'kimi_k25' as a new model architecture, allowing the system to correctly identify and utilize its structure.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • swift/megatron/model/constant.py
    • Added 'kimi_k25' to the MLLMMegatronModelType enum.
  • swift/megatron/model/gpt_bridge.py
    • Included 'kimi_k25' in the _get_hf_grouped method's model type check.
  • swift/model/constant.py
    • Added 'kimi_k25' to the MLLMModelType enum.
  • swift/model/model_arch.py
    • Added 'kimi_k25' to the MLLMModelArch enum.
Activity
  • No specific activity (comments, reviews, progress updates) has been recorded for this pull request yet.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

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

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 kimi-k2.5 model. The changes involve updating model type enumerations and configurations in several files. The additions are consistent with existing patterns. I've provided a suggestion to improve maintainability by sorting a set of model types.

Comment on lines 738 to +740
'qwen2_moe', 'qwen3_moe', 'deepseek_v2', 'deepseek_v3', 'kimi_k2', 'dots1', 'ernie4_5_moe', 'glm4_moe',
'glm4_moe_lite', 'glm4v_moe', 'minimax_m2', 'olmoe', 'qwen3_next', 'kimi_vl', 'qwen3_omni_moe',
'qwen3_5_moe', 'glm_moe_dsa', 'deepseek_v32'
'qwen3_5_moe', 'glm_moe_dsa', 'deepseek_v32', 'kimi_k25'
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

For better readability and easier maintenance, please consider keeping the model types in this set sorted alphabetically.

Suggested change
'qwen2_moe', 'qwen3_moe', 'deepseek_v2', 'deepseek_v3', 'kimi_k2', 'dots1', 'ernie4_5_moe', 'glm4_moe',
'glm4_moe_lite', 'glm4v_moe', 'minimax_m2', 'olmoe', 'qwen3_next', 'kimi_vl', 'qwen3_omni_moe',
'qwen3_5_moe', 'glm_moe_dsa', 'deepseek_v32'
'qwen3_5_moe', 'glm_moe_dsa', 'deepseek_v32', 'kimi_k25'
'deepseek_v2', 'deepseek_v3', 'deepseek_v32', 'dots1', 'ernie4_5_moe', 'glm4_moe',
'glm4_moe_lite', 'glm_moe_dsa', 'glm4v_moe', 'kimi_k2', 'kimi_k25', 'kimi_vl',
'minimax_m2', 'olmoe', 'qwen2_moe', 'qwen3_5_moe', 'qwen3_moe', 'qwen3_next', 'qwen3_omni_moe'

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.

1 participant