Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Support Mimo-v2.5-Pro
Technical Details
Mimo-V2.5-Pro checkpoints store a single fused qkv_proj weight in TP-interleaved layout, while Flash checkpoints use separate q_proj/k_proj/v_proj. To avoid modifying the QKVParallelLinear.weight_loader interface, a model-level hook mechanism
was introduced:
via continue.
shard-based split logic.
Auto-adaptation: Flash checkpoint weight names are q_proj/k_proj/v_proj → hook never fires → normal packed_modules_mapping path. Mimo-V2.5-Pro checkpoint weight names are qkv_proj → hook intercepts and handles directly. No model-type branching needed. ref:https://github.com/sgl-project/sglang/blob/main/python/sglang/srt/models/mimo_v2.py#L1106
All class names drop the Flash suffix: MiMoV2FlashForCausalLM → MiMoV2ForCausalLM, MiMoV2FlashMTP → MiMoV2MTP, MiMoV2FlashDecoderLayer → MiMoV2DecoderLayer, etc.
Mimo-V2.5-Pro's HF config uses context_len instead of max_position_embeddings. Both model files now use getattr(config, "context_len", None) or getattr(config, "max_position_embeddings", 32768), preferring context_len when present.
Test Plan
TP8 + FP8KV
TP8 + FP8KV + MTP1
Test Result
Acc
TP8 + FP8KV
TP4 + FP8KV + MTP1
Perf
TP8 + FP8KV
data
data
cc: @billishyahao
Submission Checklist