Repository navigation
fix(qwen3.5-vl): support odd packed lengths without context parallelism - #2544
Open
ActuallyEdward wants to merge 1 commit into
Open
ActuallyEdward wants to merge 1 commit into
ActuallyEdward wants to merge 1 commit into
Conversation
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.
Qwen3.5-VL training with
--context-parallel-size 1can fail when a packed sequence has an odd token count. The vision-injection path callsget_packed_cp_local_indices()even without a CP split, so boundaries such as[0, 3, 8]raiseValueError: Packed sequence length 3 must be divisible by 2 * CP size 1.Return the identity token indices at CP=1, where the local stream already is the full packed stream. Preserve empty inputs and the supplied boundary offset. The two-chunk mapping and divisibility checks for CP>1 remain unchanged.
This follows up on #2376, which was closed without merging. Credit to @shifangx for the original report and call-site fix, and @augustuszzq for documenting the helper-side alternative and reproduction in this comment. This PR uses the helper-side fix with CPU regression coverage; the Qwen call site remains affected on upstream
79aa41a884ab0bf65222c94418f6357d3c31192b.Validation
git diff --checkpassed. The test module is already registered in the CPU CI matrix.Validation is limited to CPU tests; a new GPU or distributed training run was not performed for this PR.
AI assistance: OpenAI Codex assisted with implementation, validation, and this description.