feat(transformers): Add native Transformers weights and usage

#27

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

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.

harshaljanjani changed pull request title from ⚠️ DO NOT MERGE: feat(transformers): Add native Transformers weights and usage to feat(transformers): Add native Transformers weights and usage
harshaljanjani changed pull request status to open
NVIDIA org

LGTM. Thanks!

nithinraok changed pull request status to merged

Sign up or log in to comment