Conversation
There was a problem hiding this comment.
Code Review
This pull request refactors mm_projection_auto in kimi_k25.py to return a single flattened feature tensor directly, avoiding redundant split and concatenate operations. It also adds unit tests to verify this behavior. The review feedback points out a correctness bug where a 3D tensor could be returned instead of a 2D tensor if mm_projector is None, and suggests a performance optimization to avoid calling torch.cat when there is only a single image in the sequence.
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.
…fastpath-safe-update # Conflicts: # python/sglang/srt/models/kimi_k25.py
Summary
Kimi K2.5/K2.7's non-DP image path currently does:
The language-model embedding path only consumes the packed tensor. This PR keeps the packed result and also accepts an already-packed tensor, removing the redundant split/cat and its extra allocation/copy.
Performance
NVIDIA RTX 5090 (SM120), CUDA 13.0, BF16, 1152-wide MoonViT outputs with a lightweight flattening projector. This isolates the packing overhead and is not an end-to-end serving claim.
The benchmark uses the same projector call in both paths; only the post-projector split/cat is changed.
Correctness / validation
git diff --checkpass.huggingface_hub==1.6.0rejects an existing SGLang strict dataclass definition; this is unrelated to the patch and is covered by the repository CI environment.CI States
Latest PR Test (Base): 🚫 Run #29550245282
Latest PR Test (Extra): ❌ Run #29550245261