Add AlbertForPreTraining and TFAlbertForPreTraining models.
Author: jarednielsen
Pull request: yes

I mirrored the structure of `BertForPreTraining` and `TFBertForPreTraining`.

A few differences between the PyTorch and TensorFlow implementations of Bert I noticed along the way:
- TFBertForSequenceClassification has dropout in the classifier head, but TFBertForPreTraining does not. I included dropout in the TFAlbertForPreTraining classifier head.
- TFBertForPreTraining does not include an option to calculate the loss, but BertForPreTraining does. Fixing this will require more wrangling of the dataset and preprocessor, so I'll save that for a later PR. Mirrored the structure here.
- BertForPreTraining has attributes: `self.bert`, `self.cls.predictions`, `self.cls.seq_relationship`. TFBertForPreTraining has attributes: `self.bert`, `self.dropout`, `self.classifier`. I chose to unify these attributes in AlbertForPreTraining and TFAlbertForPreTraining under `self.albert`, `self.cls.predictions`, and `self.cls.sop_classifier`.
- TFAlbertMLMHead adds two biases to the final output: `self.decoder_bias` and `self.bias`. TFBertMLMHead only adds one bias: `self.bias`.

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

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

```diff
@@            Coverage Diff             @@
##           master    #4057      +/-   ##
==========================================
+ Coverage   78.31%   78.37%   +0.06%     
==========================================
  Files         120      120              
  Lines       19854    19916      +62     
==========================================
+ Hits        15549    15610      +61     
- Misses       4305     4306       +1     
```


| [Impacted Files](https://codecov.io/gh/huggingface/transformers/pull/4057?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [src/transformers/\_\_init\_\_.py](https://codecov.io/gh/huggingface/transformers/pull/4057/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9fX2luaXRfXy5weQ==) | `99.10% <ø> (ø)` | |
| [src/transformers/modeling\_auto.py](https://codecov.io/gh/huggingface/transformers/pull/4057/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ19hdXRvLnB5) | `77.23% <ø> (ø)` | |
| [src/transformers/modeling\_tf\_auto.py](https://codecov.io/gh/huggingface/transformers/pull/4057/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ190Zl9hdXRvLnB5) | `68.62% <ø> (ø)` | |
| [src/transformers/modeling\_albert.py](https://codecov.io/gh/huggingface/transformers/pull/4057/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ19hbGJlcnQucHk=) | `77.20% <94.73%> (+1.89%)` | :arrow_up: |
| [src/transformers/modeling\_tf\_albert.py](https://codecov.io/gh/huggingface/transformers/pull/4057/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ190Zl9hbGJlcnQucHk=) | `87.19% <100.00%> (+0.93%)` | :arrow_up: |

------

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


Hi! This is really cool, thanks for taking the time to do that! A few notes on your remarks:

> TFBertForPreTraining does not include an option to calculate the loss, but BertForPreTraining does. 

This is not a bug, it's done on purpose. We try to respect as much as possible each library's paradigm. With PyTorch you can compute the loss both inside and outside the model, so we make it easy for the user to supply the labels and compute a standard loss.

For TensorFlow however, the loss is usually computed outside the model, especially with Keras. None of our TensorFlow models computes the loss for that very reason.

> TFAlbertMLMHead adds two biases to the final output: self.decoder_bias and self.bias. TFBertMLMHead only adds one bias: self.bias.

That's, unfortunately, a mistake on my side. https://github.com/huggingface/transformers/pull/4076


I'm taking a look at your PR, and will see if we can upload weights on S3 containing the SOP weights as well.

Hi @LysandreJik, any updates on your side? I know last week was ICLR. We're prepping a code release and blog post, so it would be great to have this merged in soon :)

Hi @jarednielsen, I took a look today, and it's in good shape! There's a few things to update, however, as this is an opportunity to update our checkpoints to include the SOP.

In order to do this, I had to do a few changes, especially removing the `AlbertPreTrainingHeads` class so that the masked lm layer (previously `AlbertForPreTraining.cls.predictions`) could be at the same level than the `AlbertForMaskedLM` class: `AlbertForMaskedLM.predictions`.

There's a few other changes that need to be done in the conversion utility. I'll look into doing TensorFlow tomorrow and will try merge tomorrow evening + upload the updated checkpoints on the S3; is this timeline okay with you?

Do you mind if I push directly on your fork, so that all the changes are visible in this PR?

Thanks for the prompt response! Yes, that timeline sounds great; feel free to push directly onto my fork.

Cool, will do that. We're releasing transformers `v2.9` today so it won't be in it, but it will be in the next version which should be released sometimes next week.

Thanks a lot for your contribution! Will upload the weights on S3 in the coming days.