Skip to content

fix(qwen3-asr): preserve native auto registrations - #4876

Merged
sajadn merged 1 commit into
NVIDIA-NeMo:mainfrom
aoshen02:codex/qwen3-asr-native-registration
Jul 16, 2026
Merged

sajadn merged 1 commit into
NVIDIA-NeMo:mainfrom
aoshen02:codex/qwen3-asr-native-registration

Conversation

@aoshen02

Copy link
Copy Markdown
Contributor

Summary

  • register the vendored Qwen3-ASR Auto classes only when Transformers does not already provide the qwen3_asr model type
  • preserve Transformers' native Qwen3-ASR registrations on newer releases
  • add unit coverage for both the native-present and native-absent paths

Motivation

megatron.bridge imports all model registrations eagerly. Transformers 5.13.1 now ships a native qwen3_asr config, so the unconditional vendored registration raises:

ValueError: 'qwen3_asr' is already used by a Transformers config, pick another name.

That prevents every Bridge consumer from importing, even when Qwen3-ASR is not selected. This is visible with the vLLM 0.25.1 base image, which ships Transformers 5.13.1.

Using exist_ok=True would replace the native global registration with Bridge's vendored schema. This change instead leaves the native registry untouched and retains the existing vendored fallback for Transformers releases without native Qwen3-ASR support.

This follows the import-safety goal in #4314: an unused model integration should not make import megatron.bridge fail.

Validation

  • ruff format --check and ruff check on the changed files
  • focused registration unit tests: 2 passed
  • Transformers 5.13.1 probe: import megatron.bridge succeeds and the native Qwen3-ASR config remains registered
  • Transformers 5.8.1 probe: import megatron.bridge succeeds and the vendored Qwen3-ASR config is registered

Signed-off-by: aoshen02 <aoshen@inferact.ai>
@copy-pr-bot

copy-pr-bot Bot commented Jul 15, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@yaoyu-33 yaoyu-33 added area:model Model implementations and HF bridge logic bug Something isn't working needs-review PR is ready for code review and waiting on a reviewer labels Jul 15, 2026
@ISEEKYAN

Copy link
Copy Markdown
Contributor

/ok to test 6019e59

@yaoyu-33 yaoyu-33 added ready-to-merge PR is approved, current, and only waiting for CI to pass before merge and removed needs-review PR is ready for code review and waiting on a reviewer labels Jul 15, 2026
@sajadn
sajadn merged commit 0391563 into NVIDIA-NeMo:main Jul 16, 2026
73 checks passed
chochowski pushed a commit to chochowski/Megatron-Bridge that referenced this pull request Jul 21, 2026
@bvolpato bvolpato mentioned this pull request Aug 3, 2026
4 tasks done

This branch was previously deployed

2 inactive deployments
public — 6019e59b Deployed Jul 15, 2026 by copy-pr-bot[bot] via release / finalize / publish-docs #2775
test — 6019e59b Deployed Jul 15, 2026 by copy-pr-bot[bot] via cicd-wait-in-queue #18024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:model Model implementations and HF bridge logic bug Something isn't working community-request ready-to-merge PR is approved, current, and only waiting for CI to pass before merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants