PTQ-Level Efficiency, QAT-Level Accuracy | 训练后量化的效率,量化感知训练的精度
fix mxfp qdq (#1088)
Yi Liucd9f20e8e611
diff --git a/auto_round_extension/vllm_ext/mxfp4_qdq_utils.py b/auto_round_extension/vllm_ext/mxfp4_qdq_utils.pyindex 1916fbc62..2a068924f 100644--- a/auto_round_extension/vllm_ext/mxfp4_qdq_utils.py+++ b/auto_round_extension/vllm_ext/mxfp4_qdq_utils.py@@ -37,8 +37,7 @@ def to_mxfp4_rceil(), f"{data_hp.dtype} is not supported yet"# TODO(future PR): consider supporting paddingassert data_hp.numel() % block_size == 0, f"data size must be multiple of block_size={block_size}"- assert data_hp.is_contiguous(), f"data must be contiguous, got {data_hp.stride()}"-+ data_hp = data_hp.contiguous()# calculate the scale in e8m0 formatorig_shape = data_hp.shape