[Feature] Xiaomi MiMo-V2.5 day0 support (#23811)

Co-authored-by: 张袁 <zhangyuan36@xiaomi.com>
Co-authored-by: 刘安岐 <liuanqi6@xiaomi.com>
Co-authored-by: Xinyuan Tong <xinyuantong.cs@gmail.com>
Co-authored-by: Shangming Cai <csmthu@gmail.com>
Co-authored-by: Xinyuan Tong <115166877+JustinTong0323@users.noreply.github.com>
This commit is contained in:
Zhonghua Deng
2026-05-01 00:02:26 +08:00
committed by GitHub
co-authored by 张袁 刘安岐 Xinyuan Tong Shangming Cai Xinyuan Tong
parent cf4f462094
commit 651af06a0b
16 changed files with 4369 additions and 87 deletions
+9 -4
View File
@@ -35,7 +35,7 @@ from typing import Callable, Dict, List, Optional, Tuple, Union
from typing_extensions import Literal
from sglang.srt.entrypoints.openai.protocol import ChatCompletionRequest
from sglang.srt.utils import ImageData, read_system_prompt_from_file
from sglang.srt.utils import ImageData, VideoData, read_system_prompt_from_file
class SeparatorStyle(IntEnum):
@@ -97,7 +97,7 @@ class Conversation:
audio_token: str = "<audio>"
image_data: Optional[List[ImageData]] = None
video_data: Optional[List[str]] = None
video_data: Optional[List[Union[str, VideoData]]] = None
modalities: Optional[List[str]] = None
stop_token_ids: Optional[int] = None
@@ -413,9 +413,14 @@ class Conversation:
"""Append a new image."""
self.image_data.append(ImageData(url=image, detail=detail))
def append_video(self, video: str):
def append_video(self, video: str, preprocess_kwargs: Optional[Dict] = None):
"""Append a new video."""
self.video_data.append(video)
if preprocess_kwargs:
self.video_data.append(
VideoData(video, preprocess_kwargs=preprocess_kwargs)
)
else:
self.video_data.append(video)
def append_audio(self, audio: str):
"""Append a new audio."""