Use of global attention of Longformer when generating
I'm training Longformer2Roberta, the encoder part of this Seq2Seq model is Longformer. The one feature Longformer brings is global attention, I found the use of it during training, but it is never used at the point of generation. I guess it should be used somewhere here https://github.com/huggingface/transformers/blob/03e46c1de3864b8464a1b40d2a414b35f6b7f0df/src/transformers/generation_utils.py#L402. 

I guess @patrickvonplaten is working on these models.
Hey @alexyalunin - you are completely right! I'm working on a bigger generation refactor at the moment to better handle cases like this. 

For this case, I would propose to modify the code yourself and do a little hack, something along the lines 

```python 
if "global_attention_mask" in model_kwargs:
    encoder_outputs: ModelOutput = encoder(input_ids, attention_mask=attention_mask, global_attention_mask=global_attention_mask, return_dict=True)
else:
    encoder_outputs: ModelOutput = encoder(input_ids, attention_mask=attention_mask, return_dict=True) 
```

I don't want to merge this into master because it's quite hacky and the `generate()` function needs a refactor before we start adding more and more hacks. Hope this works for you for now.<|||||>This should be solved soon by the new generate() design: #6949 in like ~1,2 weeks<|||||>This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
