PyABSA icon indicating copy to clipboard operation
PyABSA copied to clipboard

Inference Speed

Open joaopedro-fg opened this issue 11 months ago • 1 comments

Hello! I'm using PyABSA in an application where I have to do aspect term extractation and polarity for about 3000 texts every 15 minutes. At the moment, I'm using an Nvidia L4, however, it still takes about 30 minutes to process all the texts. Is there any way to speed up the inference process?

joaopedro-fg avatar Mar 18 '24 18:03 joaopedro-fg

Maybe you can use smaller modeling length (e.g., 80) and larger batch size (64 or 128). And you can try the fp16 precision using torch.cuda.amp.autocast().

yangheng95 avatar Apr 01 '24 15:04 yangheng95