diff --git a/python/sglang/srt/managers/multimodal_processors/minicpm.py b/python/sglang/srt/managers/multimodal_processors/minicpm.py index 0f189b7be..35b41bab4 100644 --- a/python/sglang/srt/managers/multimodal_processors/minicpm.py +++ b/python/sglang/srt/managers/multimodal_processors/minicpm.py @@ -97,7 +97,7 @@ class MiniCPMMultimodalProcessor(BaseMultimodalProcessor): audio_start_id = tokenizer.audio_start_id audio_end_id = tokenizer.audio_end_id - im_token_id = tokenizer.unk_token_id + im_token_id = tokenizer.unk_id pixel_values = res["pixel_values"] tgt_sizes = res["tgt_sizes"] diff --git a/python/sglang/srt/managers/schedule_batch.py b/python/sglang/srt/managers/schedule_batch.py index 6b8506ddc..4b51a09d7 100644 --- a/python/sglang/srt/managers/schedule_batch.py +++ b/python/sglang/srt/managers/schedule_batch.py @@ -374,6 +374,12 @@ class MultimodalInputs: self.mrope_position_delta = torch.cat( [self.mrope_position_delta, other.mrope_position_delta], dim=0 ) + + for key, val in other.__dict__.items(): + if "_id" in key: + # set token_ids + if getattr(self, key, None) is None: + setattr(self, key, getattr(other, key, None)) # other args would be kept intact