[Quantization] Quark MXFP4 format loading (#16943)

This commit is contained in:
Bowen Bao
2025-05-07 15:05:05 -04:00
committed by GitHub
parent f98e307588
commit db593aa67f
9 changed files with 289 additions and 3 deletions
+7
View File
@@ -339,6 +339,13 @@ class Platform:
"""
return "vllm.distributed.device_communicators.base_device_communicator.DeviceCommunicatorBase" # noqa
@classmethod
def supports_mx(cls) -> bool:
"""
Returns whether the current platform supports MX types.
"""
return False
@classmethod
def supports_fp8(cls) -> bool:
"""
+5
View File
@@ -327,6 +327,11 @@ class RocmPlatform(Platform):
def get_device_communicator_cls(cls) -> str:
return "vllm.distributed.device_communicators.cuda_communicator.CudaCommunicator" # noqa
@classmethod
def supports_mx(cls) -> bool:
gcn_arch = torch.cuda.get_device_properties(0).gcnArchName
return any(gfx in gcn_arch for gfx in ["gfx95"])
@classmethod
def supports_fp8(cls) -> bool:
gcn_arch = torch.cuda.get_device_properties(0).gcnArchName