We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 762daf4 commit 875414eCopy full SHA for 875414e
bitsandbytes/autograd/_functions.py
@@ -353,9 +353,13 @@ def forward(
353
354
# Extract the corresponding weights
355
if state.has_fp16_weights:
356
- state.subB = B[:, state.idx].t() # .contiguous()
+ state.subB = B[:, state.idx].t()
357
else:
358
- outliers = state.CB[:, state.idx] # .clone()
+ outliers = state.CB[:, state.idx]
359
+
360
+ # To dequantize our weights associated with the input outliers,
361
+ # we want to divide by 127. It's however more performant to multiply
362
+ # by the reciprocal.
363
state.subB = (7.874016e-3 * outliers * state.SCB.view(-1, 1)).t().to(A.dtype)
364
365
subA = None
0 commit comments