Update XLM with TF decorator
Author: louisowen6
Pull request: yes

# What does this PR do?

<!--
Congratulations! You've made it this far! You're not quite done yet though.

Once merged, your PR is going to appear in the release notes with the title you set, so make sure it's a great title that fully reflects the extent of your awesome contribution.

Then, please replace this with a description of the change and which issue is fixed (if applicable). Please also include relevant motivation and context. List any dependencies (if any) that are required for this change.

Once you're done, someone will review your PR shortly (see the section "Who can review?" below to tag some potential reviewers). They may suggest changes to make the code even better. If no one reviewed your PR after a week has passed, don't hesitate to post a new comment @-mentioning the same persons---sometimes notifications get lost.
-->

<!-- Remove if not applicable -->

Unpacks TF model inputs through a decorator, improving code clarity for the `XLM` model. To be read with issue https://github.com/huggingface/transformers/issues/16051 , which holds the description of the problem, the proposed solution, and future plan.


## Before submitting
- [ ] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
- [X] Did you read the [contributor guideline](https://github.com/huggingface/transformers/blob/master/CONTRIBUTING.md#start-contributing-pull-requests), Pull Request section?
- [X] Was this discussed/approved via a Github issue or the [forum](https://discuss.huggingface.co/)?  https://github.com/huggingface/transformers/issues/16051
- [ ] Did you make sure to update the documentation with your changes? Here are the
      [documentation guidelines](https://github.com/huggingface/transformers/tree/master/docs), and
      [here are tips on formatting docstrings](https://github.com/huggingface/transformers/tree/master/docs#writing-source-documentation).
- [ ] Did you write any new necessary tests?


## Who can review?

@LysandreJik @gante 

<!-- Your PR will be replied to more quickly if you can figure out the right person to tag with @

 If you know how to use git blame, that is the easiest way, otherwise, here is a rough guide of **who to tag**.
 Please tag fewer than 3 people.

Models:

- albert, bert, xlm: @LysandreJik
- blenderbot, bart, marian, pegasus, encoderdecoder,  t5: @patrickvonplaten, @patil-suraj
- longformer, reformer, transfoxl, xlnet: @patrickvonplaten
- fsmt: @stas00
- funnel: @sgugger
- gpt2: @patrickvonplaten, @LysandreJik
- rag: @patrickvonplaten, @lhoestq
- tensorflow: @LysandreJik

Library:

- benchmarks: @patrickvonplaten
- deepspeed: @stas00
- ray/raytune: @richardliaw, @amogkam
- text generation: @patrickvonplaten
- tokenizers: @n1t0, @LysandreJik
- trainer: @sgugger
- pipelines: @LysandreJik

Documentation: @sgugger

HF projects:

- datasets: [different repo](https://github.com/huggingface/datasets)
- rust tokenizers: [different repo](https://github.com/huggingface/tokenizers)

Examples:

- maintained examples (not research project or legacy): @sgugger, @patil-suraj
- research_projects/bert-loses-patience: @JetRunner
- research_projects/distillation: @VictorSanh

 -->


Comments:
tests results

```
RUN_SLOW=1 py.test -vv tests/xlm/test_modeling_tf_xlm.py      
================================================================================== test session starts ===================================================================================
platform linux -- Python 3.8.12, pytest-7.1.1, pluggy-1.0.0 -- /home/louisowen6/miniconda3/envs/transformers_dev/bin/python3
cachedir: .pytest_cache
hypothesis profile 'default' -> database=DirectoryBasedExampleDatabase('/mnt/c/Users/Louis Owen/transformers/.hypothesis/examples')
rootdir: /mnt/c/Users/Louis Owen/transformers, configfile: setup.cfg
plugins: hypothesis-6.39.4, forked-1.4.0, timeout-2.1.0, xdist-2.5.0, dash-2.3.0
collected 36 items                                                                                                                                                                       

tests/xlm/test_modeling_tf_xlm.py::TFXLMModelTest::test_attention_outputs <- tests/test_modeling_tf_common.py PASSED                                                               [  2%]
tests/xlm/test_modeling_tf_xlm.py::TFXLMModelTest::test_compile_tf_model <- tests/test_modeling_tf_common.py PASSED                                                                [  5%]
tests/xlm/test_modeling_tf_xlm.py::TFXLMModelTest::test_config PASSED                                                                                                              [  8%]
tests/xlm/test_modeling_tf_xlm.py::TFXLMModelTest::test_determinism <- tests/test_modeling_tf_common.py PASSED                                                                     [ 11%]
tests/xlm/test_modeling_tf_xlm.py::TFXLMModelTest::test_for_multiple_choice PASSED                                                                                                 [ 13%]
tests/xlm/test_modeling_tf_xlm.py::TFXLMModelTest::test_for_token_classification PASSED                                                                                            [ 16%]
tests/xlm/test_modeling_tf_xlm.py::TFXLMModelTest::test_forward_signature <- tests/test_modeling_tf_common.py PASSED                                                               [ 19%]
tests/xlm/test_modeling_tf_xlm.py::TFXLMModelTest::test_generate_with_headmasking <- tests/test_modeling_tf_common.py PASSED                                                       [ 22%]
tests/xlm/test_modeling_tf_xlm.py::TFXLMModelTest::test_headmasking <- tests/test_modeling_tf_common.py PASSED                                                                     [ 25%]
tests/xlm/test_modeling_tf_xlm.py::TFXLMModelTest::test_hidden_states_output <- tests/test_modeling_tf_common.py PASSED                                                            [ 27%]
tests/xlm/test_modeling_tf_xlm.py::TFXLMModelTest::test_initialization <- tests/test_modeling_tf_common.py PASSED                                                                  [ 30%]
tests/xlm/test_modeling_tf_xlm.py::TFXLMModelTest::test_inputs_embeds <- tests/test_modeling_tf_common.py PASSED                                                                   [ 33%]
tests/xlm/test_modeling_tf_xlm.py::TFXLMModelTest::test_keras_save_load <- tests/test_modeling_tf_common.py PASSED                                                                 [ 36%]
tests/xlm/test_modeling_tf_xlm.py::TFXLMModelTest::test_keyword_and_dict_args <- tests/test_modeling_tf_common.py PASSED                                                           [ 38%]
tests/xlm/test_modeling_tf_xlm.py::TFXLMModelTest::test_lm_head_model_beam_search_generate_dict_outputs <- tests/test_modeling_tf_common.py PASSED                                 [ 41%]
tests/xlm/test_modeling_tf_xlm.py::TFXLMModelTest::test_lm_head_model_no_beam_search_generate_dict_outputs <- tests/test_modeling_tf_common.py PASSED                              [ 44%]
tests/xlm/test_modeling_tf_xlm.py::TFXLMModelTest::test_lm_head_model_random_beam_search_generate <- tests/test_modeling_tf_common.py PASSED                                       [ 47%]
tests/xlm/test_modeling_tf_xlm.py::TFXLMModelTest::test_lm_head_model_random_no_beam_search_generate <- tests/test_modeling_tf_common.py PASSED                                    [ 50%]
tests/xlm/test_modeling_tf_xlm.py::TFXLMModelTest::test_load_with_mismatched_shapes <- tests/test_modeling_tf_common.py PASSED                                                     [ 52%]
tests/xlm/test_modeling_tf_xlm.py::TFXLMModelTest::test_loss_computation <- tests/test_modeling_tf_common.py PASSED                                                                [ 55%]
tests/xlm/test_modeling_tf_xlm.py::TFXLMModelTest::test_model_common_attributes <- tests/test_modeling_tf_common.py PASSED                                                         [ 58%]
tests/xlm/test_modeling_tf_xlm.py::TFXLMModelTest::test_model_from_pretrained PASSED                                                                                               [ 61%]
tests/xlm/test_modeling_tf_xlm.py::TFXLMModelTest::test_model_main_input_name <- tests/test_modeling_tf_common.py PASSED                                                           [ 63%]
tests/xlm/test_modeling_tf_xlm.py::TFXLMModelTest::test_model_outputs_equivalence <- tests/test_modeling_tf_common.py PASSED                                                       [ 66%]
tests/xlm/test_modeling_tf_xlm.py::TFXLMModelTest::test_numpy_arrays_inputs <- tests/test_modeling_tf_common.py PASSED                                                             [ 69%]
tests/xlm/test_modeling_tf_xlm.py::TFXLMModelTest::test_onnx_compliancy <- tests/test_modeling_tf_common.py PASSED                                                                 [ 72%]
tests/xlm/test_modeling_tf_xlm.py::TFXLMModelTest::test_onnx_runtime_optimize <- tests/test_modeling_tf_common.py PASSED                                                           [ 75%]
tests/xlm/test_modeling_tf_xlm.py::TFXLMModelTest::test_pt_tf_model_equivalence <- tests/test_modeling_tf_common.py SKIPPED (test is PT+TF test)                                   [ 77%]
tests/xlm/test_modeling_tf_xlm.py::TFXLMModelTest::test_resize_token_embeddings <- tests/test_modeling_tf_common.py PASSED                                                         [ 80%]
tests/xlm/test_modeling_tf_xlm.py::TFXLMModelTest::test_save_load <- tests/test_modeling_tf_common.py PASSED                                                                       [ 83%]
tests/xlm/test_modeling_tf_xlm.py::TFXLMModelTest::test_save_load_config <- tests/test_modeling_tf_common.py PASSED                                                                [ 86%]
tests/xlm/test_modeling_tf_xlm.py::TFXLMModelTest::test_xlm_lm_head PASSED                                                                                                         [ 88%]
tests/xlm/test_modeling_tf_xlm.py::TFXLMModelTest::test_xlm_model PASSED                                                                                                           [ 91%]
tests/xlm/test_modeling_tf_xlm.py::TFXLMModelTest::test_xlm_qa PASSED                                                                                                              [ 94%]
tests/xlm/test_modeling_tf_xlm.py::TFXLMModelTest::test_xlm_sequence_classif PASSED                                                                                                [ 97%]
tests/xlm/test_modeling_tf_xlm.py::TFXLMModelLanguageGenerationTest::test_lm_generate_xlm_mlm_en_2048 PASSED                                                                       [100%]
```

_The documentation is not available anymore as the PR was closed or merged._

second tests report

```
 RUN_SLOW=1 py.test -vv tests/xlm/test_modeling_tf_xlm.py
=============================================================================== test session starts ================================================================================
platform linux -- Python 3.8.12, pytest-7.1.1, pluggy-1.0.0 -- /home/louisowen6/miniconda3/envs/transformers_dev/bin/python3
cachedir: .pytest_cache
hypothesis profile 'default' -> database=DirectoryBasedExampleDatabase('/mnt/c/Users/Louis Owen/Desktop/transformers/.hypothesis/examples')
rootdir: /mnt/c/Users/Louis Owen/Desktop/transformers, configfile: setup.cfg
plugins: hypothesis-6.39.4, forked-1.4.0, timeout-2.1.0, xdist-2.5.0, dash-2.3.0
collected 36 items                                                                                                                                                                 

tests/xlm/test_modeling_tf_xlm.py::TFXLMModelTest::test_attention_outputs <- tests/test_modeling_tf_common.py PASSED                                                         [  2%]
tests/xlm/test_modeling_tf_xlm.py::TFXLMModelTest::test_compile_tf_model <- tests/test_modeling_tf_common.py PASSED                                                          [  5%]
tests/xlm/test_modeling_tf_xlm.py::TFXLMModelTest::test_config PASSED                                                                                                        [  8%]
tests/xlm/test_modeling_tf_xlm.py::TFXLMModelTest::test_determinism <- tests/test_modeling_tf_common.py PASSED                                                               [ 11%]
tests/xlm/test_modeling_tf_xlm.py::TFXLMModelTest::test_for_multiple_choice PASSED                                                                                           [ 13%]
tests/xlm/test_modeling_tf_xlm.py::TFXLMModelTest::test_for_token_classification PASSED                                                                                      [ 16%]
tests/xlm/test_modeling_tf_xlm.py::TFXLMModelTest::test_forward_signature <- tests/test_modeling_tf_common.py PASSED                                                         [ 19%]
tests/xlm/test_modeling_tf_xlm.py::TFXLMModelTest::test_generate_with_headmasking <- tests/test_modeling_tf_common.py PASSED                                                 [ 22%]
tests/xlm/test_modeling_tf_xlm.py::TFXLMModelTest::test_headmasking <- tests/test_modeling_tf_common.py PASSED                                                               [ 25%]
tests/xlm/test_modeling_tf_xlm.py::TFXLMModelTest::test_hidden_states_output <- tests/test_modeling_tf_common.py PASSED                                                      [ 27%]
tests/xlm/test_modeling_tf_xlm.py::TFXLMModelTest::test_initialization <- tests/test_modeling_tf_common.py PASSED                                                            [ 30%]
tests/xlm/test_modeling_tf_xlm.py::TFXLMModelTest::test_inputs_embeds <- tests/test_modeling_tf_common.py PASSED                                                             [ 33%]
tests/xlm/test_modeling_tf_xlm.py::TFXLMModelTest::test_keras_save_load <- tests/test_modeling_tf_common.py PASSED                                                           [ 36%]
tests/xlm/test_modeling_tf_xlm.py::TFXLMModelTest::test_keyword_and_dict_args <- tests/test_modeling_tf_common.py PASSED                                                     [ 38%]
tests/xlm/test_modeling_tf_xlm.py::TFXLMModelTest::test_lm_head_model_beam_search_generate_dict_outputs <- tests/test_modeling_tf_common.py PASSED                           [ 41%]
tests/xlm/test_modeling_tf_xlm.py::TFXLMModelTest::test_lm_head_model_no_beam_search_generate_dict_outputs <- tests/test_modeling_tf_common.py PASSED                        [ 44%]
tests/xlm/test_modeling_tf_xlm.py::TFXLMModelTest::test_lm_head_model_random_beam_search_generate <- tests/test_modeling_tf_common.py PASSED                                 [ 47%]
tests/xlm/test_modeling_tf_xlm.py::TFXLMModelTest::test_lm_head_model_random_no_beam_search_generate <- tests/test_modeling_tf_common.py PASSED                              [ 50%]
tests/xlm/test_modeling_tf_xlm.py::TFXLMModelTest::test_load_with_mismatched_shapes <- tests/test_modeling_tf_common.py PASSED                                               [ 52%]
tests/xlm/test_modeling_tf_xlm.py::TFXLMModelTest::test_loss_computation <- tests/test_modeling_tf_common.py PASSED                                                          [ 55%]
tests/xlm/test_modeling_tf_xlm.py::TFXLMModelTest::test_model_common_attributes <- tests/test_modeling_tf_common.py PASSED                                                   [ 58%]
tests/xlm/test_modeling_tf_xlm.py::TFXLMModelTest::test_model_from_pretrained PASSED                                                                                         [ 61%]
tests/xlm/test_modeling_tf_xlm.py::TFXLMModelTest::test_model_main_input_name <- tests/test_modeling_tf_common.py PASSED                                                     [ 63%]
tests/xlm/test_modeling_tf_xlm.py::TFXLMModelTest::test_model_outputs_equivalence <- tests/test_modeling_tf_common.py PASSED                                                 [ 66%]
tests/xlm/test_modeling_tf_xlm.py::TFXLMModelTest::test_numpy_arrays_inputs <- tests/test_modeling_tf_common.py PASSED                                                       [ 69%]
tests/xlm/test_modeling_tf_xlm.py::TFXLMModelTest::test_onnx_compliancy <- tests/test_modeling_tf_common.py PASSED                                                           [ 72%]
tests/xlm/test_modeling_tf_xlm.py::TFXLMModelTest::test_onnx_runtime_optimize <- tests/test_modeling_tf_common.py PASSED                                                     [ 75%]
tests/xlm/test_modeling_tf_xlm.py::TFXLMModelTest::test_pt_tf_model_equivalence <- tests/test_modeling_tf_common.py SKIPPED (test is PT+TF test)                             [ 77%]
tests/xlm/test_modeling_tf_xlm.py::TFXLMModelTest::test_resize_token_embeddings <- tests/test_modeling_tf_common.py PASSED                                                   [ 80%]
tests/xlm/test_modeling_tf_xlm.py::TFXLMModelTest::test_save_load <- tests/test_modeling_tf_common.py PASSED                                                                 [ 83%]
tests/xlm/test_modeling_tf_xlm.py::TFXLMModelTest::test_save_load_config <- tests/test_modeling_tf_common.py PASSED                                                          [ 86%]
tests/xlm/test_modeling_tf_xlm.py::TFXLMModelTest::test_xlm_lm_head PASSED                                                                                                   [ 88%]
tests/xlm/test_modeling_tf_xlm.py::TFXLMModelTest::test_xlm_model PASSED                                                                                                     [ 91%]
tests/xlm/test_modeling_tf_xlm.py::TFXLMModelTest::test_xlm_qa PASSED                                                                                                        [ 94%]
tests/xlm/test_modeling_tf_xlm.py::TFXLMModelTest::test_xlm_sequence_classif PASSED                                                                                          [ 97%]
tests/xlm/test_modeling_tf_xlm.py::TFXLMModelLanguageGenerationTest::test_lm_generate_xlm_mlm_en_2048 PASSED                                                                 [100%]
```

Perfect, thanks! Will merge as soon as CI gets to green