⚠️ DO NOT MERGE: 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
→ ⚠️ 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.

Publish this branch
This branch is in draft mode, publish it to be able to merge.

Sign up or log in to comment