Bugfix for minicpmo vision test (#5760)
This commit is contained in:
@@ -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"]
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user