AlexHung29629
commited on
Update ultravox_model.py
Browse files- ultravox_model.py +2 -1
ultravox_model.py
CHANGED
@@ -201,7 +201,8 @@ class UltravoxModel(transformers.LlamaPreTrainedModel):
|
|
201 |
for i, (audio, start, length) in enumerate(
|
202 |
zip(audio_embeds, audio_token_start_idx, audio_token_len)
|
203 |
):
|
204 |
-
|
|
|
205 |
|
206 |
|
207 |
lm_output = self.language_model.forward(
|
|
|
201 |
for i, (audio, start, length) in enumerate(
|
202 |
zip(audio_embeds, audio_token_start_idx, audio_token_len)
|
203 |
):
|
204 |
+
assert length <= audio.shape[0]
|
205 |
+
inputs_embeds[i, start : start + length].copy_(audio[:length])
|
206 |
|
207 |
|
208 |
lm_output = self.language_model.forward(
|