[Refactor] Move FusedMoE hidden_size roundup to quant_method (#34285)
Signed-off-by: Bowen Bao <bowenbao@amd.com>
This commit is contained in:
@@ -229,9 +229,6 @@ class FusedMoEQuantConfig:
|
||||
_w1: FusedMoEQuantDesc
|
||||
_w2: FusedMoEQuantDesc
|
||||
is_nvfp4_scale_swizzled: bool = True
|
||||
# CK MXFP4 (gfx950) padding info for rocm_aiter_ops.fused_moe()
|
||||
hidden_pad: int = 0
|
||||
intermediate_pad: int = 0
|
||||
|
||||
def __post_init__(self):
|
||||
assert not self.per_act_token_quant or self.block_shape is None, (
|
||||
@@ -1172,6 +1169,11 @@ class FusedMoEConfig:
|
||||
# Defaults to in_dtype if not specified.
|
||||
router_logits_dtype: torch.dtype | None = None
|
||||
|
||||
# Defaults to hidden_dim if not specified.
|
||||
hidden_dim_unpadded: int | None = None
|
||||
# Defaults to intermediate_size_per_partition if not specified.
|
||||
intermediate_size_per_partition_unpadded: int | None = None
|
||||
|
||||
moe_backend: str = "auto"
|
||||
max_num_tokens: int = envs.VLLM_MOE_DP_CHUNK_SIZE
|
||||
has_bias: bool = False
|
||||
@@ -1195,6 +1197,13 @@ class FusedMoEConfig:
|
||||
if self.router_logits_dtype is None:
|
||||
self.router_logits_dtype = self.in_dtype
|
||||
|
||||
if self.hidden_dim_unpadded is None:
|
||||
self.hidden_dim_unpadded = self.hidden_dim
|
||||
if self.intermediate_size_per_partition_unpadded is None:
|
||||
self.intermediate_size_per_partition_unpadded = (
|
||||
self.intermediate_size_per_partition
|
||||
)
|
||||
|
||||
@property
|
||||
def tp_size(self):
|
||||
return self.moe_parallel_config.tp_size
|
||||
|
||||
Reference in New Issue
Block a user