Problems About Using the Run_language_modeling with Tf2.
# 🐛 Bug

### Model I am using Bert.

### The problem arises when using:
I'm using the run_language_modling.py to fine-tuning with (Tf2.0.0/Tf2.2.0). Of course i modify the script.
I use TFAutoModelWithLMHead,TFTrainer in this repo to build my script.
When i'm traning,here is the problem.
`ValueError: Trying to create optimizer slot variable under the scope for tf.distribute.Strategy (<tensorflow.python.distribute.one_device_strategy.OneDeviceStrategy object at 0x15b49bed0>), which is different from the scope used for the original variable (<tf.Variable 'tf_bert_for_masked_lm/bert/embeddings/word_embeddings/weight:0' shape=(21128, 768) dtype=float32, numpy=array(),dtype=float32)>). Make sure the slot variables are created under the same strategy scope. This may happen if you're restoring from a checkpoint outside the scope`
I move initializing the model to TFTrainer().args.strategy.scope() and work well!

### Someing to say
- It seems that when using tf2.0, there's some problems about TFTrainer's design. Will you improve this design so that one can use tf2.0 more conveniently in this repo?
- Thanks for this repo and your contribution.

cc @jplu, might be of interest :)<|||||>Hello!

Like this there is not enough details to see what is the issue. Can you provide the piece of code you are trying to run? plz :)

Also if you are looking for how to properly use the trainer I suggest you to look at the already existing examples:

- [Question-answering](https://github.com/huggingface/transformers/blob/master/examples/question-answering/run_tf_squad.py)
- [Token classification](https://github.com/huggingface/transformers/blob/master/examples/token-classification/run_tf_ner.py)
- [Sequence classification](https://github.com/huggingface/transformers/blob/master/examples/text-classification/run_tf_glue.py)
- [Multiple Choice](https://github.com/huggingface/transformers/blob/master/examples/multiple-choice/run_tf_multiple_choice.py)

They are all working well with CPU/Single GPU/Multiple GPU, only TPU need to be further tested for now.

Basically the score is created the first time when you call the `strategy` property of the `tf_training_args.py`. Be careful if you try to translate the PT script to TF there are quite a lot of differences to care about. The training arguments are one of them.

Nevertheless, thanks a lot for trying to make a language modeling with TF2 and will be happy to help in case you need some.<|||||>Thanks for your reply!  @jplu 

Sorry for that i'm not looking at the examples.In the examples, it initializes the model with trainng_args.strategy.scope(),and in my script, i initialize the model in TFTrainer.\__init\__ with the self.args.strategy.scope(). It looks the same.

If we initianize the model in  trainng_args.strategy.scope(), it's be ok ! At first, I think we should pass the model_args to TFTrainer, not the model, and initialize the model in \__init\__. Therefore i think maybe we should improve the design. 

Thanks again for your reply!
