[Qwen3.5] Add moe weight sync script for 35b model#4041
Open
Rohan-Bierneni wants to merge 1 commit into
Open
Conversation
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
b05b211 to
eed71e0
Compare
eed71e0 to
0101424
Compare
|
🤖 Hi @aireenmei, I've received your request, and I'm working on it now! You can track my progress in the logs for more details. |
There was a problem hiding this comment.
This Pull Request successfully introduces the Qwen35MaxTextToVLLMConverter, enabling weight synchronization for the Qwen 3.5 35B MoE model between MaxText and vLLM. The implementation correctly handles the hybrid architecture (GDN + Attention) and includes necessary TPU-specific optimizations like 128-byte alignment for MoE experts.
🔍 General Feedback
- The converter logic is well-structured and follows the established patterns in the
torchax_convertermodule. - Proactive memory management using
gc.collect()in conversion loops is a good practice for handling large model weights. - The use of dynamic hyperparameter extraction via
getattrprovides good flexibility for different model variants. - The addition of TPU-specific GMM alignment (padding to 128) ensures compatibility with vLLM's optimized TPU kernels.
aireenmei
approved these changes
Jun 3, 2026
hengtaoguo
approved these changes
Jun 3, 2026
0101424 to
95a1fd9
Compare
fix weight sync script Onboard model to validator script and rollout file fix param mappings and converter logic to get weight conversion working Working script for weight sync Ran linter Ran linter Add max_num_batched_tokens only for qwen3.5 Ran linter Remove hardcoded configs and use model specific ones Ran linter Resolve pr comments
6d08192 to
4c82df3
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Enables weight sync between maxtext & vllm for rl for Qwen3.5-35B.
If the change fixes a bug or a Github issue, please include a link, e.g.,:
FIXES: b/123456
Tests
Command to run validator script: https://paste.googleplex.com/5425192473067520#l=24
Result: https://paste.googleplex.com/5285887440191488
Checklist
Before submitting this PR, please make sure (put X in square brackets):
gemini-reviewlabel.