Skip to content

Commit 4a10e29

Browse files
authored
fix mla attention backend (#3176)
1 parent af543b7 commit 4a10e29

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

fastdeploy/model_executor/models/deepseek_v3.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ def forward(
315315
dtype=layernorm_out.dtype,
316316
)
317317

318-
if forward_meta.max_enc_len_this_time:
318+
if forward_meta.max_len_tensor_cpu[1]: # max_enc_len_this_time
319319
query = self.q_a_proj(layernorm_out)
320320
query = self.q_a_layernorm(query)
321321
query = self.q_b_proj(query)
@@ -362,7 +362,7 @@ def forward(
362362
fmha_out_prefill = fmha_out_prefill * mask_encoder_batch.cast(fmha_out_prefill.dtype)
363363

364364
fmha_out = fmha_out + fmha_out_prefill
365-
if forward_meta.max_dec_len_this_time:
365+
if forward_meta.max_len_tensor_cpu[2]: # max_dec_len_this_time
366366
query = self.q_a_proj(layernorm_out)
367367
query = self.q_a_layernorm(query)
368368
ln_out_or_q_c = query

0 commit comments

Comments
 (0)