Skip to content

Commit

Permalink
disable warmup
Browse files Browse the repository at this point in the history
  • Loading branch information
grimoire committed Mar 4, 2025
1 parent 49e7f4c commit e4339e7
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions lmdeploy/pytorch/engine/model_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,12 +188,14 @@ def get_free_mem(self):

def warmup(self):
"""warmup."""
# warmup prefill
with self.all_context():
inputs = ModelInputs.make_dummy(1, False, device='cuda')
self._forward_impl(inputs, swap_in_map=dict(), swap_out_map=dict())
inputs = ModelInputs.make_dummy(1, True, device='cuda')
self._forward_impl(inputs, swap_in_map=dict(), swap_out_map=dict())
# TODO: disable for now, do not remove the comments.

# # warmup prefill
# with self.all_context():
# inputs = ModelInputs.make_dummy(1, False, device='cuda')
# self._forward_impl(inputs, swap_in_map=dict(), swap_out_map=dict())
# inputs = ModelInputs.make_dummy(self.cache_config.max_batches, True, device='cuda')
# self._forward_impl(inputs, swap_in_map=dict(), swap_out_map=dict())

async def _async_model_forward(
self,
Expand Down

0 comments on commit e4339e7

Please sign in to comment.