Skip to content

Commit

Permalink
del to pop
Browse files Browse the repository at this point in the history
  • Loading branch information
grimoire committed Mar 5, 2024
1 parent 8476f5b commit 9f1ce63
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lmdeploy/pytorch/engine/engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -673,13 +673,13 @@ async def __long_context_forward(inputs):
if token_count == 0 and slen > max_prefill_token_num:
tmp_out = await __long_context_single_forward(inputs, idx)
logits_gather.gather(tmp_out)
del tmp_out
tmp_out.pop('logits', None)
idx += 1
elif token_count + slen > max_prefill_token_num:
tmp_out = await __long_context_batched_forward(
inputs, indices[0], idx)
logits_gather.gather(tmp_out)
del tmp_out
tmp_out.pop('logits', None)
indices = []
token_count = 0
else:
Expand Down

0 comments on commit 9f1ce63

Please sign in to comment.