[Bugfix] Fix Qwen3-Next in_proj_ba weight sharding with TP > 1 (#36242)
Signed-off-by: AjAnubolu <anuboluajay@gmail.com>
This commit is contained in:
@@ -145,6 +145,24 @@ class Qwen3_5GatedDeltaNet(Qwen3NextGatedDeltaNet):
|
||||
prefix=prefix,
|
||||
)
|
||||
|
||||
def create_ba_proj(
|
||||
self,
|
||||
hidden_size: int,
|
||||
num_v_heads: int,
|
||||
quant_config: QuantizationConfig | None,
|
||||
prefix: str,
|
||||
) -> MergedColumnParallelLinear:
|
||||
# Qwen3.5 has separate in_proj_b and in_proj_a weights in the
|
||||
# checkpoint, which are loaded into the fused in_proj_ba parameter
|
||||
# via stacked_params_mapping with shard_id 0 and 1 respectively.
|
||||
return MergedColumnParallelLinear(
|
||||
input_size=hidden_size,
|
||||
output_sizes=[num_v_heads] * 2,
|
||||
bias=False,
|
||||
quant_config=quant_config,
|
||||
prefix=prefix,
|
||||
)
|
||||
|
||||
def forward(
|
||||
self,
|
||||
hidden_states: torch.Tensor,
|
||||
|
||||
Reference in New Issue
Block a user