Skip to content

Qwen3.6_Tiling - #1185

Open
mohiso22 wants to merge 3 commits into
quic:mainfrom
mohiso22:qwen3.6
Open

Qwen3.6_Tiling #1185
mohiso22 wants to merge 3 commits into
quic:mainfrom
mohiso22:qwen3.6

Conversation

@mohiso22

@mohiso22 mohiso22 commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

This PR is for performance related changes on qwen3.5 family of models

Signed-off-by: Mohit Soni <mohisoni@qti.qualcomm.com>
@mohiso22
mohiso22 requested review from quic-rishinr and vbaddi July 15, 2026 16:01
Signed-off-by: Mohit Soni <mohisoni@qti.qualcomm.com>
hidden_states_new = torch.cat([conv_state_flat, hidden_states], dim=-1).to(weight.dtype)

ctx_idx = last_positions.to(torch.long).unsqueeze(1).expand(-1, hidden_size, -1)
updated_conv_state_flat = torch.gather(hidden_states_new, dim=2, index=ctx_idx)

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.

tested with subfunc?

Comment on lines +696 to +701
# for i in range(1, chunk_size):
# row = attn[..., i, :i].clone()
# sub = attn[..., :i, :i].clone()
# # attn[..., i, :i] = row + (row.unsqueeze(-1) * sub).sum(-2)
# attn[..., i, :i] = row + torch.einsum("bghi,bghij->bghj", row, sub)
# attn = attn + eye.to(dtype=attn.dtype, device=attn.device)

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.

remove

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.

better have all methods in different methods within this class, instead of comments.

@ochougul ochougul left a comment

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.

Can you please add a test that run checks if our approximation is accurate at module level in quickcheck?

@ochougul
ochougul marked this pull request as ready for review July 27, 2026 11:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants