Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
transformers
Commits
63fb253d
Unverified
Commit
63fb253d
authored
Jun 04, 2024
by
James Braza
Committed by
GitHub
Jun 05, 2024
Browse files
Fixing `name 'torch' is not defined` in `bitsandbytes` integration (#31243)
Fixed torch definition error
parent
66875ac0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
src/transformers/integrations/bitsandbytes.py
src/transformers/integrations/bitsandbytes.py
+1
-1
No files found.
src/transformers/integrations/bitsandbytes.py
View file @
63fb253d
...
...
@@ -332,7 +332,7 @@ def get_keys_to_not_convert(model):
# Copied from PEFT: https://github.com/huggingface/peft/blob/47b3712898539569c02ec5b3ed4a6c36811331a1/src/peft/utils/integrations.py#L41
def
dequantize_bnb_weight
(
weight
:
torch
.
nn
.
Parameter
,
state
=
None
):
def
dequantize_bnb_weight
(
weight
:
"
torch.nn.Parameter
"
,
state
=
None
):
"""
Helper function to dequantize 4bit or 8bit bnb weights.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment