[model] kimi_k25 support mm#9497
Conversation
There was a problem hiding this comment.
Code Review
This pull request adds image support to the KimiK25Template class in swift/template/templates/moonshot.py by implementing custom replace_tag, _encode, _data_collator_mm_data, and _post_encode methods. The review feedback highlights three critical issues: first, replace_tag should fall back to super().replace_tag for non-image media types to prevent downstream TypeErrors; second, the list of tensors returned by _extract_image_features must be concatenated before being passed to mm_projector to avoid runtime errors; and third, the hardcoded media pad token ID should be dynamically retrieved from the tokenizer for better maintainability.
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.
#9479