diff --git a/tests/quantization/test_modelopt.py b/tests/quantization/test_modelopt.py index 7225642259..052462f7f3 100644 --- a/tests/quantization/test_modelopt.py +++ b/tests/quantization/test_modelopt.py @@ -508,10 +508,11 @@ def test_modelopt_fp8_pb_wo_checkpoint_setup(default_vllm_config, vllm_runner): assert isinstance(gate_up_proj.quant_method, ModelOptFp8PbWoLinearMethod) assert isinstance(down_proj.quant_method, ModelOptFp8PbWoLinearMethod) - assert qkv_proj.weight.dtype == torch.float8_e4m3fn - assert o_proj.weight.dtype == torch.float8_e4m3fn - assert gate_up_proj.weight.dtype == torch.float8_e4m3fn - assert down_proj.weight.dtype == torch.float8_e4m3fn + fp8_dtype = current_platform.fp8_dtype() + assert qkv_proj.weight.dtype == fp8_dtype + assert o_proj.weight.dtype == fp8_dtype + assert gate_up_proj.weight.dtype == fp8_dtype + assert down_proj.weight.dtype == fp8_dtype # Block scales; should be materialized as a 2D [out_blk, in_blk] tensor. assert hasattr(qkv_proj, "weight_scale")