Instructions to use Vikhrmodels/Borealis with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Vikhrmodels/Borealis with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("automatic-speech-recognition", model="Vikhrmodels/Borealis", trust_remote_code=True)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("Vikhrmodels/Borealis", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -49,7 +49,7 @@ proc = extractor(
|
|
| 49 |
)
|
| 50 |
|
| 51 |
mel = proc.input_features.squeeze(0).to(device)
|
| 52 |
-
|
| 53 |
|
| 54 |
with torch.inference_mode():
|
| 55 |
transcript = model.generate(mel=mel, att_mask=att_mask, **generation_params)
|
|
|
|
| 49 |
)
|
| 50 |
|
| 51 |
mel = proc.input_features.squeeze(0).to(device)
|
| 52 |
+
att_mask = proc.attention_mask.squeeze(0).to("cuda")
|
| 53 |
|
| 54 |
with torch.inference_mode():
|
| 55 |
transcript = model.generate(mel=mel, att_mask=att_mask, **generation_params)
|