Skip to content

Enlarge gc threshold#4076

Merged
lvhan028 merged 9 commits intoInternLM:mainfrom
grimoire:low-freq-gc
Oct 30, 2025
Merged

Enlarge gc threshold#4076
lvhan028 merged 9 commits intoInternLM:mainfrom
grimoire:low-freq-gc

Conversation

@grimoire
Copy link
Copy Markdown
Collaborator

@grimoire grimoire commented Oct 27, 2025

  • Default threshold leads to frequently high level gc. Which would hang for 100ms.
  • disable output when launching kernels.
  • reserve 10% blocks for decoding to avoid too much eviction (Should the value be exposed?)
  • skip sequence with 0 blocks when eviction.

input_maker.step()

async def _async_loop_inputs_preprocess(self):
async def _async_loop_inputs_preprocess(self, forward_event: asyncio.Event = None):
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The type of forward_event is supposed to be "lmdeploy.pytorch.engine.engine.CounterEvent", isn't it?

Why we need a _counter for an asyncio.Event?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The event would be used in engine main loop

async def _async_loop_main(

It should not be unlocked before both engine and model agent set the event.

@lvhan028 lvhan028 merged commit dbd5810 into InternLM:main Oct 30, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants