[Almost all TF models] TF clean up: add missing CLM / MLM loss; fix T5 naming and keras compile
Author: patrickvonplaten
Pull request: yes

This PR aligns TF code more with PT code and adds full training support to all CLM and MLM models applying @jplu's loss design to the remaining models. In more detail the following things are included in the PR:

- Add `TFMaskedLanguageModelingLoss` and `TFCausalLanguageModelingLoss` to all CLM and MLM TF models. Only Transfo-XL and XLM are not included since they use adaptive softmax (TF Transfo-XL currently has no Adaptive Softmax implemented cc @TevenLeScao for notification)
- Change value to mask CE loss from -1 to -100 to align with PyTorch cc - tf_ner script is updated accordingly @jplu. Using -1 is deprecated here and should be removed in a future version.
- Split Bert into BertForCLM and BertForMLM as was done in PyTorch (small break in backward compatibility here)
- Split TFAutoModelWithLMHead into TFAutoModelForCLM, ...ForMLM, ForSeq2Seq as was done in PyTorch to make TF ready for encoder-decoder wrapper.
- Add various tests for `modeling_tf_auto`.py e.g. that the mappings are correctly ordered
- Fix inconsistent naming in TF T5 and fix TF T5 keras compilation bug @sshleifer - encoder decoder tf related tests are fixed so should concern tf bart as well

TODO:
- [x] add labels to all tests where it applies
- [x] add CLM loss to all other models
- [x] add MLM loss to all other models
- [x] Clean TF T5

Future Pr:
- [ ] Test that TF Trainer works well with all new CLM / MLM models - we should definitely start adding tests for TF Trainer as well @jplu @julien-c @LysandreJik 
- [ ] TF Benchmark can now be done on training as welll -> update the benchmark scripts

Comments:
@LysandreJik @julien-c @jplu @thomwolf @sgugger - can you take a look at this example if the CLM loss is correctly added? If yes, I will add this loss to all other CLM models and add tests.

Looks good to me!!

# [Codecov](https://codecov.io/gh/huggingface/transformers/pull/5395?src=pr&el=h1) Report
> Merging [#5395](https://codecov.io/gh/huggingface/transformers/pull/5395?src=pr&el=desc) into [master](https://codecov.io/gh/huggingface/transformers/commit/21cd8c40862ba356096ab4cda31563ee3a35c1bb&el=desc) will **decrease** coverage by `0.03%`.
> The diff coverage is `77.17%`.

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

```diff
@@            Coverage Diff             @@
##           master    #5395      +/-   ##
==========================================
- Coverage   76.39%   76.35%   -0.04%     
==========================================
  Files         141      141              
  Lines       24617    24868     +251     
==========================================
+ Hits        18807    18989     +182     
- Misses       5810     5879      +69     
```


| [Impacted Files](https://codecov.io/gh/huggingface/transformers/pull/5395?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [src/transformers/\_\_init\_\_.py](https://codecov.io/gh/huggingface/transformers/pull/5395/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9fX2luaXRfXy5weQ==) | `99.22% <ø> (ø)` | |
| [src/transformers/modeling\_auto.py](https://codecov.io/gh/huggingface/transformers/pull/5395/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ19hdXRvLnB5) | `74.41% <ø> (ø)` | |
| [src/transformers/modeling\_xlnet.py](https://codecov.io/gh/huggingface/transformers/pull/5395/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ194bG5ldC5weQ==) | `78.86% <ø> (ø)` | |
| [src/transformers/modeling\_tf\_electra.py](https://codecov.io/gh/huggingface/transformers/pull/5395/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ190Zl9lbGVjdHJhLnB5) | `26.02% <10.00%> (-0.91%)` | :arrow_down: |
| [src/transformers/modeling\_tf\_mobilebert.py](https://codecov.io/gh/huggingface/transformers/pull/5395/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ190Zl9tb2JpbGViZXJ0LnB5) | `23.38% <14.28%> (-0.24%)` | :arrow_down: |
| [src/transformers/modeling\_tf\_auto.py](https://codecov.io/gh/huggingface/transformers/pull/5395/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ190Zl9hdXRvLnB5) | `63.03% <40.42%> (-9.47%)` | :arrow_down: |
| [src/transformers/modeling\_tf\_bert.py](https://codecov.io/gh/huggingface/transformers/pull/5395/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ190Zl9iZXJ0LnB5) | `96.97% <80.00%> (-1.40%)` | :arrow_down: |
| [src/transformers/modeling\_tf\_t5.py](https://codecov.io/gh/huggingface/transformers/pull/5395/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ190Zl90NS5weQ==) | `90.90% <83.65%> (-0.53%)` | :arrow_down: |
| [src/transformers/modeling\_tf\_utils.py](https://codecov.io/gh/huggingface/transformers/pull/5395/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ190Zl91dGlscy5weQ==) | `88.88% <84.61%> (-0.23%)` | :arrow_down: |
| [src/transformers/modeling\_tf\_albert.py](https://codecov.io/gh/huggingface/transformers/pull/5395/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ190Zl9hbGJlcnQucHk=) | `76.47% <100.00%> (+0.48%)` | :arrow_up: |
| ... and [9 more](https://codecov.io/gh/huggingface/transformers/pull/5395/diff?src=pr&el=tree-more) | |

------

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


Ok will add this for all TF CLM models then :-) and add tests.