Skip to content

Commit 039338f

Browse files
committed
fix the lora scales
1 parent e87e780 commit 039338f

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

nunchaku/ops/gemm.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
Python wrappers for Nunchaku's quantized GEMM operations.
33
"""
44

5+
import math
6+
57
import torch
68

79
from .._C import ops
@@ -121,7 +123,7 @@ def svdq_gemm_w4a4_cuda(
121123
"""
122124
if lora_scales is None:
123125
rank = lora_up.shape[1]
124-
lora_scales = [1.0] * rank
126+
lora_scales = [1.0] * math.ceil(rank / 16)
125127

126128
ops.gemm_w4a4(
127129
act,

0 commit comments

Comments
 (0)