Instructions to use nvidia/parakeet-tdt-0.6b-v3 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use nvidia/parakeet-tdt-0.6b-v3 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("automatic-speech-recognition", model="nvidia/parakeet-tdt-0.6b-v3")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("nvidia/parakeet-tdt-0.6b-v3", dtype="auto") - Inference
- Notebooks
- Google Colab
- Kaggle
CUDA out of memory with long audio
Hello All,
I'm trying to transcribe an audio of some minutes long and I receive the following error message:
torch.OutOfMemoryError: CUDA out of memory. Tried to allocate 16.98 GiB. GPU 0 has a total capacity of 6.00 GiB of which 1.30 GiB is free. Of the allocated memory 3.21 GiB is allocated by PyTorch, and 548.46 MiB is reserved by PyTorch but unallocated. If reserved but unallocated memory is large try setting PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True to avoid fragmentation. See documentation for Memory Management
My graphic card is a NVIDIA Geforce 1060 6 GB.
These are the commands that I have used:
python
import nemo.collections.asr as nemo_asr
asr_model = nemo_asr.models.ASRModel.from_pretrained(model_name="nvidia/parakeet-tdt-0.6b-v3")
asr_model.change_attention_model(self_attention_model="rel_pos_local_attn", att_context_size=[256, 256])
asr_model.transcribe(['V:\audio.wav'])
*** Error message ***
I tried with:
asr_model.transcribe(['V:\audio.wav'], batch_size=1)
but, the same response:
*** Error message ***
I'm able to transcribe audios of some seconds but, with audios of some minutes I get the error.
I suppose that the error is related to the length of the audio, is there some configuration to transcribe a long audio to avoid the out of memory?
Thanks for your comments.
Regards,
Carlos