TF: clearer model variable naming
Author: gante
Pull request: no
Labels: name: Good First Issue

### This issue is part of our **Great Code Cleanup 2022**. If you're interested in helping out, take a look at [this thread](https://twitter.com/carrigmat/status/1502319813510766599), or come [join us on Discord](https://t.co/kS42XBvpWH) and talk with other contributors!

As introduced in https://github.com/huggingface/transformers/issues/15908 and implemented in https://github.com/huggingface/transformers/pull/15907, we now have a new `@unpack_inputs` decorator to unpack TensorFlow model `call()` arguments. In essence, if we apply the decorator, we can replace `inputs["foo"]` with `foo`, making the code for the layer/model much shorter and clearer.

This issue is a call for contributors, to implement the new decorator in the architectures below. If you wish to contribute, reply in this thread which architectures you'd like to take :)

### Guide to contributing:
1. Ensure you've read our contributing [guidelines](https://github.com/huggingface/transformers/blob/master/CONTRIBUTING.md) 📜 
2. Claim your architecture(s) in this thread (confirm no one is working on it) 🎯 
3. Implement the changes as in https://github.com/huggingface/transformers/pull/15907 (see the diff on the model architectures for a few examples) 💪 
    - The file you want to look at is in `src/transformers/models/[model_name]/modeling_tf_[model_name].py`
    - In functions that have an `input_processing` call, remove it and add the `@unpack_inputs` decorator
    - Replace any use of the `inputs` variable in those functions (e.g. `inputs["foo"]` -> `foo`)
5. Test your changes on the architecture with `RUN_SLOW=1 py.test -vv tests/[model_name]/test_modeling_tf_[model_name].py` 💻 
6. Open the PR and tag me in it (don't forget to run `make fixup` before your final commit) 🎊 
    - Note that some code is copied across our codebase. If you see a line like `# Copied from transformers.models.bert...`, this means that the code is copied from that source, and our scripts will automatically keep that in sync. If you see that, you should not edit the copied method! Instead, edit the original method it's copied from, and run make fixup to synchronize that across all the copies. Be sure you installed the development dependencies with `pip install -e ".[dev]"`, as described in the contributor guidelines above, to ensure that the code quality tools in `make fixup` can run.

### Models updated:
- [x] (the templates)
- [x] albert
- [x] auto
- [x] bart
- [x] bert
- [x] blenderbot
- [x] blenderbot_small
- [x] camembert
- [x] clip
- [x] convbert
- [x] convnext
- [x] ctrl
- [x] deberta
- [x] deberta_v2
- [x] distilbert
- [x] dpr
- [x] electra
- [x] encoder_decoder
- [x] flaubert
- [x] funnel
- [x] gpt2
- [x] hubert
- [x] layoutlm
- [x] led
- [x] longformer
- [x] lxmert
- [x] marian
- [x] mbart
- [x] mobilebert
- [x] mpnet
- [x] mt5
- [x] openai
- [x] pegasus
- [x] rag
- [x] rembert
- [x] roberta
- [x] roformer
- [x] speech_to_text
- [x] t5
- [x] tapas
- [x] transfo_xl
- [x] vision_encoder_decoder
- [x] vit
- [x] wave2vec2 👉  lgnore this one for now, looking into the issue @infinite-Joy raised
- [x] xlm
- [x] xlm_roberta
- [x] xlnet

Comments:
My favorite sport is deleting code :mechanical_arm: 

I would be interested in taking `bart` :rocket: 

Hi..would love to work on `encoder_decoder`

I'd like to work on gpt2!

I'll take longformer! 

I can take CLIP and OpenAI. 

Hi,
I would like to work on vision_encoder_decoder & distilbert

I'll take `mobilebert `and `layoutlm`

I'll take `mbart` and `t5`

I'll work on `vit`

I'll work on `albert`

electra, tapas, deberta v1 and v2, pegasus, xlnet

@Abdelrhman-Hosny The user doing the `t5` type annotations for TF said they're going to do the decorator too! I see you closed that PR already, but don't worry, it's being handled!

I have just made PR for `mpnet`, `rag`, `roformer`

I'll do `convnext`.

Also I found that the `hubert` and `camembert` (which inherits from roberta) models do not seem to have any `input_processing` call, so probably those can be marked as done

I can also do `led` and `lxmert`.

I would like to work on xlm_roberta

working on wave2vec2

I would like to work on `xlm`.

As @infinite-Joy noticed on discord, `wave2vec2` possibly needs a decorator update. I will be looking into it (and locking it out of this series of changes, for now) 🙏 

created PR for `transfo_xl` #16166 

Seems like xlm_roberta doesn't need modifications, I will work flaubert instead

If mt5 is up for grabs, I am in !

working on funnel

working on blenderbot

 working on blenderbot_small

I'll do `marian` next

I'll work on convbert.

`auto` does not seem to have any `input_processing` methods. I'll take `ctrl` and don't know if any models after that are left (I could not find any)

Created PR for `XLM` https://github.com/huggingface/transformers/pull/16247

@robotjellyzone are you still intending to do DistilBERT? If not, i'd like to take that one, please.

> @robotjellyzone are you still intending to do DistilBERT? If not, i'd like to take that one, please.

Hi @jmwoloso , actually I am done with the modifications in the distilbert but got busy in my job. Tomorrow will going to push the changes.
But one thing, if you need something then you can take that vision_encoder_decoder model that one I have not touched yet 

Hi @gante  I don't seem to see any `inputs` methods in the `encoder_decoder` model can you pls help me in detecting where it needs changing? 

Hi @bhavika  since you already worked on two models if you don't mind please I'd like to submit PR for `lxmert` 

@silvererudite it is possible that it doesn't have the function, I listed all TF models :) 


> Hi @bhavika since you already worked on two models if you don't mind please I'd like to submit PR for `lxmert`

Go ahead @silvererudite 

> @silvererudite it is possible that it doesn't have the function, I listed all TF models :)

@gante I checked and there does not seem to be any `inputs` function in the model file, seems identical...I think `encoder_decoder` can be marked done then

Everyone, thank you so much for contributing to this issue 🧡  Together, we deleted >4000 lines of code, making the TF codebase more readable and easier to maintain 💪 

Tomorrow I will be updating any remaining architecture and closing this issue -- I'm assuming that claimed architectures will not be worked on this week. If you've claimed an architecture and are still interested in working on it, please let me know :)

Finally, if you've enjoyed this experience, there are other similar initiatives going on! Check issues with the `Good First Issue` (like [this one](https://github.com/huggingface/transformers/issues/16292)), or venture out in the harder `Good Second Issue`-labeled issues 🚀