[Bug Fix] The actual batch_size is inconsistent with the settings.
In the previous version, the generation of **negative examples** was placed in `Datacollator`, which would cause `batch_size` to be **inconsistent** with the setting during training, resulting in **OOM errors**. 
Now I move the negative sample generation process to `TextDataset`, although `TextDataset` will need larger storage space and the reading procedure is more time-consuming, the training will not be interrupted due to OOM errors.

In fact, in my own project, I have used the `Datasets` library you developed, which is very impressive, especially for scenarios with large data scales such as pre-training tasks. I am not sure if it's welcomed to use the `Datasets` library by default in `TextDatasetForNextSentencePrediction`. I can provide a version that depends on the the library, and try to use the library when it is available.
@sgugger Hi, I'm a little confused when I reformat the codes by `make style` and `make quality`.
It seems that the files in those directories are not tested by isort. 
```
make style
black --line-length 119 --target-version py35 examples templates tests src utils
All done! ✨ 🍰 ✨
417 files left unchanged.
isort examples templates tests src utils
WARNING: Unable to parse file examples due to [Errno 21] Is a directory: '/Users/hlz/my-bert-nsp/examples'
WARNING: Unable to parse file templates due to [Errno 21] Is a directory: '/Users/hlz/my-bert-nsp/templates'
WARNING: Unable to parse file tests due to [Errno 21] Is a directory: '/Users/hlz/my-bert-nsp/tests'
WARNING: Unable to parse file src due to [Errno 21] Is a directory: '/Users/hlz/my-bert-nsp/src'
WARNING: Unable to parse file utils due to [Errno 21] Is a directory: '/Users/hlz/my-bert-nsp/utils'
```
When I add the parameter `-rc`, it works.
```
make style
black --line-length 119 --target-version py35 examples templates tests src utils
All done! ✨ 🍰 ✨
417 files left unchanged.
isort -rc examples templates tests src utils
```

And When I use `make quality`, it reports:
```
make quality
black --check --line-length 119 --target-version py35 examples templates tests src utils
All done! ✨ 🍰 ✨
417 files would be left unchanged.
isort --check-only -rc examples templates tests src utils
flake8 examples templates tests src utils
examples/seq2seq/test_datasets.py:25:75: E231 missing whitespace after ','
examples/seq2seq/test_fsmt_bleu_score.py:48:76: E231 missing whitespace after ','
tests/test_modeling_fsmt.py:411:52: E231 missing whitespace after ','
src/transformers/modeling_lxmert.py:229:110: E231 missing whitespace after ','
src/transformers/modeling_tf_lxmert.py:1129:94: E231 missing whitespace after ','
make: *** [quality] Error 1
```
Those errors are not from the files I modify this time, but the CircleCI report the file `language_modeling.py` need to be reformatted.

<|||||>Hi @HuangLianzhe, it seems you have the wrong black/isort versions. The error shown on the CI is a different one. Which versions are you running on?<|||||>> Hi @HuangLianzhe, it seems you have the wrong black/isort versions. The error shown on the CI is a different one. Which versions are you running on?

isort, version 4.3.21
black, version 19.10b0<|||||>These are not the correct versions. Please run `pip install -e ".[quality]"` when in your `transformers` directory. You should have `["black >= 20.8b1", "isort >= 5", "flake8 >= 3.8.3"]`<|||||>Sorry, I forgot to update these libraries when I changed the work directory. Thanks for the hint!<|||||># [Codecov](https://codecov.io/gh/huggingface/transformers/pull/7235?src=pr&el=h1) Report
> Merging [#7235](https://codecov.io/gh/huggingface/transformers/pull/7235?src=pr&el=desc) into [master](https://codecov.io/gh/huggingface/transformers/commit/244e1b5ba331cb4c1ed96d88d0895c252567f7f3?el=desc) will **decrease** coverage by `0.32%`.
> The diff coverage is `97.53%`.

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

```diff
@@            Coverage Diff             @@
##           master    #7235      +/-   ##
==========================================
- Coverage   78.81%   78.48%   -0.33%     
==========================================
  Files         174      172       -2     
  Lines       33670    33079     -591     
==========================================
- Hits        26537    25963     -574     
+ Misses       7133     7116      -17     
```


| [Impacted Files](https://codecov.io/gh/huggingface/transformers/pull/7235?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [...rc/transformers/data/datasets/language\_modeling.py](https://codecov.io/gh/huggingface/transformers/pull/7235/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9kYXRhL2RhdGFzZXRzL2xhbmd1YWdlX21vZGVsaW5nLnB5) | `93.63% <96.49%> (+0.69%)` | :arrow_up: |
| [src/transformers/data/data\_collator.py](https://codecov.io/gh/huggingface/transformers/pull/7235/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9kYXRhL2RhdGFfY29sbGF0b3IucHk=) | `92.64% <100.00%> (-0.63%)` | :arrow_down: |
| [src/transformers/modeling\_tf\_funnel.py](https://codecov.io/gh/huggingface/transformers/pull/7235/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ190Zl9mdW5uZWwucHk=) | `18.53% <0.00%> (-75.51%)` | :arrow_down: |
| [src/transformers/activations\_tf.py](https://codecov.io/gh/huggingface/transformers/pull/7235/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9hY3RpdmF0aW9uc190Zi5weQ==) | `54.16% <0.00%> (-20.84%)` | :arrow_down: |
| [src/transformers/configuration\_bart.py](https://codecov.io/gh/huggingface/transformers/pull/7235/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9jb25maWd1cmF0aW9uX2JhcnQucHk=) | `90.00% <0.00%> (-4.00%)` | :arrow_down: |
| [src/transformers/modeling\_fsmt.py](https://codecov.io/gh/huggingface/transformers/pull/7235/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ19mc210LnB5) | `93.58% <0.00%> (-0.39%)` | :arrow_down: |
| [src/transformers/tokenization\_auto.py](https://codecov.io/gh/huggingface/transformers/pull/7235/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy90b2tlbml6YXRpb25fYXV0by5weQ==) | `91.93% <0.00%> (-0.26%)` | :arrow_down: |
| [src/transformers/modeling\_bart.py](https://codecov.io/gh/huggingface/transformers/pull/7235/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ19iYXJ0LnB5) | `94.27% <0.00%> (-0.17%)` | :arrow_down: |
| [src/transformers/tokenization\_utils\_base.py](https://codecov.io/gh/huggingface/transformers/pull/7235/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy90b2tlbml6YXRpb25fdXRpbHNfYmFzZS5weQ==) | `93.91% <0.00%> (-0.14%)` | :arrow_down: |
| [src/transformers/modeling\_utils.py](https://codecov.io/gh/huggingface/transformers/pull/7235/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ191dGlscy5weQ==) | `87.23% <0.00%> (-0.10%)` | :arrow_down: |
| ... and [11 more](https://codecov.io/gh/huggingface/transformers/pull/7235/diff?src=pr&el=tree-more) | |

------

[Continue to review full report at Codecov](https://codecov.io/gh/huggingface/transformers/pull/7235?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/7235?src=pr&el=footer). Last update [01f0fd0...e00c4bb](https://codecov.io/gh/huggingface/transformers/pull/7235?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
<|||||>Thanks @sgugger for your careful revision!<|||||>Can you just take care of the merge conflicts? Then we should be good to merge.<|||||>Test failure has been fixed on master, so should be safe to merge. Thanks again!<|||||>Thanks! I am just wondering why the test did not get passed. :)