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
Update modeling_minicpmo.py
#32
by BUAADreamer - opened
- modeling_minicpmo.py +2 -0
modeling_minicpmo.py
CHANGED
|
@@ -584,6 +584,8 @@ class MiniCPMO(MiniCPMOPreTrainedModel):
|
|
| 584 |
|
| 585 |
if self.config.chunk_input:
|
| 586 |
for i in range(bs):
|
|
|
|
|
|
|
| 587 |
audio_embs = torch.cat(audio_embeddings[i], dim=0).to(
|
| 588 |
device=input_embeddings.device, dtype=input_embeddings.dtype
|
| 589 |
)
|
|
|
|
| 584 |
|
| 585 |
if self.config.chunk_input:
|
| 586 |
for i in range(bs):
|
| 587 |
+
if not audio_embeddings[i]:
|
| 588 |
+
continue
|
| 589 |
audio_embs = torch.cat(audio_embeddings[i], dim=0).to(
|
| 590 |
device=input_embeddings.device, dtype=input_embeddings.dtype
|
| 591 |
)
|