Fix compressed-tensors NVFP4 MoE W13 layout (#32430)

This commit is contained in:
Mohammad Miadh Angkad
2026-07-27 14:56:42 -07:00
committed by GitHub
parent 8a311d1c88
commit 3005af0941
3 changed files with 8 additions and 0 deletions
@@ -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,
@@ -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:
"""
@@ -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