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
OpenDAS
bitsandbytes
Commits
67adb47b
Unverified
Commit
67adb47b
authored
Nov 08, 2023
by
Younes Belkada
Committed by
GitHub
Nov 08, 2023
Browse files
Update functional.py
parent
fab00e26
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
bitsandbytes/functional.py
bitsandbytes/functional.py
+2
-2
No files found.
bitsandbytes/functional.py
View file @
67adb47b
...
@@ -13,7 +13,7 @@ from scipy.stats import norm
...
@@ -13,7 +13,7 @@ from scipy.stats import norm
import
numpy
as
np
import
numpy
as
np
from
functools
import
reduce
# Required in Python 3
from
functools
import
reduce
# Required in Python 3
from
typing
import
Tuple
,
Any
from
typing
import
Tuple
,
Any
,
Dict
from
torch
import
Tensor
from
torch
import
Tensor
from
bitsandbytes.utils
import
pack_dict_to_tensor
,
unpack_tensor_to_dict
from
bitsandbytes.utils
import
pack_dict_to_tensor
,
unpack_tensor_to_dict
...
@@ -600,7 +600,7 @@ class QuantState:
...
@@ -600,7 +600,7 @@ class QuantState:
return
list_repr
[
idx
]
return
list_repr
[
idx
]
@
classmethod
@
classmethod
def
from_dict
(
cls
,
qs_dict
:
d
ict
[
str
,
Any
],
device
:
torch
.
device
)
->
'QuantState'
:
def
from_dict
(
cls
,
qs_dict
:
D
ict
[
str
,
Any
],
device
:
torch
.
device
)
->
'QuantState'
:
"""
"""
unpacks components of state_dict into QuantState
unpacks components of state_dict into QuantState
where necessary, convert into strings, torch.dtype, ints, etc.
where necessary, convert into strings, torch.dtype, ints, etc.
...
...
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