Skip to content

Add Qwen3-VL-30B-A3B - #4517

Merged
copybara-service[bot] merged 1 commit into
mainfrom
qwen3-vl-30b-a3b
Aug 4, 2026
Merged

copybara-service[bot] merged 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.

Key Changes
  • 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.
  • Added a qwen_layer_test.py to pass the codecov coverage check.
Reference

Tests

Checkpoint conversion went through

python3 -m maxtext.checkpoint_conversion.to_maxtext \
  src/maxtext/configs/base.yml \
  model_name=qwen3-vl-30b-a3b \
  base_output_directory=<your gs or local path> \
  scan_layers=false \
  hf_access_token=<your token> \
  weight_dtype=bfloat16 \
  hardware=cpu \
  skip_jax_distributed_system=True \
  checkpoint_storage_use_ocdbt=False \
  checkpoint_storage_use_zarr3=False \
  --eager_load_method=safetensors \
  --lazy_load_tensors=False \
  pure_nnx=false enable_nnx=false pure_nnx_decoder=false
Decoding
  • Prerequisites
export HF_TOKEN=<Your token>
export MODEL_BUCKET=gs://ly-maxtext
  • Image decoding
bash tests/end_to_end/tpu/qwen3/vl_30b/test_qwen3_vl_30b_to_hf_e2e.sh --hf_token=${HF_TOKEN} --model_bucket=${MODEL_BUCKET} --hf_home=/dev/shm/hf_cache --idx=2026-08-03-16-52 --norun_convert_to_maxtext --norun_forward_pass --run_image_decoding > test_e2e_30_image_decode.txt 2>&1

output -> This is a panoramic view of the Seattle skyline on a bright, sunny day. The image is taken from an elevated vantage point, looking across the city towards the horizon. In the foreground, the tops of green trees are visible, suggesting the photo was taken from a park or hillside. The midground is dominated by the dense urban landscape of Seattle, featuring a mix of modern high-rise buildings and lower residential structures. The most prominent feature is the iconic Space Needle, standing tall and central in the frame. Its distinctive saucer-shaped observation deck and slender support structure are clearly visible. Surrounding it are numerous skyscrapers of varying heights and architectural styles, creating a dynamic cityscape. In the background, a range of snow-capped mountains, likely the Cascade Range, rises above the city. The peaks are partially obscured by a few scattered white clouds. The sky above is a clear, vibrant blue, indicating fair weather. The overall impression is one of a vibrant, modern city set against a dramatic natural backdrop. This is a panoramic view of the Seattle skyline on a bright, sunny day. The image is taken from an elevated vantage point, looking across the city towards the horizon. In the foreground, the tops of green trees are visible,

  • Video decoding
bash tests/end_to_end/tpu/qwen3/vl_30b/test_qwen3_vl_30b_to_hf_e2e.sh --hf_token=${HF_TOKEN} --model_bucket=${MODEL_BUCKET} --hf_home=/dev/shm/hf_cache --idx=2026-08-03-16-52 --norun_convert_to_maxtext --norun_forward_pass --run_video_decoding > test_e2e_30_video_decode.txt 2>&1

output -> The single exhibit in this video is classified as a dinosaur model.

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 63.15789% with 14 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 84.61% 0 Missing and 4 partials ⚠️
src/maxtext/layers/decoders.py 0.00% 1 Missing ⚠️
src/maxtext/layers/nnx_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

@hengtaoguo hengtaoguo 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.

Thanks for the great contribution!

Comment thread tests/unit/qwen3_vl_layers_test.py Resolved
Comment thread tests/unit/param_mapping_test.py Resolved
Comment thread pytest.ini Resolved
@lydhr
lydhr force-pushed the qwen3-vl-30b-a3b branch 6 times, most recently from 2a2ddb2 to 14d5316 Compare August 3, 2026 17:48
@lydhr
lydhr force-pushed the qwen3-vl-30b-a3b branch from 14d5316 to e39e61e Compare August 3, 2026 22:20
@lydhr lydhr changed the title [WIP] Add Qwen3-VL-30B-A3B Add Qwen3-VL-30B-A3B Aug 3, 2026
@lydhr
lydhr force-pushed the qwen3-vl-30b-a3b branch from e39e61e to 251ca64 Compare August 4, 2026 22:48
@copybara-service
copybara-service Bot merged commit 834e4ba into main Aug 4, 2026
42 of 45 checks passed
@copybara-service
copybara-service Bot deleted the qwen3-vl-30b-a3b branch August 4, 2026 23:47
@lydhr lydhr mentioned this pull request Aug 17, 2026
4 tasks done
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.

3 participants