Sample a constant number of tokens for masking in LM finetuning
Author: rakeshchada
Pull request: yes

For Masked LM fine-tuning, I think both the original BERT and RoBERTa implementations uniformly sample x number of tokens in *each* sequence for masking (where x = mlm_probability * 100 * sequence_length)
However, The current logic in run_lm_finetuning.py does an indepdendent sampling (from bernoulli distribution) for each token in the sequence. This leads to variance in the number of masked tokens (with the average number still close to x%).

The below example illustrates an extreme case, of the current logic, where no token in the input sequence is masked.

```
In [1]: import numpy as np
   ...: import torch
   ...: from transformers import BertTokenizer
   ...: 
   ...: mlm_probability = 0.15
   ...: tokenizer = BertTokenizer.from_pretrained('bert-large-uncased')
   ...: 
   ...: tokens = tokenizer.convert_ids_to_tokens(tokenizer.encode('please mask me, o lord!', add_special_tokens=True))
   ...: 
   ...: input_ids = tokenizer.convert_tokens_to_ids(tokens)
   ...: 
   ...: inputs = torch.Tensor([input_ids])
   ...: 
   ...: labels = inputs.clone()
   ...: 
   ...: probability_matrix = torch.full(labels.shape, mlm_probability)
   ...: 
   ...: special_tokens_mask = [tokenizer.get_special_tokens_mask(val, already_has_special_tokens=True) for val in labels.tolist()]
   ...: probability_matrix.masked_fill_(torch.tensor(special_tokens_mask, dtype=torch.bool), value=0.0)
   ...: masked_indices = torch.bernoulli(probability_matrix).bool()
   ...: 
   ...: 

In [2]: masked_indices
Out[2]: tensor([[False, False, False, False, False, False, False, False, False]])

```

This PR modifies the logic so the percentage of masked tokens is constant (at x).

Separately, the existing and the new masking logic both rely on boolean tensors of pytorch.
So, this also updates README to include the minimum pytorch version needed. (1.2.0)

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

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

```diff
@@            Coverage Diff             @@
##           master    #1555      +/-   ##
==========================================
+ Coverage   84.74%   86.16%   +1.42%     
==========================================
  Files          91       91              
  Lines       13593    13593              
==========================================
+ Hits        11519    11713     +194     
+ Misses       2074     1880     -194
```


| [Impacted Files](https://codecov.io/gh/huggingface/transformers/pull/1555?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [transformers/modeling\_openai.py](https://codecov.io/gh/huggingface/transformers/pull/1555/diff?src=pr&el=tree#diff-dHJhbnNmb3JtZXJzL21vZGVsaW5nX29wZW5haS5weQ==) | `81.75% <0%> (+1.35%)` | :arrow_up: |
| [transformers/modeling\_ctrl.py](https://codecov.io/gh/huggingface/transformers/pull/1555/diff?src=pr&el=tree#diff-dHJhbnNmb3JtZXJzL21vZGVsaW5nX2N0cmwucHk=) | `95.45% <0%> (+2.27%)` | :arrow_up: |
| [transformers/modeling\_xlnet.py](https://codecov.io/gh/huggingface/transformers/pull/1555/diff?src=pr&el=tree#diff-dHJhbnNmb3JtZXJzL21vZGVsaW5nX3hsbmV0LnB5) | `73.28% <0%> (+2.46%)` | :arrow_up: |
| [transformers/modeling\_roberta.py](https://codecov.io/gh/huggingface/transformers/pull/1555/diff?src=pr&el=tree#diff-dHJhbnNmb3JtZXJzL21vZGVsaW5nX3JvYmVydGEucHk=) | `80.57% <0%> (+15.1%)` | :arrow_up: |
| [transformers/tests/modeling\_tf\_common\_test.py](https://codecov.io/gh/huggingface/transformers/pull/1555/diff?src=pr&el=tree#diff-dHJhbnNmb3JtZXJzL3Rlc3RzL21vZGVsaW5nX3RmX2NvbW1vbl90ZXN0LnB5) | `96.8% <0%> (+17.02%)` | :arrow_up: |
| [transformers/modeling\_tf\_pytorch\_utils.py](https://codecov.io/gh/huggingface/transformers/pull/1555/diff?src=pr&el=tree#diff-dHJhbnNmb3JtZXJzL21vZGVsaW5nX3RmX3B5dG9yY2hfdXRpbHMucHk=) | `92.95% <0%> (+83.09%)` | :arrow_up: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/huggingface/transformers/pull/1555?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/1555?src=pr&el=footer). Last update [fd97761...090cbd6](https://codecov.io/gh/huggingface/transformers/pull/1555?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).


Thanks @rakeshchada. Closing as superseded by #1814