Skip to content

Add support for RADIO models - #46425

Merged
ArthurZucker merged 16 commits into
huggingface:mainfrom
meatybobby:bobchen/radio
Jul 1, 2026
Merged

ArthurZucker merged 16 commits into
huggingface:mainfrom
meatybobby:bobchen/radio

Conversation

@meatybobby

@meatybobby meatybobby commented Jun 4, 2026 •

Copy link
Copy Markdown
Contributor

CI

What does this PR do?

This PR adds support for NVIDIA RADIO models

  • I confirm that this is not a pure code agent PR.

Before submitting

  • This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
  • Did you read the contributor guideline,
    Pull Request section?
  • Was this discussed/approved via a Github issue or the forum? Please add a link
    to it if that's the case.
  • Did you make sure to update the documentation with your changes? Here are the
    documentation guidelines, and
    here are tips on formatting docstrings.
  • Did you write any new necessary tests?

Who can review?

Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.

- Move post_init() to end of __init__ so weight init applies to submodules
- Register RADIO in AutoConfig/AutoModel mappings
- Add main_input_name, _no_split_modules, supports_gradient_checkpointing
- Fix unreachable summary_idxs gather branch in _extract_final
@meatybobby meatybobby mentioned this pull request Jun 8, 2026
6 tasks
@ArthurZucker ArthurZucker reopened this Jun 24, 2026

@ArthurZucker ArthurZucker left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM I would like RadioMLP (lower cap)

all_summary = hidden_states[:, : self.config.num_cls_tokens]
summary = all_summary[:, self.summary_idxs].flatten(1)
features = hidden_states[:, num_skip:]

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there no loss here we can add?

@HuggingFaceDocBuilderDev

Copy link
Copy Markdown

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@github-actions

Copy link
Copy Markdown
Contributor

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

run-slow: auto, radio

@github-actions

Copy link
Copy Markdown
Contributor

CI recap

Dashboard: View test results in Grafana
Latest run: 28473143800:2
Result: failure | Jobs: 14 | Tests: 55,066 | Failures: 0 | Duration: 16h 16m

@ArthurZucker
ArthurZucker merged commit 17518d5 into huggingface:main Jul 1, 2026
97 of 99 checks passed
@qgallouedec qgallouedec mentioned this pull request Jul 23, 2026
2 tasks done
stevhliu pushed a commit to stevhliu/transformers that referenced this pull request Jul 30, 2026
* Add RADIO vision encoder

* Fix RADIO integration: post_init ordering, auto registration, HF attrs

- Move post_init() to end of __init__ so weight init applies to submodules
- Register RADIO in AutoConfig/AutoModel mappings
- Add main_input_name, _no_split_modules, supports_gradient_checkpointing
- Fix unreachable summary_idxs gather branch in _extract_final

* Remove uncessary files

* Keep only cradio path

* Rewrite radio for using native transformers module

* Rename submodule from RADIO->Radio, keep RADIOModel and RADIOConfig for checkpoint compatible

* Fix for consistency check

* Add config to auto_docstring

* Add radio tests

* Fix for checkers

* Modify Radio model

* Modify init weight

* Update radio.md date
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants