Instructions to use nvidia/canary-1b-v2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- NeMo
How to use nvidia/canary-1b-v2 with NeMo:
import nemo.collections.asr as nemo_asr asr_model = nemo_asr.models.ASRModel.from_pretrained("nvidia/canary-1b-v2") transcriptions = asr_model.transcribe(["file.wav"]) - Notebooks
- Google Colab
- Kaggle
⚠️ DO NOT MERGE: feat(transformers): Add native Transformers weights and usage
What does this PR do?
→ Adds the Transformers-format checkpoint (model.safetensors, config.json, generation_config.json, processor, tokenizer and chat template files) alongside the existing canary-1b-v2.nemo, so the model loads directly with AutoModelForSpeechSeq2Seq / AutoProcessor 🤗
→ Adds a ### 2) Transformers 🤗 usage section to the model card (pipeline, transcription, translation, batch inference and training examples) and the Transformers tag. This mirrors what was done for nvidia/parakeet-tdt-0.6b-v3 in https://huggingface.co/nvidia/parakeet-tdt-0.6b-v3/discussions/39 and https://huggingface.co/nvidia/parakeet-tdt-0.6b-v3/discussions/40
→ Transformers support is being added in https://github.com/huggingface/transformers/pull/46825
→ ⚠️ This PR is a draft: please do not merge it until the Transformers PR above has landed 🤗
Produced by?
→ Weights are exported from canary-1b-v2.nemo with the conversion script that ships with the Transformers PR (src/transformers/models/canary/convert_canary_nemo_to_hf.py); the FastConformer encoder is loaded through the existing ParakeetEncoder, and the decoder weights are permuted to the Transformers concatenated sin/cos positional layout.
→ Verified against NeMo baselines: transcription, translation and batch generations are reproduced exactly, and the slow integration tests in the Transformers PR run against these exact files.