Longformer slower than Roberta
Hi, It seems I have a similar issue than (https://github.com/huggingface/transformers/issues/8725). However, the time difference between Longformer and Roberta is nearly a factor 10. Does it seem normal (sequences are in the 0-100 length for this first test but will go beyond 512 in practice)? After checking it is in the longformer.encoder step that this is quite slow. Here is the config I use (I have similar factor whatever the config):
LongFormer_TOY_MODEL_HPARAMS = {
"vocab_size": len(LongFormer_VOCAB),
"hidden_size": 64,
"num_hidden_layers": 3,
"num_attention_heads": 8,
"intermediate_size": 32,
"hidden_act": "gelu",
"hidden_dropout_prob": 0.1,
"attention_probs_dropout_prob": 0.1,
"max_position_embeddings": 512
+ 2, # tokenizer's model_max_length + 2 ( / tokens of sequence)
"initializer_range": 0.02,
"layer_norm_eps": 1e-12,
"attention_window": 512
}

Thanks!
cc @patrickvonplaten <|||||>Hey @duvi86,

Could you please provide a reproducible code snippet that shows the time difference between RoBERTa and Longformer?
Thank you<|||||>This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

Please note that issues that do not follow the [contributing guidelines](https://github.com/huggingface/transformers/blob/master/CONTRIBUTING.md) are likely to be ignored.