Add Granite-swa and Granitemoe-swa model support
Author: daviswer
Pull request: yes

<!-- ci-dashboard-badge:start -->
[![CI](https://transformers-ci.lor-e.huggingface.cool/badge/pr?pr=47179)](https://transformers-ci.lor-e.huggingface.cool/d/pytest-observability-by-pr/pytest-observability-branch?var-pr=47179)
<!-- ci-dashboard-badge:end -->

# What does this PR do?

Adds two new models for upcoming Granite model releases, combining existing Granite/Granitemoe architectures respectively with per-layer **sliding window attention** and **learnable per-head attention sinks**. Supports shared experts, flash3+4 attention, and per-layer Rope/Nope toggling as well, following existing patterns (granitemoe, gpt-oss, llama4 respectively). SDPA and FlexAttention not currently supported.

Fixes #46645.

## Code Agent Policy
- [x] I confirm that this is not a pure code agent PR.

Claude Code assisted in implementing these code changes; I have reviewed every line and run the HF formatting and correctness tests (SDPA, Flash2, and TP are skipped, as SDPA and Flash2 do not support sink tokens, and TP specifies SDPA). 


## Before submitting
- [ ] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
- [x] Did you read the [contributor guideline](https://huggingface.co/docs/transformers/contributing) and the
      [Pull Request](https://huggingface.co/docs/transformers/pr_checks) checks?
- [x] Was this discussed/approved via a Github issue or the [forum](https://discuss.huggingface.co/)? Please add a link
      to it if that's the case.
      (See #46645)
- [x] Did you make sure to update the documentation with your changes according to the [guidelines](https://github.com/huggingface/transformers/tree/main/docs)?
- [x] Did you write any new necessary [tests](https://huggingface.co/docs/transformers/testing)?


## Who can review?
@ArthurZucker @Cyrilvallez @vasqu

Comments:
Thanks @vasqu for the comments! I've made changes incorporating your feedback, up to 1) keeping the custom forward implementation for eager, 2) still skipping the EP tests, not entirely sure what you had in mind there? and 3) need to find out if tying rope/nope to layer type is future-safe on our end

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/29439774773) for the exact violations.

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

I updated the moe code so it runs against the EP tests (though isn't quite modular anymore). It also turns out that we want to support different rope thetas for different layers, regardless of attention type, not just a binary rope/nope decision, so the old 1/0 list has been replaced with a list of per-layer frequencies (with 0 for Nope, and defaulting to the global rope_theta param when None or unspecified). Current model correctness is unaffected. I _think_ this addresses all of your first-round comments at this point @vasqu 

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

run-slow: auto, granite_swa, granitemoe_swa

<!-- 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=47179)
**Latest run:** [29599217065:2](https://github.com/huggingface/transformers/actions/runs/29599217065)
**Result:** `failure` | **Jobs:** 15 | **Tests:** 172,763 | **Failures:** 1 | **Duration:** 3h 58m

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