Skip to content

[EB] Qwen_3_5_Moe#1038

Open
mohiso22 wants to merge 4 commits into
quic:release/v1.22.0_tmpfrom
mohiso22:qwen3_5
Open

[EB] Qwen_3_5_Moe#1038
mohiso22 wants to merge 4 commits into
quic:release/v1.22.0_tmpfrom
mohiso22:qwen3_5

Conversation

@mohiso22
Copy link
Copy Markdown
Contributor

@mohiso22 mohiso22 commented Jun 4, 2026

No description provided.

Mohit Soni added 2 commits June 4, 2026 18:15
Signed-off-by: Mohit Soni <mohisoni@qti.qualcomm.com>
Signed-off-by: Mohit Soni <mohisoni@qti.qualcomm.com>
packed_chunk_size=EXPERT_BLOCKING_PACKED_CHUNK_SIZE,
packed_chunk_size=packed_chunk_size,
)
return experts_out.sum(dim=0)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: w/subf tested? this needs einsum fix too.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yup it needs that, will fix

# attn[..., i, :i] = row + (row.unsqueeze(-1) * sub).sum(-2)
attn[..., i, :i] = row + torch.einsum("bghi,bghij->bghj", row, sub)
attn = attn + torch.eye(chunk_size, dtype=attn.dtype, device=attn.device)
# for i in range(1, chunk_size):
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: remove commented code

self.gate_up_proj_w = self.experts.gate_up_proj
self.down_proj_w = self.experts.down_proj

def _split_expert_weights(self, hidden_size: int):
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: this can be done once during init, can remove from forward

@quic-rishinr quic-rishinr added the 1.22 Release 1.22 candidate label Jun 5, 2026
Signed-off-by: Mohit Soni <mohisoni@qti.qualcomm.com>
@mohiso22 mohiso22 marked this pull request as ready for review June 5, 2026 09:34
Signed-off-by: Mohit Soni <mohisoni@qti.qualcomm.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

1.22 Release 1.22 candidate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants