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
d7fb10c5
Unverified
Commit
d7fb10c5
authored
Oct 29, 2025
by
Chen Zhang
Committed by
GitHub
Oct 29, 2025
Browse files
[Bugfix] mamba-block-size is set for vision language model (#27773)
Signed-off-by:
Chen Zhang
<
zhangch99@outlook.com
>
parent
b798e39f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
10 deletions
+16
-10
vllm/config/cache.py
vllm/config/cache.py
+1
-9
vllm/config/vllm.py
vllm/config/vllm.py
+15
-1
No files found.
vllm/config/cache.py
View file @
d7fb10c5
...
...
@@ -5,7 +5,7 @@ import hashlib
from
dataclasses
import
field
from
typing
import
TYPE_CHECKING
,
Any
,
Literal
from
pydantic
import
Field
,
SkipValidation
,
field_validator
,
model_validator
from
pydantic
import
Field
,
SkipValidation
,
field_validator
from
pydantic.dataclasses
import
dataclass
from
vllm.config.utils
import
config
...
...
@@ -185,11 +185,3 @@ class CacheConfig:
raise
ValueError
(
"Too large swap space. "
+
msg
)
elif
cpu_memory_usage
>
0.4
*
total_cpu_memory
:
logger
.
warning
(
"Possibly too large swap space. %s"
,
msg
)
@
model_validator
(
mode
=
"after"
)
def
validate_mamba_block_size
(
self
)
->
"CacheConfig"
:
if
self
.
mamba_block_size
is
not
None
and
not
self
.
enable_prefix_caching
:
raise
ValueError
(
"--mamba-block-size can only be set with --enable-prefix-caching"
)
return
self
vllm/config/vllm.py
View file @
d7fb10c5
...
...
@@ -17,7 +17,7 @@ from pathlib import Path
from
typing
import
TYPE_CHECKING
,
Any
,
TypeVar
import
torch
from
pydantic
import
ConfigDict
,
Field
from
pydantic
import
ConfigDict
,
Field
,
model_validator
from
pydantic.dataclasses
import
dataclass
import
vllm.envs
as
envs
...
...
@@ -943,6 +943,20 @@ class VllmConfig:
f
"compilation_config=
{
self
.
compilation_config
!
r
}
"
)
@
model_validator
(
mode
=
"after"
)
def
validate_mamba_block_size
(
self
)
->
"VllmConfig"
:
if
self
.
model_config
is
None
:
return
self
mamba_block_size_is_set
=
(
self
.
cache_config
.
mamba_block_size
is
not
None
and
self
.
cache_config
.
mamba_block_size
!=
self
.
model_config
.
max_model_len
)
if
mamba_block_size_is_set
and
not
self
.
cache_config
.
enable_prefix_caching
:
raise
ValueError
(
"--mamba-block-size can only be set with --enable-prefix-caching"
)
return
self
_current_vllm_config
:
VllmConfig
|
None
=
None
_current_prefix
:
str
|
None
=
None
...
...
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