This commit is contained in:
Disty0
2026-07-04 21:53:40 +03:00
parent 77c72e03ab
commit 16a284eecf
8 changed files with 58 additions and 49 deletions
+1 -2
View File
@@ -151,8 +151,7 @@ def apply_hadamard(weight: torch.Tensor, group_size: int = 256, hadamard: torch.
channel_size = weight.shape[1]
else:
channel_size = weight.shape[-1]
if channel_size < group_size:
group_size = channel_size
group_size = min(group_size, channel_size)
if channel_size % group_size != 0:
hadamard_pow2 = int(math.log2(group_size))
while channel_size % group_size != 0: