fix block_wise_fp8_v1_loader_moe_shape (#4384)

This commit is contained in:
chen
2025-10-15 14:08:53 +08:00
committed by GitHub
parent 582aebd48b
commit 4efd073a41
@@ -1246,11 +1246,7 @@ class BlockWiseFP8MoEMethod(QuantMethodBase):
layer,
weight_name,
layer.create_parameter(
shape=[
layer.num_local_experts,
ceil_div(layer.moe_intermediate_size * 2, self.quant_config.weight_block_size[0]),
ceil_div(layer.hidden_size, self.quant_config.weight_block_size[1]),
],
shape=weight.shape,
dtype=weight_dtype,
default_initializer=paddle.nn.initializer.Constant(0),
),
@@ -1260,11 +1256,7 @@ class BlockWiseFP8MoEMethod(QuantMethodBase):
layer,
scale_name,
layer.create_parameter(
shape=[
layer.num_local_experts,
ceil_div(layer.hidden_size, self.quant_config.weight_block_size[0]),
ceil_div(layer.moe_intermediate_size, self.quant_config.weight_block_size[1]),
],
shape=scale.shape,
dtype=scale_dtype,
default_initializer=paddle.nn.initializer.Constant(0),
),