Closed SHADOWX-frank closed 1 year ago
Don't call parse_sents
for each sent. Call it with a long list of sents so the code can batch process them on the GPU. Make sure the GPU is being used. My testing used a 3090. You can also instantiate the model with num_beams=1
. The default is 4 which is much slower that using 1
. You can also instantiate the model with batch_size=X
. The default is 12 which is fine but you might be able to push this up higher if your sentences are short and you have plenty of VRAM.
hello, I use the pretrained parse_xfm_bart_base for parsing, but the speed of parsing is limited to one sentence per seconds instead of 31 sentences per seconds. how to speed up it?