model: Add NVIDIA Canary-1B-v2 to Transformers
Author: harshaljanjani
Pull request: yes
Labels: name: New model

name: Audio

<!-- ci-dashboard-badge:start -->
[![CI](https://transformers-ci.lor-e.huggingface.cool/badge/pr?pr=46825)](https://transformers-ci.lor-e.huggingface.cool/d/pytest-observability-by-pr/pytest-observability-branch?var-pr=46825)
<!-- ci-dashboard-badge:end -->

### What does this PR do?

→ This PR adds **Canary 1B v2** to Transformers!

**References:**
→ [Model Checkpoints](https://huggingface.co/nvidia/canary-1b-v2)
→ [GitHub Repository](https://github.com/NVIDIA-NeMo/NeMo)
→ [Transformers Converted Checkpoints](https://huggingface.co/harshaljanjani/canary-1b-v2-hf)
→ [Research Paper](https://arxiv.org/pdf/2509.14128)
→ [Testing Script](https://gist.github.com/harshaljanjani/b20669e0864008a9d2c106627414517d)

Rebased on top of @eustlb's [#40756](https://github.com/huggingface/transformers/pull/40756)

cc: @ebezzam @Rocketknight1

### Multilingual Transcription and Test Results

* `transformers` version: `5.13.0.dev0`
* Platform: `Linux-6.8.0-1060-gcp-x86_64-with-glibc2.35`
* Python version: `3.11.15`
* `huggingface_hub` version: `1.20.1`
* `safetensors` version: `0.8.0`
* `accelerate` version: `1.14.0`
* DeepSpeed version: `not installed`
* PyTorch version (accelerator?): `2.11.0+cu130 (CUDA)`
* GPU type: `NVIDIA L4`
* CUDA version: `13.0`

<img alt="2" src="https://github.com/user-attachments/assets/df6d8008-477a-4f57-a552-a7f27cef9ca0" />
<img alt="1" src="https://github.com/user-attachments/assets/adae527b-63b4-4dce-8f6e-6146431f9ac2" />

### Before submitting

- [x] This PR adds a new model to Transformers.
- [x] Did you read the [contributor guidelines](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md#create-a-pull-request), specifically the Pull Request section?
- [x] Did you make sure to update the documentation with your changes? Here are the [documentation guidelines](https://github.com/huggingface/transformers/tree/main/docs), and here are tips on formatting docstrings.
- [x] Did you add any necessary tests?

Comments:
Good day @eustlb @ebezzam, just a gentle ping in regard to model reviews!

Good day @ebezzam! Just bumping this up for whenever you find the time; thanks!

Thanks for your time @ebezzam; left replies, addressed the review comments and verified that there are no regressions across the test suite or in generation. I suspect the failures are alluding to cache warmup and will be fixed with [this](https://github.com/huggingface/transformers/pull/46825#discussion_r3544871808) review when we get to it?

<img alt="image" src="https://github.com/user-attachments/assets/d139a07e-f273-430c-b829-7420938eb8eb" />

<!-- ci-dashboard-recap:start -->

---

### CI recap

**Dashboard:** [View test results in Grafana](https://transformers-ci.lor-e.huggingface.cool/d/pytest-observability-by-pr/pytest-observability-branch?var-pr=46825)
**Latest run:** [29009401108:2](https://github.com/huggingface/transformers/actions/runs/29009401108)
**Result:** `failure` | **Jobs:** 15 | **Tests:** 171,039 | **Failures:** 8 | **Duration:** 19h 53m

<!-- ci-dashboard-recap:end -->

Good day @ebezzam! Just checking in to see if there've been any updates :)

Thank you for your contribution 🤗!

## CI Security Gate — automatic approval blocked

This PR was **not** automatically approved for CI because the security gate failed.

**Possible reasons:**
- The PR touches 50 or more files — only PRs with fewer than 50 changed files are automatically approved
- A changed file is outside the allowed directories (`src/`, `tests/`, `docs/`, `utils/`), has a disallowed extension (only `.py`, `.txt`, `.md` permitted outside `tests/` and `docs/`), or is not `.md`/`.yml` inside `docs/`
- A new high-severity security issue was detected in the changed Python files (Bandit check)

See the [workflow run](https://github.com/huggingface/transformers/actions/runs/29505049480) for the exact violations.

A maintainer can review and manually approve CI if a finding is a false positive.

**[For maintainers]** Suggested jobs to run (before merge)

run-slow: auto, canary

Thank you for your time @ebezzam, resolved with [e4bd5](https://github.com/huggingface/transformers/pull/46825/commits/e4bd5a9bdf877b19bd67d85b408e7aa594a6c54f) and also verified that there are no regressions 🤗
(seems like the CI gate blocks fork PRs, needs a manual approve when you get a chance :))

<img src="https://github.com/user-attachments/assets/4d8b3339-5bd3-4f82-98cb-32054dbc5921" />