Gpt2 generation of text larger than 1024

Viewed 304

I know the context supported by GPT2 is 1024, but I assume there's some technique they utilized to train and generate text longer than that in their results. Also, I saw many gpt2-based repos training text with length longer than 1024. But when I tried generating text using run_generation.py to generate text longer than 1024 it throws a runtime error :The size of tensor a (1025) must match the size of tensor b (1024) at non-singleton dimension 3. I have the following questions:

Shouldn't it be possible to generate longer text since a sliding window is used? Can you please explain what's necessary to generate longer text? What changes will I have to make to the run_generation.py code?

0 Answers
Related