fix block_wise_fp8_v1_loader_moe_shape (#4385)
Some checks failed
CE Compile Job / ce_job_pre_check (push) Has been cancelled
CE Compile Job / print_ce_job_pre_check_outputs (push) Has been cancelled
CE Compile Job / FD-Clone-Linux (push) Has been cancelled
CE Compile Job / Show Code Archive Output (push) Has been cancelled
CE Compile Job / BUILD_SM8090 (push) Has been cancelled
CE Compile Job / BUILD_SM8689 (push) Has been cancelled
CE Compile Job / CE_UPLOAD (push) Has been cancelled

This commit is contained in:
chen
2025-10-15 14:23:38 +08:00
committed by GitHub
parent e0946ae128
commit adeee84dd6

View File

@@ -1229,11 +1229,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),
),
@@ -1243,11 +1239,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),
),