How to increase the text generation speed with Gpt2 and XLNET?

I am using XLNET and Gpt2 for sentence generation,XLNET taking 4 days to generate 20K sentences, and Gpt2 with 1558M taking 12 hours to generate 20K sentences, I am using GPU instance for text generation,is there any way we can speed up the text generation process

© Copyright 2013-2020 Analytics Vidhya