Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
vllm_cscc
Commits
6f170f11
Unverified
Commit
6f170f11
authored
Jun 21, 2025
by
Isotr0py
Committed by
GitHub
Jun 21, 2025
Browse files
[Bugfix] Fix bnb 8bit model weights loading (#19917)
Signed-off-by:
Isotr0py
<
2037008807@qq.com
>
parent
8ca81bb0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
vllm/model_executor/model_loader/bitsandbytes_loader.py
vllm/model_executor/model_loader/bitsandbytes_loader.py
+2
-2
No files found.
vllm/model_executor/model_loader/bitsandbytes_loader.py
View file @
6f170f11
...
@@ -577,10 +577,10 @@ def dequantize_dq(quant_states: dict) -> None:
...
@@ -577,10 +577,10 @@ def dequantize_dq(quant_states: dict) -> None:
thereby avoiding this computational overhead during inference. This comes
thereby avoiding this computational overhead during inference. This comes
at the cost of increased memory usage.
at the cost of increased memory usage.
"""
"""
from
bitsandbytes.functional
import
dequantize_blockwise
from
bitsandbytes.functional
import
QuantState
,
dequantize_blockwise
for
_
,
quant_state
in
quant_states
.
items
():
for
_
,
quant_state
in
quant_states
.
items
():
# Copied from: https://github.com/bitsandbytes-foundation/bitsandbytes/blob/0.45.3/bitsandbytes/functional.py#L1352-#L1356
# Copied from: https://github.com/bitsandbytes-foundation/bitsandbytes/blob/0.45.3/bitsandbytes/functional.py#L1352-#L1356
if
quant_state
.
nested
:
if
isinstance
(
quant_state
,
QuantState
)
and
quant_state
.
nested
:
absmax
=
dequantize_blockwise
(
quant_state
.
absmax
,
absmax
=
dequantize_blockwise
(
quant_state
.
absmax
,
quant_state
.
state2
)
quant_state
.
state2
)
absmax
+=
quant_state
.
offset
absmax
+=
quant_state
.
offset
...
...
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