Removed input_processing and added decorator to lxmert
Author: silvererudite
Pull request: yes

# What does this PR do?

This PR changes the unpacking of the inputs of TF `lxmert` model to use the decorator instead.

See https://github.com/huggingface/transformers/issues/16051


## 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/main/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/)? Please add a link
      to it if that's the case.
- [ ] Did you make sure to update the documentation with your changes? Here are the
      [documentation guidelines](https://github.com/huggingface/transformers/tree/main/docs), and
      [here are tips on formatting docstrings](https://github.com/huggingface/transformers/tree/main/docs#writing-source-documentation).
- [ ] Did you write any new necessary tests?


## Who can review?
@gante @Rocketknight1 

Comments:
All tests pass locally after running `RUN_SLOW=1 py.test -vv tests/[model_name]/test_modeling_tf_[model_name].py`....Output of running tests 
```
tests/lxmert/test_modeling_tf_lxmert.py::TFLxmertModelTest::test_attention_outputs PASSED                                                                                                                                             [  2%]
tests/lxmert/test_modeling_tf_lxmert.py::TFLxmertModelTest::test_compile_tf_model PASSED                                                                                                                                              [  5%]
tests/lxmert/test_modeling_tf_lxmert.py::TFLxmertModelTest::test_config PASSED                                                                                                                                                        [  8%]
tests/lxmert/test_modeling_tf_lxmert.py::TFLxmertModelTest::test_determinism <- tests\test_modeling_tf_common.py PASSED                                                                                                               [ 11%]
tests/lxmert/test_modeling_tf_lxmert.py::TFLxmertModelTest::test_forward_signature <- tests\test_modeling_tf_common.py PASSED                                                                                                         [ 14%]
tests/lxmert/test_modeling_tf_lxmert.py::TFLxmertModelTest::test_generate_with_headmasking <- tests\test_modeling_tf_common.py PASSED                                                                                                 [ 17%]
                               [ 61%]                                                                                                                                                                                                 [ 20%] 
tests/lxmert/test_modeling_tf_lxmert.py::TFLxmertModelTest::test_model_from_pretrained SKIPPED (test is slow)                                                                                                                         [ 23%] 
                               [ 64%]                                                                                                                                                                                                 [ 26%] 
tests/lxmert/test_modeling_tf_lxmert.py::TFLxmertModelTest::test_model_main_input_name <- tests\test_modeling_tf_common.py PASSED                                                                                                     [ 29%] 
                               [ 67%]                                                                                                                                                                                                 [ 32%] 
tests/lxmert/test_modeling_tf_lxmert.py::TFLxmertModelTest::test_model_outputs_equivalence <- tests\test_modeling_tf_common.py PASSED                                                                                                 [ 35%] 
                               [ 70%]                                                                                                                                                                                                 [ 38%] 
tests/lxmert/test_modeling_tf_lxmert.py::TFLxmertModelTest::test_numpy_arrays_inputs <- tests\test_modeling_tf_common.py PASSED                                                                                                       [ 41%] 
                               [ 73%]                                                                                                                                                                                                 [ 44%] 
tests/lxmert/test_modeling_tf_lxmert.py::TFLxmertModelTest::test_onnx_compliancy <- tests\test_modeling_tf_common.py PASSED                                                                                                           [ 47%] 
                               [ 76%]                                                                                                                                                                                                 [ 50%] 
tests/lxmert/test_modeling_tf_lxmert.py::TFLxmertModelTest::test_onnx_runtime_optimize <- tests\test_modeling_tf_common.py SKIPPED (test is slow)                                                                                     [ 52%] 
                               [ 79%]                                                                                                                                                                                                 [ 55%] 
tests/lxmert/test_modeling_tf_lxmert.py::TFLxmertModelTest::test_pt_tf_model_equivalence PASSED                                                                                                                                       [ 58%] 
                               [ 82%]                                                                                                                                                                                                 [ 61%] 
tests/lxmert/test_modeling_tf_lxmert.py::TFLxmertModelTest::test_resize_token_embeddings <- tests\test_modeling_tf_common.py PASSED                                                                                                   [ 64%] 
                               [ 85%]                                                                                                                                                                                                 [ 67%] 
tests/lxmert/test_modeling_tf_lxmert.py::TFLxmertModelTest::test_save_load PASSED                                                                                                                                                     [ 70%] 
                               [ 88%]                                                                                                                                                                                                 [ 73%] 
tests/lxmert/test_modeling_tf_lxmert.py::TFLxmertModelTest::test_save_load_config <- tests\test_modeling_tf_common.py PASSED                                                                                                          [ 76%] 
                               [ 91%]                                                                                                                                                                                                 [ 79%] 
tests/lxmert/test_modeling_tf_lxmert.py::TFLxmertModelTest::test_saved_model_creation PASSED                                                                                                                                          [ 82%] 
                               [ 94%]                                                                                                                                                                                                 [ 85%] 
tests/lxmert/test_modeling_tf_lxmert.py::TFLxmertModelTest::test_saved_model_creation_extended SKIPPED (test is slow)                                                                                                                 [ 88%] 
                               [ 97%]                                                                                                                                                                                                 [ 91%] 
tests/lxmert/test_modeling_tf_lxmert.py::TFLxmertModelIntegrationTest::test_inference_masked_lm SKIPPED (test is slow)                                                                                                                [ 94%] 
                               [100%]      
```

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

Hi @gante I added the decorator to the top...but after fetching and rebasing I'm not sure why so many files got changed...and some tests are failing...what shud I do?

> Hi @gante I added the decorator to the top...but after fetching and rebasing I'm not sure why so many files got changed...and some tests are failing...what shud I do?

Oh my god...I spotted the mistake..will push another commit to fix


Hello @gante I added the decorators to the top but I was mistakenly rebasing my branch instead of just pushing the changes. Even though I was finally able to realize my mistake and push the commit finally...the previous attempts made the PR quite messy as you can see with all the fetching/rebasing and I see that a CI test is failing...what should I do? If it helps to close this PR and open a fresh PR with a new branch I can do so as well...let me know

> Hello @gante I added the decorators to the top but I was mistakenly rebasing my branch instead of just pushing the changes. Even though I was finally able to realize my mistake and push the commit finally...the previous attempts made the PR quite messy as you can see with all the fetching/rebasing and I see that a CI test is failing...what should I do? If it helps to close this PR and open a fresh PR with a new branch I can do so as well...let me know

on ho 😱  haha yeah, it's probably easier to open a new PR and reapply the changes, since they are straightforward. The alternative is `git` magic, so it depends on how comfortable you are with `git` :)

> > Hello @gante I added the decorators to the top but I was mistakenly rebasing my branch instead of just pushing the changes. Even though I was finally able to realize my mistake and push the commit finally...the previous attempts made the PR quite messy as you can see with all the fetching/rebasing and I see that a CI test is failing...what should I do? If it helps to close this PR and open a fresh PR with a new branch I can do so as well...let me know
> 
> on ho 😱 haha yeah, it's probably easier to open a new PR and reapply the changes, since they are straightforward. The alternative is `git` magic, so it depends on how comfortable you are with `git` :)

Not really sure how to fix with `git` 😅..no worries I'll close this one and tag you in a fresh PR