Skip to content

Commit d5d8c92

Browse files
committed
style: apply ruff-format
1 parent 657c4bc commit d5d8c92

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

bitsandbytes/nn/experts.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,6 @@ def _project(self, packed, absmax, shape, expert_idx, x, compute_dtype):
257257
dequant_fn = functools.partial(self._dequantize_expert, packed, absmax, shape, expert_idx, compute_dtype)
258258
return _FrozenLinearRecomputeBackward.apply(x, dequant_fn)
259259

260-
261260
def forward(
262261
self,
263262
hidden_states: torch.Tensor,

tests/test_experts4bit.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,8 @@ def __init__(self):
323323
)
324324
assert q.gate_up_proj.dtype == torch.uint8 and q.down_proj.dtype == torch.uint8
325325
quantized_bytes = (
326-
q.gate_up_proj.numel() + q.down_proj.numel() # uint8 packed
326+
q.gate_up_proj.numel()
327+
+ q.down_proj.numel() # uint8 packed
327328
+ (q.gate_up_absmax.numel() + q.down_absmax.numel()) * 4 # fp32 absmax
328329
)
329330
assert quantized_bytes < fp16_bytes / 3 # ~4x on the weights, minus small absmax overhead

0 commit comments

Comments
 (0)