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
37a4947d
Unverified
Commit
37a4947d
authored
Nov 01, 2024
by
Michael Goin
Committed by
GitHub
Nov 01, 2024
Browse files
[Bugfix] Fix layer skip logic with bitsandbytes (#9887)
Signed-off-by:
mgoin
<
michael@neuralmagic.com
>
parent
96e0c9cb
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
vllm/model_executor/layers/quantization/bitsandbytes.py
vllm/model_executor/layers/quantization/bitsandbytes.py
+6
-1
No files found.
vllm/model_executor/layers/quantization/bitsandbytes.py
View file @
37a4947d
...
@@ -119,7 +119,12 @@ class BitsAndBytesConfig(QuantizationConfig):
...
@@ -119,7 +119,12 @@ class BitsAndBytesConfig(QuantizationConfig):
def
is_layer_skipped_bnb
(
prefix
:
str
,
llm_int8_skip_modules
:
List
[
str
]):
def
is_layer_skipped_bnb
(
prefix
:
str
,
llm_int8_skip_modules
:
List
[
str
]):
return
any
(
module_name
in
prefix
for
module_name
in
llm_int8_skip_modules
)
# Split the prefix into its dot-separated components
components
=
prefix
.
split
(
'.'
)
# Check if any of the skip modules exactly matches any component
return
any
(
module_name
in
components
for
module_name
in
llm_int8_skip_modules
)
class
BitsAndBytesLinearMethod
(
LinearMethodBase
):
class
BitsAndBytesLinearMethod
(
LinearMethodBase
):
...
...
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