Skip to content

Commit

Permalink
fix: b_ready_cache_len default value (#366)
Browse files Browse the repository at this point in the history
Co-authored-by: baishihao <baishihao@sensetime.com>
  • Loading branch information
shihaobai and baishihao authored Mar 20, 2024
1 parent 859a48b commit 9fed5e9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lightllm/common/basemodel/basemodel.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,10 @@ def _prefill(
infer_state.b_req_idx = b_req_idx
infer_state.b_start_loc = b_start_loc
infer_state.b_seq_len = b_seq_len
infer_state.b_ready_cache_len = b_ready_cache_len
if b_ready_cache_len is not None:
infer_state.b_ready_cache_len = b_ready_cache_len
else:
infer_state.b_ready_cache_len = torch.zeros_like(b_seq_len, dtype=b_seq_len.dtype, device=b_seq_len.device)
infer_state.multimodal_params = multimodal_params

infer_state.mem_manager = self.mem_manager
Expand Down

0 comments on commit 9fed5e9

Please sign in to comment.