Instructions to use ibm-granite/granite-speech-4.1-2b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ibm-granite/granite-speech-4.1-2b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("automatic-speech-recognition", model="ibm-granite/granite-speech-4.1-2b")# Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("ibm-granite/granite-speech-4.1-2b") model = AutoModelForMultimodalLM.from_pretrained("ibm-granite/granite-speech-4.1-2b", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- AMD Developer Cloud
File size: 193 Bytes
739a5ad | 1 2 | {% for message in messages %}{% if message['role'] == 'user' %}USER: {{ message['content'] }}
ASSISTANT:{% elif message['role'] == 'assistant' %}{{ message['content'] }}{% endif %}{% endfor %} |