AlexHung29629
commited on
Commit
•
b1d3dc4
1
Parent(s):
2bd9327
Update ultravox_model.py
Browse files- ultravox_model.py +2 -6
ultravox_model.py
CHANGED
@@ -201,12 +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 |
-
except:
|
207 |
-
print(f"{i=}, {audio.shape=}, {start=}, {length=}, {inputs_embeds[i].shape=}")
|
208 |
-
print(f"{labels[i]=}")
|
209 |
-
exit(1)
|
210 |
|
211 |
lm_output = self.language_model.forward(
|
212 |
inputs_embeds=inputs_embeds,
|
|
|
201 |
for i, (audio, start, length) in enumerate(
|
202 |
zip(audio_embeds, audio_token_start_idx, audio_token_len)
|
203 |
):
|
204 |
+
inputs_embeds[i, start : start + length] = audio
|
205 |
+
|
|
|
|
|
|
|
|
|
206 |
|
207 |
lm_output = self.language_model.forward(
|
208 |
inputs_embeds=inputs_embeds,
|