[WIP] Add 🤗nlp in examples using the updated tokenizer API
Author: thomwolf
Pull request: yes
Labels: name: wontfix

This PR superseded #4864 

This PR examines how to best make use of all the features of 🤗nlp in the examples.

First example studied is GLUE. The main goal is to have explicit data processing (target: no data processing happening inside transformers) as well as add some efficiency features like dynamic/optimized batching. The second goal is to make this a lot more efficient, fast, and reproducible.

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

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

```diff
@@            Coverage Diff             @@
##           master    #5240      +/-   ##
==========================================
- Coverage   78.34%   77.07%   -1.28%     
==========================================
  Files         138      138              
  Lines       23841    23841              
==========================================
- Hits        18679    18376     -303     
- Misses       5162     5465     +303     
```


| [Impacted Files](https://codecov.io/gh/huggingface/transformers/pull/5240?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [src/transformers/modeling\_tf\_openai.py](https://codecov.io/gh/huggingface/transformers/pull/5240/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ190Zl9vcGVuYWkucHk=) | `19.92% <0.00%> (-75.00%)` | :arrow_down: |
| [src/transformers/data/processors/squad.py](https://codecov.io/gh/huggingface/transformers/pull/5240/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9kYXRhL3Byb2Nlc3NvcnMvc3F1YWQucHk=) | `28.66% <0.00%> (-28.03%)` | :arrow_down: |
| [src/transformers/modeling\_tf\_pytorch\_utils.py](https://codecov.io/gh/huggingface/transformers/pull/5240/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ190Zl9weXRvcmNoX3V0aWxzLnB5) | `88.05% <0.00%> (-1.26%)` | :arrow_down: |
| [src/transformers/tokenization\_bert.py](https://codecov.io/gh/huggingface/transformers/pull/5240/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy90b2tlbml6YXRpb25fYmVydC5weQ==) | `89.95% <0.00%> (-0.92%)` | :arrow_down: |
| [src/transformers/file\_utils.py](https://codecov.io/gh/huggingface/transformers/pull/5240/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9maWxlX3V0aWxzLnB5) | `76.42% <0.00%> (-0.39%)` | :arrow_down: |
| [src/transformers/tokenization\_utils.py](https://codecov.io/gh/huggingface/transformers/pull/5240/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy90b2tlbml6YXRpb25fdXRpbHMucHk=) | `91.50% <0.00%> (-0.32%)` | :arrow_down: |
| [src/transformers/modeling\_tf\_utils.py](https://codecov.io/gh/huggingface/transformers/pull/5240/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ190Zl91dGlscy5weQ==) | `85.71% <0.00%> (-0.30%)` | :arrow_down: |

------

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


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.