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
d2b52805
Commit
d2b52805
authored
Sep 07, 2025
by
zhuwenwen
Browse files
Merge tag 'v0.10.2rc1' into v0.10.2rc1-ori
parents
9a521c23
5438967f
Changes
501
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
0 deletions
+24
-0
vllm/model_executor/layers/mamba/mamba_utils.py
vllm/model_executor/layers/mamba/mamba_utils.py
+24
-0
No files found.
Too many changes to show.
To preserve performance only
501 of 501+
files are displayed.
Plain diff
Email patch
vllm/model_executor/layers/mamba/mamba_utils.py
View file @
d2b52805
...
...
@@ -54,6 +54,16 @@ class MambaStateDtypeCalculator:
return
(
conv_state_dtype
,
temporal_state_dtype
)
@
classmethod
def
short_conv_state_dtype
(
cls
,
model_dtype
:
Union
[
ModelDType
,
torch
.
dtype
],
mamba_cache_dtype
:
MambaDType
,
)
->
tuple
[
torch
.
dtype
,
...]:
conv_state_dtype
=
get_kv_cache_torch_dtype
(
mamba_cache_dtype
,
model_dtype
)
return
(
conv_state_dtype
,
)
class
MambaStateShapeCalculator
:
...
...
@@ -122,6 +132,20 @@ class MambaStateShapeCalculator:
tp_world_size
),
head_dim
,
state_size
)
return
conv_state_shape
,
temporal_state_shape
@
classmethod
def
short_conv_state_shape
(
cls
,
tp_world_size
:
int
,
intermediate_size
:
int
,
conv_kernel
:
int
,
use_v1
:
bool
=
True
,
)
->
tuple
[
tuple
[
int
,
int
]]:
conv_dim
=
divide
(
intermediate_size
,
tp_world_size
)
conv_state_shape
=
(
conv_kernel
-
1
,
conv_dim
)
if
not
use_v1
:
conv_state_shape
=
conv_state_shape
[
1
],
conv_state_shape
[
0
]
return
(
conv_state_shape
,
)
@
classmethod
def
extra_groups_for_head_shards
(
cls
,
ngroups
:
int
,
tp_size
:
int
):
"""Compute the increase in group numbers to account for
...
...
Prev
1
…
22
23
24
25
26
Next
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