Efficiency PR Inquiry
Hi,
I am working with the GloVe-V code base as part of a project. I identified an inefficiency which I think I've removed with my changes.
A few questions I have for you, with some added context:
I checked the change results in the equivalent binary where the CRECs are written out in terms of content but the ordering in which the CRECs need to be different for the way the efficiency change works in the code. The reordering also helps to confirm there is no difference in the results from the output files.
Question 1: Are you committed to maintaining the ordering of the CREC binary files, for backwards compatibility or other reasons, and if no are you open to checking a PR with a change along the lines I'm describing?
I checked the text8 corpus-and a hacked together version of the wikitext 103 dataset-with a tiny bit of preprocessing prior to stdin to confirm they were giving the same binary output, a diff call has no output.
Question 2: If the library is willing to change the data layout in the output file, then my follow up question is which corpus would you like to see comparisons against besides the text8 corpus?
Additional relevant info: For the text8 and the wikitext data my laptop timings indicate ~66% and ~75% speedup in the data processing for the vocabulary and the cooccurence steps respectively. These two steps (vocab and cooccur) are where I've primarily focused because the other two (shuffling and training glove) involve some randomization so they require other approaches to acceleration which I have not looked into at this time and would be a separate PR if I do.
Source: stanfordnlp/GloVe