add MobileViT model
Author: hollance
Pull request: yes
Labels: name: New model

# What does this PR do?

Add the MobileViT model to Transformers. This is a computer vision model that combines CNNs with transformers: https://machinelearning.apple.com/research/vision-transformer

The model comes in three sizes: small, extra small, and xx-small. There are two heads: image classification and semantic segmentation. Object detection will be added later.

## 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. (Internal discussion on Slack.)
- [x] 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).
- [x] Did you write any new necessary tests?


## Who can review?

Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.

<!-- 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:
_The documentation is not available anymore as the PR was closed or merged._

What is holding on the merge here? It's been a month and a half so let's try to merge this soon :-)

I can't seem to be able to run the tests again? (It's not failing on my code.)

You will probably need to rebase on main to get to 0 failures.

It's a random failure of the tests (reported and is being fixed). I don't mind doing a rebase but I thought there was a way to trigger the tests to run again.

No the failures you are seeing are all due to the PyTorch 1.12 release and a model that was moved. All the fixes for that are in main but not in this PR, so re-running the tests won't help make them green.

But those are all unrelated to the model addition, so I think we can merge this, no?

Merging this is fine with me (I don't have write access). :-)