Fix compressed-tensors NVFP4 MoE W13 layout (#32430)
This commit is contained in:
@@ -1035,6 +1035,7 @@ class CompressedTensorsFusedMoEMethod(FusedMoEMethodBase):
|
||||
the necessary parameters for the layer. See LinearMethodBase for param
|
||||
details
|
||||
"""
|
||||
self.load_up_proj_weight_first = layer.scheme.load_up_proj_weight_first
|
||||
layer.scheme.create_weights(
|
||||
layer=layer,
|
||||
num_experts=num_experts,
|
||||
|
||||
+2
@@ -68,6 +68,8 @@ class CompressedTensorsMoEScheme(BaseMoEScheme):
|
||||
of different quantization schemes supported by CompressedTensors.
|
||||
"""
|
||||
|
||||
load_up_proj_weight_first = False
|
||||
|
||||
@classmethod
|
||||
def get_min_capability(cls) -> int:
|
||||
"""
|
||||
|
||||
+5
@@ -42,6 +42,11 @@ class CompressedTensorsW4A4Nvfp4MoE(CompressedTensorsMoEScheme):
|
||||
self.group_size = 16
|
||||
self.use_flashinfer_trtllm = get_moe_runner_backend().is_flashinfer_trtllm()
|
||||
|
||||
@property
|
||||
def load_up_proj_weight_first(self) -> bool:
|
||||
"""Load W13 as ``[up; gate]`` for CUTLASS; TRT-LLM reorders post-load."""
|
||||
return not self.use_flashinfer_trtllm
|
||||
|
||||
@classmethod
|
||||
def get_min_capability(cls) -> int:
|
||||
# Requires sm100(blackwell) architecture
|
||||
|
||||
Reference in New Issue
Block a user