Skip to content

Improve memory footprint of ComputeNgramLmPerplexityJob .get_ppl#581

Merged
michelwi merged 1 commit intomainfrom
willi-improve-ppl-memory
Feb 6, 2025
Merged

Improve memory footprint of ComputeNgramLmPerplexityJob .get_ppl#581
michelwi merged 1 commit intomainfrom
willi-improve-ppl-memory

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
Contributor

jtrmal commented Feb 6, 2025

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

Copy link
Contributor

@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