Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Oct 2, 2024
1 parent 17273b4 commit 1bcdd9d
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/lightning/fabric/plugins/precision/bitsandbytes.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,15 +184,15 @@ def _replace_param(
if param.device.type == "meta":
if isinstance(param, bnb.nn.Params4bit):
return bnb.nn.Params4bit(
data = data,
requires_grad = data.requires_grad,
quant_state = quant_state,
blocksize = param.blocksize,
compress_statistics = param.compress_statistics,
quant_type = param.quant_type,
quant_storage = param.quant_storage,
module = param.module,
bnb_quantized = param.bnb_quantized
data=data,
requires_grad=data.requires_grad,
quant_state=quant_state,
blocksize=param.blocksize,
compress_statistics=param.compress_statistics,
quant_type=param.quant_type,
quant_storage=param.quant_storage,
module=param.module,
bnb_quantized=param.bnb_quantized,
)
return torch.nn.Parameter(data, requires_grad=data.requires_grad)
param.data = data
Expand Down

0 comments on commit 1bcdd9d

Please sign in to comment.