File tree Expand file tree Collapse file tree
vllm/model_executor/layers/mamba Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1111from vllm .model_executor .layers .mamba .mamba_utils import is_conv_state_dim_first
1212from vllm .model_executor .layers .mamba .ops .cpu .causal_conv1d import (
1313 causal_conv1d_fn_cpu as causal_conv1d_torch ,
14+ )
15+ from vllm .model_executor .layers .mamba .ops .cpu .causal_conv1d import (
1416 causal_conv1d_update_cpu ,
1517)
1618from vllm .utils .torch_utils import (
@@ -658,4 +660,3 @@ def register_cpu_gdn_attention_ops() -> None:
658660 fake_impl = cpu_gdn_attention_core_fake ,
659661 )
660662 _CPU_GDN_ATTENTION_OPS_REGISTERED = True
661-
Original file line number Diff line number Diff line change @@ -95,6 +95,8 @@ def forward_native(
9595 # for causal conv can be plugged in here later.
9696 from vllm .model_executor .layers .mamba .ops .cpu .causal_conv1d import (
9797 causal_conv1d_fn_cpu as causal_conv1d_torch ,
98+ )
99+ from vllm .model_executor .layers .mamba .ops .cpu .causal_conv1d import (
98100 causal_conv1d_update_cpu ,
99101 )
100102
@@ -164,7 +166,7 @@ def forward_native(
164166 if has_decode :
165167 assert attn_metadata .state_indices_tensor_d is not None
166168 state_indices_d = attn_metadata .state_indices_tensor_d .flatten ()
167- Bx_d = ( B_d * x_d ) # (num_decodes, dim)
169+ Bx_d = B_d * x_d # (num_decodes, dim)
168170 out_d = causal_conv1d_update_cpu (
169171 Bx_d ,
170172 conv_state ,
@@ -341,4 +343,3 @@ def short_conv_fake(
341343 mutates_args = ["output" ],
342344 fake_impl = short_conv_fake ,
343345)
344-
You can’t perform that action at this time.
0 commit comments