File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
fastdeploy/model_executor/models Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -315,7 +315,7 @@ def forward(
315
315
dtype = layernorm_out .dtype ,
316
316
)
317
317
318
- if forward_meta .max_enc_len_this_time :
318
+ if forward_meta .max_len_tensor_cpu [ 1 ]: # max_enc_len_this_time
319
319
query = self .q_a_proj (layernorm_out )
320
320
query = self .q_a_layernorm (query )
321
321
query = self .q_b_proj (query )
@@ -362,7 +362,7 @@ def forward(
362
362
fmha_out_prefill = fmha_out_prefill * mask_encoder_batch .cast (fmha_out_prefill .dtype )
363
363
364
364
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
366
366
query = self .q_a_proj (layernorm_out )
367
367
query = self .q_a_layernorm (query )
368
368
ln_out_or_q_c = query
You can’t perform that action at this time.
0 commit comments