Any-to-Any
Transformers
Safetensors
multilingual
minicpmo
feature-extraction
minicpm-o
omni
vision
ocr
multi-image
video
custom_code
audio
speech
voice cloning
live Streaming
realtime speech conversation
asr
tts
Instructions to use openbmb/MiniCPM-o-2_6 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use openbmb/MiniCPM-o-2_6 with Transformers:
# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("openbmb/MiniCPM-o-2_6", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
add len(audio_embeddings) > 0 judge
#17
by BUAADreamer - opened
- modeling_minicpmo.py +2 -1
modeling_minicpmo.py
CHANGED
|
@@ -598,7 +598,8 @@ class MiniCPMO(MiniCPMOPreTrainedModel):
|
|
| 598 |
elif self.training:
|
| 599 |
for i in range(bs):
|
| 600 |
# dummy audio_embeddings
|
| 601 |
-
|
|
|
|
| 602 |
|
| 603 |
return input_embeddings
|
| 604 |
|
|
|
|
| 598 |
elif self.training:
|
| 599 |
for i in range(bs):
|
| 600 |
# dummy audio_embeddings
|
| 601 |
+
if len(audio_embeddings)>0:
|
| 602 |
+
input_embeddings = input_embeddings + audio_embeddings[0].mean() * 0
|
| 603 |
|
| 604 |
return input_embeddings
|
| 605 |
|