Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reduce torchengine prefill mem usage #1240

Merged
merged 3 commits into from
Mar 5, 2024

Conversation

grimoire
Copy link
Collaborator

@grimoire grimoire commented Mar 4, 2024

No description provided.

@grimoire grimoire added the Bug:P2 label Mar 4, 2024
@lvhan028 lvhan028 requested a review from AllentDan March 5, 2024 03:12
Copy link
Collaborator

@AllentDan AllentDan left a comment

Choose a reason for hiding this comment

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

LGTM

@@ -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)
Copy link
Collaborator

Choose a reason for hiding this comment

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

del doesn't work?

@lvhan028 lvhan028 merged commit 4bec832 into InternLM:main Mar 5, 2024
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants