Skip to content

Commit 7365d1e

Browse files
author
Ali Alshaarawy
committed
update fabric bitsandbytes linear quantization for bnb 0.44.1
1 parent 4f3db9f commit 7365d1e

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/lightning/fabric/plugins/precision/bitsandbytes.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,11 @@
3939

4040
log = logging.getLogger(__name__)
4141

42-
_BITSANDBYTES_AVAILABLE = RequirementCache("bitsandbytes>=0.42.0")
42+
_BITSANDBYTES_AVAILABLE = RequirementCache("bitsandbytes>=0.44.0")
4343

4444

4545
class BitsandbytesPrecision(Precision):
46-
"""Plugin for quantizing weights with `bitsandbytes <https://github.com/TimDettmers/bitsandbytes>`__.
46+
"""Plugin for quantizing weights with `bitsandbytes <https://github.com/bitsandbytes-foundation/bitsandbytes>`__.
4747
4848
.. warning:: This is an :ref:`experimental <versioning:Experimental API>` feature.
4949
@@ -322,6 +322,7 @@ def quantize_(self, weight: Optional[torch.Tensor] = None, device: Optional[torc
322322
return
323323
assert isinstance(self.weight, bnb.nn.Params4bit)
324324
self.weight = self.quantize(self.weight, weight, device)
325+
self.weight.bnb_quantized = True
325326

326327
@staticmethod
327328
def quantize(

src/lightning/pytorch/plugins/precision/bitsandbytes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717

1818
class BitsandbytesPrecision(Precision, FabricBNBPrecision):
19-
"""Plugin for quantizing weights with `bitsandbytes <https://github.com/TimDettmers/bitsandbytes>`__.
19+
"""Plugin for quantizing weights with `bitsandbytes <https://github.com/bitsandbytes-foundation/bitsandbytes>`__.
2020
2121
.. warning:: This is an :ref:`experimental <versioning:Experimental API>` feature.
2222

0 commit comments

Comments
 (0)