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

Improve memory footprint of ComputeNgramLmPerplexityJob .get_ppl #581

Merged
merged 1 commit into from
Feb 6, 2025

Conversation

michelwi
Copy link
Contributor

@michelwi michelwi commented Feb 6, 2025

The current implementation constructs a list of the entire files content in memory just to (almost) discard it immediately.

We found that this leads to high memory usage and can slow down the cluster head node (as this is a mini_task). Using a deque instead reduces the memory footprint drastically.

@jtrmal
Copy link

jtrmal commented Feb 6, 2025

One of the weirdest uses of dequeueue I have ever seen but LGTM

Copy link

@jtrmal jtrmal left a comment

Choose a reason for hiding this comment

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

LGTM

@michelwi michelwi merged commit 1b84ca1 into main Feb 6, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants