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
ad233189
Unverified
Commit
ad233189
authored
Nov 04, 2024
by
Tyler Michael Smith
Committed by
GitHub
Nov 05, 2024
Browse files
[Bugfix] Fixup Mamba (#10004)
Signed-off-by:
Tyler Michael Smith
<
tyler@neuralmagic.com
>
parent
bbc3619d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
4 deletions
+3
-4
vllm/model_executor/models/mamba.py
vllm/model_executor/models/mamba.py
+3
-4
No files found.
vllm/model_executor/models/mamba.py
View file @
ad233189
...
...
@@ -39,8 +39,8 @@ class MambaDecoderLayer(nn.Module):
super
().
__init__
()
self
.
config
=
config
self
.
is_falcon_mamba
=
config
.
model_type
==
"falcon_mamba"
mixer_rms_
r
ps
=
config
.
mixer_rms_
r
ps
if
self
.
is_falcon_mamba
else
None
self
.
m
amba
=
MambaMixer
(
hidden_size
=
config
.
hidden_size
,
mixer_rms_
e
ps
=
config
.
mixer_rms_
e
ps
if
self
.
is_falcon_mamba
else
None
self
.
m
ixer
=
MambaMixer
(
hidden_size
=
config
.
hidden_size
,
ssm_state_size
=
config
.
state_size
,
conv_kernel_size
=
config
.
conv_kernel
,
intermediate_size
=
config
.
intermediate_size
,
...
...
@@ -48,7 +48,7 @@ class MambaDecoderLayer(nn.Module):
use_conv_bias
=
config
.
use_conv_bias
,
use_bias
=
config
.
use_bias
,
use_rms_norm
=
self
.
is_falcon_mamba
,
rms_norm_eps
=
mixer_rms_
r
ps
,
rms_norm_eps
=
mixer_rms_
e
ps
,
activation
=
config
.
hidden_act
)
self
.
norm
=
RMSNorm
(
config
.
hidden_size
,
eps
=
config
.
layer_norm_epsilon
)
...
...
@@ -99,7 +99,6 @@ class MambaModel(nn.Module):
for
i
in
range
(
config
.
num_hidden_layers
):
decoder_layers
.
append
(
MambaDecoderLayer
(
config
,
layer_idx
=
i
,
cache_config
=
cache_config
,
quant_config
=
quant_config
))
self
.
layers
=
nn
.
ModuleList
(
decoder_layers
)
...
...
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