Skip to content

Add Qwen3-VL-30B-A3B#4517

Open
lydhr wants to merge 1 commit into
mainfrom
qwen3-vl-30b-a3b
Open

Add Qwen3-VL-30B-A3B#4517
lydhr wants to merge 1 commit into
mainfrom
qwen3-vl-30b-a3b

Conversation

@lydhr

@lydhr lydhr commented Jul 17, 2026

Copy link
Copy Markdown
Collaborator

Description

This PR adds support for the Qwen/Qwen3-VL-30B-A3B-Instruct model in MaxText, integrating this advanced Multimodal Vision-Language Model (VLM) which features a Mixture-of-Experts (MoE) text decoder.

Key Changes & Context
  • New Architecture Enablement: Brought up qwen3-vl-30b-a3b using standard Qwen3-style decoder pathways paired with custom Vision Layer subclasses (Qwen3VLVisionEncoder, Qwen3VLVisionProjector).
  • Feature Additions:
    • Added modern architecture configurations in Standard yaml directories.
    • Hooked required configurations into parameter converters, processing pipes, and tensor reshape/merge methods.
    • Resolved conflicts regarding positional Embedding/attention parameters unique to MOE scaling.
  • Why this pipeline: Enables parity with the state-of-the-art vision-language pipelines in typical Maxtext environments smoothly bypassing legacy backend limits during Deepstack injection steps.
Implementation Specifics

• New configuration injected: src/maxtext/configs/models/qwen3-vl-30b-a3b.yml.
• Support is wired as headless decoder layers, with downstream projector transformations feeding standard decoding passes.
• Weight-transformation rules in param_mapping.py are enriched for correct layer replication vs scanning.

Tests

The changes have been thoroughly tested on a remote TPU VM environment using custom assertions and standard quick-tracing mechanisms.

  1. Quick E2E Tracing: Verified standalone processing pipelines function without memory leaks/runtime locks by bootstrapping reduced configurations with mock
    pipelines.
  2. Layer-wise equivalence (Numerical correctness): Validated JAX vision encoders and processing projectors yield output and decoder-state representations
    mathematically Equivalent to Torch baseline (HuggingFace implementations).

Checklist

  • I have performed a self-review of my code. For an optional AI review, add the gemini-review label.
  • I have necessary comments in my code, particularly in hard-to-understand areas.
  • I have run end-to-end tests tests and provided workload links above if applicable.
  • I have made or will make corresponding changes to the doc if needed, including adding new documentation pages to the relevant Table of Contents (toctree directive) as explained in our documentation.

@codecov

codecov Bot commented Jul 17, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 15.38462% with 11 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/maxtext/multimodal/processor.py 0.00% 8 Missing ⚠️
...xtext/checkpoint_conversion/utils/param_mapping.py 0.00% 2 Missing ⚠️
src/maxtext/layers/decoders.py 0.00% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@lydhr
lydhr force-pushed the qwen3-vl-30b-a3b branch 5 times, most recently from 17dc64a to 2f2a284 Compare July 19, 2026 17:49
@lydhr
lydhr force-pushed the qwen3-vl-30b-a3b branch from 2f2a284 to 1431709 Compare July 20, 2026 07:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant