allenai / dolma

Data and tools for generating and inspecting OLMo pre-training data.
https://allenai.github.io/dolma/
Apache License 2.0
894 stars 90 forks source link

use precompiled regex when loading url blocklists #137

Closed peterbjorgensen closed 5 months ago

peterbjorgensen commented 5 months ago

When running the url taggers a significant amount of time is spent loading the domain blocklists from file, because it has to reload the blocklist every time the parallel processor moves on to a new file. This change will precompile the regex patterns so the regex engine doesn't have to compile internally for every line in the blockfile.