Patch GPU failures
Author: LysandreJik
Pull request: yes

Pins torch != 1.6.0 as this version fails with random CUDA errors.

Fixes XLM when no `lengths` are specified.

Fix https://github.com/huggingface/transformers/issues/6182

Comments:
# [Codecov](https://codecov.io/gh/huggingface/transformers/pull/6281?src=pr&el=h1) Report
> Merging [#6281](https://codecov.io/gh/huggingface/transformers/pull/6281?src=pr&el=desc) into [master](https://codecov.io/gh/huggingface/transformers/commit/d89acd07cc42a2352cca18c8facefb9442fd08ab&el=desc) will **increase** coverage by `0.01%`.
> The diff coverage is `100.00%`.

[![Impacted file tree graph](https://codecov.io/gh/huggingface/transformers/pull/6281/graphs/tree.svg?width=650&height=150&src=pr&token=9qOlN6Hb1c)](https://codecov.io/gh/huggingface/transformers/pull/6281?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master    #6281      +/-   ##
==========================================
+ Coverage   79.68%   79.69%   +0.01%     
==========================================
  Files         146      146              
  Lines       26595    26596       +1     
==========================================
+ Hits        21192    21197       +5     
+ Misses       5403     5399       -4     
```


| [Impacted Files](https://codecov.io/gh/huggingface/transformers/pull/6281?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [src/transformers/modeling\_xlm.py](https://codecov.io/gh/huggingface/transformers/pull/6281/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ194bG0ucHk=) | `91.02% <100.00%> (+0.01%)` | :arrow_up: |
| [src/transformers/tokenization\_bart.py](https://codecov.io/gh/huggingface/transformers/pull/6281/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy90b2tlbml6YXRpb25fYmFydC5weQ==) | `60.56% <0.00%> (-35.22%)` | :arrow_down: |
| [src/transformers/tokenization\_dpr.py](https://codecov.io/gh/huggingface/transformers/pull/6281/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy90b2tlbml6YXRpb25fZHByLnB5) | `57.65% <0.00%> (+4.50%)` | :arrow_up: |
| [src/transformers/generation\_tf\_utils.py](https://codecov.io/gh/huggingface/transformers/pull/6281/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9nZW5lcmF0aW9uX3RmX3V0aWxzLnB5) | `86.71% <0.00%> (+6.01%)` | :arrow_up: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/huggingface/transformers/pull/6281?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/huggingface/transformers/pull/6281?src=pr&el=footer). Last update [d89acd0...bf40418](https://codecov.io/gh/huggingface/transformers/pull/6281?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).


As mentioned in #6277, this will be problematic since Reformer fails on pytorch < 1.6.0.

Indeed, this will be a problem. The issue with keeping torch 1.6.0 for these tests is that the error is indecipherable. It can't be reproduced on CPU, and on GPU fails 1/4 times when only a few tests are selected, with untrackable CUDA errors. Pinging @patrickvonplaten for discussion.

> Indeed, this will be a problem. The issue with keeping torch 1.6.0 for these tests is that the error is indecipherable. It can't be reproduced on CPU, and on GPU fails 1/4 times when only a few tests are selected, with untrackable CUDA errors. Pinging @patrickvonplaten for discussion.

As discussed internally, I guess we can revert the PR causing #6277 

> As mentioned in #6277, this will be problematic since Reformer fails on pytorch < 1.6.0.

https://github.com/huggingface/transformers/pull/6300 This should fix it for PyTorch < 1.6 and PyTorch == 1.6.. Wolud be great if you can review and merge if OK.

Great, thanks a lot @patrickvonplaten !