Instructions to use AlexHung29629/test_mllama_v16 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use AlexHung29629/test_mllama_v16 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("feature-extraction", model="AlexHung29629/test_mllama_v16", trust_remote_code=True)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("AlexHung29629/test_mllama_v16", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
Update ultravox_model.py
Browse files- ultravox_model.py +2 -1
ultravox_model.py
CHANGED
|
@@ -196,7 +196,8 @@ class UltravoxModel(transformers.LlamaPreTrainedModel):
|
|
| 196 |
for i, (audio, start, length) in enumerate(
|
| 197 |
zip(audio_embeds, audio_token_start_idx, audio_token_len)
|
| 198 |
):
|
| 199 |
-
|
|
|
|
| 200 |
|
| 201 |
|
| 202 |
lm_output = self.language_model.forward(
|
|
|
|
| 196 |
for i, (audio, start, length) in enumerate(
|
| 197 |
zip(audio_embeds, audio_token_start_idx, audio_token_len)
|
| 198 |
):
|
| 199 |
+
assert length <= audio.shape[0]
|
| 200 |
+
inputs_embeds[i, start : start + length].copy_(audio[:length])
|
| 201 |
|
| 202 |
|
| 203 |
lm_output = self.language_model.forward(
|