transformers icon indicating copy to clipboard operation
transformers copied to clipboard

fix(qwen3_5): add linear_attn entries to base_model_tp_plan

Open muhamedfazalps opened this issue 5 months ago • 3 comments

Fixes #46846

Qwen3.5 uses linear_attention in ~75% of layers. base_model_tp_plan was missing linear_attn entries, causing OOM at TP>1.

Fix: add colwise_gather_output for in_proj_qkv, in_proj_z, in_proj_b, in_proj_a, out_proj.

This shards weights and all-gathers before conv1d which needs full channels.

muhamedfazalps avatar Jun 23 '26 13:06 muhamedfazalps

[For maintainers] Suggested jobs to run (before merge)

run-slow: qwen3_5

github-actions[bot] avatar Jun 23 '26 15:06 github-actions[bot]

cc @vasqu since you were replying in the original issue!

Rocketknight1 avatar Jun 24 '26 10:06 Rocketknight1

I am double-checking for those other architectures, but it makes sense to me. Let me come back to you with a clearer answer soon.

tengomucho avatar Jun 29 '26 14:06 tengomucho