Open jkinkead opened 9 years ago
Ping?
This fork breaks in the toBinFile method. for(int i = 0; i < vocab.size(); ++i) { out.write(String.format("%s ", vocab.get(i)).getBytes(cs));
DoubleBuffer vectorBuffer = vectors[i / vectorsPerBuffer];
vectors ( with the plural) is a DoubleBuffer[] and is unlikely to be as large as the vocab size. In most of my test cases, vectors is a DoubleBuffer array of length 1.
Fixes #28 by splitting large models into multiple buffers in memory.
Note on formatting: I used tabs throughout, as that seemed to be more common in the files.
SearcherImpl
was mixed-use. I also tried to keep for-loop (for(
vsfor (
) and naming similar to the local code. This was mixed-use as well.