From 2cc5a58b0f8aa9098e5748dfb91b59e323861037 Mon Sep 17 00:00:00 2001 From: Disty0 Date: Thu, 29 May 2025 03:26:47 +0300 Subject: [PATCH] Update changelog --- CHANGELOG.md | 2 ++ modules/model_quant_sdnq.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ea5672a57..87cd8316e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ - `INT4_SYM` -> `int4` - `INT4` -> `uint4` - Add `float8_e4m3fn` and `float8_e5m2` support + - Add quantized matmul support for `float8_e4m3fn` - Set the default quant mode to `pre` - Use per token input quant with int8 matmul - Implement better layer hijacks @@ -17,6 +18,7 @@ - Fix Conv quant - Fix lora weight change - Fix high RAM usage with pre mode + - Fix scale and zero_point not being offloaded - **IPEX** - Disabe Dynamic Attention by default on PyTorch 2.7 - Remove GradScaler hijack and use torch.amp.GradScaler instead diff --git a/modules/model_quant_sdnq.py b/modules/model_quant_sdnq.py index eb73c0973..c6803777e 100644 --- a/modules/model_quant_sdnq.py +++ b/modules/model_quant_sdnq.py @@ -327,7 +327,7 @@ def int8_matmul( def quantized_linear_forward_fp8_matmul(self, input: torch.FloatTensor) -> torch.FloatTensor: - if input.shape[-1] % 16 != 0 or self.weight.shape[-1] % 16 != 0 or self.weight.shape[-1] % 16 != 0: + if input.shape[-1] % 16 != 0 or self.weight.shape[0] % 16 != 0 or self.weight.shape[1] % 16 != 0: return torch.nn.functional.linear(input, self.sdnq_decompressor(self.weight, skip_quantized_matmul=True), self.bias) return fp8_matmul(input, self.weight, self.bias, self.sdnq_decompressor.scale)