allenai / longformer

Longformer: The Long-Document Transformer
https://arxiv.org/abs/2004.05150
Apache License 2.0
2.05k stars 276 forks source link

Long T5 #179

Open HaokunLiu opened 3 years ago

HaokunLiu commented 3 years ago

Based on @AkshitaB 's work (#149), this PR extends Longformer to T5. It also adds a test to check if the Longformer T5 produces the same output as the standard T5 on short input texts, as suggested by @ibeltagy in this comment

A quick thing about code style: I'm not sure if this repo has selected any formatter previously. I didn't find dev-requirements.txt. So I continue to use the black formatter in my default setting. It automatically re-formats the file whenever I save it. You may notice changes like ' -> ", or breaking a long line into multiple lines. I hope it doesn't bother you too much.