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
8ddfda13
Unverified
Commit
8ddfda13
authored
Jan 28, 2024
by
SUN Haibo
Committed by
GitHub
Jan 28, 2024
Browse files
Correct type hint in functional.py (#992)
parent
e651e8ed
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
bitsandbytes/functional.py
bitsandbytes/functional.py
+1
-1
No files found.
bitsandbytes/functional.py
View file @
8ddfda13
...
@@ -890,7 +890,7 @@ def quantize_fp4(A: Tensor, absmax: Tensor = None, out: Tensor = None, blocksize
...
@@ -890,7 +890,7 @@ def quantize_fp4(A: Tensor, absmax: Tensor = None, out: Tensor = None, blocksize
def
quantize_nf4
(
A
:
Tensor
,
absmax
:
Tensor
=
None
,
out
:
Tensor
=
None
,
blocksize
=
64
,
compress_statistics
=
False
,
quant_storage
=
torch
.
uint8
):
def
quantize_nf4
(
A
:
Tensor
,
absmax
:
Tensor
=
None
,
out
:
Tensor
=
None
,
blocksize
=
64
,
compress_statistics
=
False
,
quant_storage
=
torch
.
uint8
):
return
quantize_4bit
(
A
,
absmax
,
out
,
blocksize
,
compress_statistics
,
'nf4'
,
quant_storage
)
return
quantize_4bit
(
A
,
absmax
,
out
,
blocksize
,
compress_statistics
,
'nf4'
,
quant_storage
)
def
quantize_4bit
(
A
:
Tensor
,
absmax
:
Tensor
=
None
,
out
:
Tensor
=
None
,
blocksize
=
64
,
compress_statistics
=
False
,
quant_type
=
'fp4'
,
quant_storage
=
torch
.
uint8
)
->
Tensor
:
def
quantize_4bit
(
A
:
Tensor
,
absmax
:
Tensor
=
None
,
out
:
Tensor
=
None
,
blocksize
=
64
,
compress_statistics
=
False
,
quant_type
=
'fp4'
,
quant_storage
=
torch
.
uint8
)
->
(
Tensor
,
QuantState
)
:
"""
"""
Quantize tensor A in blocks of 4-bit values.
Quantize tensor A in blocks of 4-bit values.
...
...
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