Closed matt-gardner closed 7 years ago
This is now ready to review. It's updating the sentence selection model to be compatible with the new dynamic padding stuff that I've been working on. This should make training these models a lot faster. @haniesedghi, FYI.
Ok, I fixed those comments, @pdasigi, and I've run some timing benchmarks. Without dynamic padding, I was truncating to 40 words per sentence. The max sentence length is ~260 words, though I don't know the average sentence length. One epoch with this truncation took about 45 minutes. When I switched to dynamic padding I removed all truncation. It was on track to finish in about 1.25 hours per epoch, but it ran out of memory on a batch with really long sentences.
If we assume a linear relationship between sentence length and runtime (which may not be accurate), we'd get maybe ~3 hours per epoch without any truncation (though it also would run out of memory, so we'd have to decrease the batch size, which would make it slower). Dynamic padding, then, gives us a ~2-3x speedup in this model.
Currently getting a weird error on model loading, but after that's fixed, this will hopefully just work as-is.