Incorrect model_type for ViTHybridModel
Author: jbdel
Pull request: no
Labels: name: bug

name: Vision

### System Info

transformers==4.39.1

### Who can help?

@amyeroberts

### Information

- [ ] The official example scripts
- [X] My own modified scripts

### Tasks

- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)
- [ ] My own task or dataset (give details below)

### Reproduction

```
from transformers import VisionEncoderDecoderModel, BertConfig, BertGenerationDecoder, ViTHybridConfig, \
    ViTHybridModel

decoder = BertGenerationDecoder(BertConfig())
encoder = ViTHybridModel(ViTHybridConfig())
model = VisionEncoderDecoderModel(encoder=encoder, decoder=decoder)
```

Yields

```
Traceback (most recent call last):
  File "/home/jb/Documents/vilmedic/x.py", line 6, in <module>
    model = VisionEncoderDecoderModel(encoder=encoder, decoder=decoder)
  File "/home/jb/miniconda3/envs/vilmedic/lib/python3.8/site-packages/transformers/models/vision_encoder_decoder/modeling_vision_encoder_decoder.py", line 173, in __init__
    config = VisionEncoderDecoderConfig.from_encoder_decoder_configs(encoder.config, decoder.config)
  File "/home/jb/miniconda3/envs/vilmedic/lib/python3.8/site-packages/transformers/models/vision_encoder_decoder/configuration_vision_encoder_decoder.py", line 115, in from_encoder_decoder_configs
    return cls(encoder=encoder_config.to_dict(), decoder=decoder_config.to_dict(), **kwargs)
  File "/home/jb/miniconda3/envs/vilmedic/lib/python3.8/site-packages/transformers/models/vision_encoder_decoder/configuration_vision_encoder_decoder.py", line 96, in __init__
    self.encoder = AutoConfig.for_model(encoder_model_type, **encoder_config)
  File "/home/jb/miniconda3/envs/vilmedic/lib/python3.8/site-packages/transformers/models/auto/configuration_auto.py", line 1033, in for_model
    raise ValueError(
ValueError: Unrecognized model identifier: vit-hybrid. Should contain one of albert, align, [..]
Process finished with exit code 1
```

Problem:
https://github.com/huggingface/transformers/blob/v4.39.1/src/transformers/models/vit_hybrid/configuration_vit_hybrid.py#L102
is `model_type = "vit-hybrid"`
When all the mappings are:
```
[..]
("vit", "ViTConfig"),
("vit_hybrid", "ViTHybridConfig"),
("vit_mae", "ViTMAEConfig"),
[..]
```

Hence, model_type should be `vit_hybrid`

JB

### Expected behavior

Correct init of VisionEncoderDecoderModel

Comments:
If nobody's working on this, I can take this up as my first issue?

@kshitij98 Sure! 

We prioritize based on PRs open, rather than comments on issues. If there's an issue without an open and active PR open, you're free to start work on it :) We find this prevents issues from becoming stale. 

Thanks @amyeroberts, I've attached a PR above with the changes required.

While this is only a one-line change, this will help me setup the dev workflow for future tasks.

Can you take a look? Thanks!

This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

Please note that issues that do not follow the [contributing guidelines](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md) are likely to be ignored.