Skip to content

DCLM Style Deduplications#214

Open
revbucket wants to merge 11 commits into
mainfrom
mattj/bff-0924
Open

DCLM Style Deduplications#214
revbucket wants to merge 11 commits into
mainfrom
mattj/bff-0924

Conversation

@revbucket

Copy link
Copy Markdown

General updates to the dedupe command to do deduplication using a joint paragraph/document flow in the same way that DCLM does.

Nuanced update list:
Bloom Filter updates:

  • Used better binary search to get optimal BF size
  • Initialize Bloom Filters with multicore parallelism in mind

Deduper updates:

  • Switched out threadpool for rayon (cleaner, but equivalently performant)
  • Added optional read/write of bloom filter file (usually it's not necessary to save this, right?)
  • Made the main rust fxn more modular, easier to add in different types of dedupe methods
  • Logged some after-dedupe stats: {sparsity, removal rate}
  • Added DCLM style deduplication

Other stuff:

  • Modified the dedupe config to want a "dedupe.dedupe_method" attribute to specify which type {documents, paragraphs, dclm} of deduplication we do
  • Updated tutorial/etc to include this modified config^

@Whattabatt Whattabatt left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Run make style to pass the linter and style check . Also, please add tests in https://github.com/allenai/dolma/blob/main/tests/python/test_deduper.py

bloom_filter: BloomFilterConfig = field(help="Bloom filter configuration. Required.")
processes: int = field(
default=1, help="Number of processes to use for deduplication. If 1, no multiprocessing will be used."
default=0, help="Number of processes to use for deduplication. If 1, no multiprocessing will be used."

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why this change?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

0 => means we do the max parallelism (processes becomes number of cores available). I just assumed that we want this behavior almost all of the time

This might not actually play nice with beaker nodes and how CPU's get allocated here. I'll fall back on ai2-best-practices here

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Update the help string to reflect this since it's non-obvious

Comment thread python/dolma/cli/deduper.py Outdated
Comment thread src/bloom_filter.rs Outdated
Comment thread src/bloom_filter.rs Outdated
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.

2 participants