fix audio batch inference
Browse files- modeling_minicpmo.py +1 -1
modeling_minicpmo.py
CHANGED
@@ -589,7 +589,7 @@ class MiniCPMO(MiniCPMOPreTrainedModel):
|
|
589 |
audio_start_pos = 0
|
590 |
for bound in audio_bounds[i]:
|
591 |
audio_len = bound[1] - bound[0]
|
592 |
-
input_embeddings[
|
593 |
audio_start_pos : audio_start_pos + audio_len, :
|
594 |
]
|
595 |
audio_start_pos += audio_len
|
|
|
589 |
audio_start_pos = 0
|
590 |
for bound in audio_bounds[i]:
|
591 |
audio_len = bound[1] - bound[0]
|
592 |
+
input_embeddings[i, bound[0] : bound[1]] = audio_embs[
|
593 |
audio_start_pos : audio_start_pos + audio_len, :
|
594 |
]
|
595 |
audio_start_pos += audio_len
|