Repository navigation
Run the trainer, apply_chat_template and fused LM head tests on the tiny Qwen4 MoE model - #8775
Open
albertvillanova wants to merge 1 commit into
Open
albertvillanova wants to merge 1 commit into
albertvillanova wants to merge 1 commit into
Conversation
…iny Qwen4 MoE model
|
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. |
This branch has not been deployed
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.
This PR runs the SFT, DPO, KTO, GRPO, RLOO and distillation trainer tests,
apply_chat_templateand the fused LM head tests ontrl-internal-testing/tiny-Qwen4MoeForConditionalGeneration.Changes
qwen4-moecase, skipped before transformers 5.26.0, to the text and VLM trainer tests,apply_chat_templateand the fused LM head VLM tests.All
qwen4-moecases pass on an H100 with transformers 5.26.0: 30 passed, 1 xfailed (the Flash Attention case).Note
Low Risk
Test-only parametrization and assertion updates; no production trainer or library code changes.
Overview
Adds Qwen4 MoE (
tiny-Qwen4MoeForConditionalGeneration) to the existing cross-trainer and utility test matrices, gated on transformers ≥ 5.26.0.New
qwen4-moeparametrizations appear in SFT, DPO, KTO, GRPO, RLOO, and distillation trainer tests (text and VLM paths),apply_chat_templatetokenizer coverage intest_data_utils.py, and fused LM head / forward checks intest_utils.py. Post-training parameter-update assertions now treat Qwen4 MoE like Qwen4-Exp:.indexer.weights must stay frozen because the QSA indexer receives no gradient. The SFT Flash Attention VLM case for Qwen4 MoE is marked strict xfail until transformers supports it (same as Qwen4-Exp).Reviewed by Cursor Bugbot for commit b267705. Bugbot is set up for automated code reviews on this repo. Configure here.