3 ms·
I almost went a mem-mapped approach for a version I wrote in java that uses fork-join: https://github.com/spennihana/FasterWordEmbeddings https://github.com/spe
by spennihana 8y ago
I almost went a mem-mapped approach for a version I wrote in java that uses fork-join:
https://github.com/spennihana/FasterWordEmbeddings https://github.com/spennihana/FasterWordEmbeddings
Edit: this work uses a different byte-layout + parallel reader that heaves the word vecs into memory as compressed byte arrays. Load time is seconds (haven’t benchmarked with current ssds). Memory footprint is on the order of the size of your word vecs (memory is cheap for me, but could easily be extended to support mem-mapping if memory resources are scarce).