AlexHung29629 commited on
Commit
5184d7b
1 Parent(s): fa9cccb

Update ultravox_model.py

Browse files
Files changed (1) hide show
  1. ultravox_model.py +1 -2
ultravox_model.py CHANGED
@@ -201,8 +201,7 @@ 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
- assert audio.shape[0] == length, f"{audio.shape=}, {start=}, {length=}, {inputs_embeds[i].shape=}, {audio_tower_output[i].shape=}, {audio_values.shape=}, {audio_len=}"
205
- inputs_embeds[i, start : start + length] = audio
206
 
207
 
208
  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
+ inputs_embeds[i, start : start + length] = audio[:length]
 
205
 
206
 
207
  lm_output = self.language_model.forward(