`type_vocab_size` is not documented and does not have a default value in TVP config
Author: simonreise
Pull request: no
Labels: name: bug

### System Info

transformers 4.57.3
python 3.13.9

### Who can help?

@zucchini-nlp @yonigozlan @molbap

### Information

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

### Tasks

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

### Reproduction

Simple example

```py
from transformers.image_utils import load_image
import transformers
import torch

url = "http://images.cocodataset.org/val2017/000000039769.jpg"
image = load_image(url)
image_processor = transformers.SegformerImageProcessor()
image = image_processor(image, return_tensors="pt")

backbone = transformers.ResNetConfig(
    out_features=["stage4"],
    image_size=512,
)
config = transformers.TvpConfig(
    backbone_config=backbone,
    backbone=None,
    use_timm_backbone=False,
    use_pretrained_backbone=False,
    max_img_size=512,
)
model = transformers.TvpModel(config)

model(**image)
```
throws an error
```
File [~\Documents\geo\.pixi\envs\default\Lib\site-packages\transformers\models\tvp\modeling_tvp.py:728](http://localhost:8888/lab/tree/rsp-test/~/Documents/geo/.pixi/envs/default/Lib/site-packages/transformers/models/tvp/modeling_tvp.py#line=727), in TvpModel.__init__(self, config)
    726 self.config = config
    727 self.vision_model = TvpVisionModel(config)
--> 728 self.embeddings = TvpTextInputEmbeddings(config)
    729 self.visual_embeddings = TvpVisualInputEmbedding(config)
    730 self.encoder = TvpEncoder(config)

File [~\Documents\geo\.pixi\envs\default\Lib\site-packages\transformers\models\tvp\modeling_tvp.py:297](http://localhost:8888/lab/tree/rsp-test/~/Documents/geo/.pixi/envs/default/Lib/site-packages/transformers/models/tvp/modeling_tvp.py#line=296), in TvpTextInputEmbeddings.__init__(self, config)
    295 self.word_embeddings = nn.Embedding(config.vocab_size, config.hidden_size, padding_idx=config.pad_token_id)
    296 self.position_embeddings = nn.Embedding(config.max_position_embeddings, config.hidden_size)
--> 297 self.token_type_embeddings = nn.Embedding(config.type_vocab_size, config.hidden_size)
    298 self.layer_norm = nn.LayerNorm(config.hidden_size, eps=config.layer_norm_eps)
    299 self.dropout = nn.Dropout(config.hidden_dropout_prob)

File [~\Documents\geo\.pixi\envs\default\Lib\site-packages\transformers\configuration_utils.py:207](http://localhost:8888/lab/tree/rsp-test/~/Documents/geo/.pixi/envs/default/Lib/site-packages/transformers/configuration_utils.py#line=206), in PretrainedConfig.__getattribute__(self, key)
    205 if key != "attribute_map" and key in super().__getattribute__("attribute_map"):
    206     key = super().__getattribute__("attribute_map")[key]
--> 207 return super().__getattribute__(key)

AttributeError: 'TvpConfig' object has no attribute 'type_vocab_size'
```
Adding `type_vocab_size=2` to model config solves the problem.

### Expected behavior

`type_vocab_size` does not have a default value and is not even mentioned in documentation.

Probably adding setting default value to 2 is optimal, because all the TVP models on Huggingface Hub have `type_vocab_size=2`.

Also it would be good to add it to docstring.

Comments: