[BUG] AyaVisionConfig fails to tie lm_head weights causing garbage text generation
Author: harshaljanjani
Pull request: no
Labels: name: bug

### System Info

* `transformers` version: `5.0.0.dev0`
* Platform: `Linux-5.15.167.4-microsoft-standard-WSL2-x86_64-with-glibc2.39`
* Python version: `3.12.3`
* `huggingface_hub` version: `1.3.2`
* `safetensors` version: `0.7.0`
* `accelerate` version: `1.12.0`
* Accelerate config: `not installed`
* DeepSpeed version: `not installed`
* PyTorch version (accelerator?): `2.9.1+cu128 (CUDA)`
* GPU type: `NVIDIA L4`
* NVIDIA driver version: `550.90.07`
* CUDA version: `12.4`

### Who can help?

@Rocketknight1

### 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

```python
from transformers import AutoModelForImageTextToText, AutoConfig
import torch

config = AutoConfig.from_pretrained('CohereForAI/aya-vision-8b')
print(f"config.tie_word_embeddings: {getattr(config, 'tie_word_embeddings', 'NOT FOUND')}")
print(f"text_config.tie_word_embeddings: {config.text_config.tie_word_embeddings}")
model = AutoModelForImageTextToText.from_pretrained(
    'CohereForAI/aya-vision-8b',
    dtype=torch.bfloat16,
    device_map='cpu'
)
print(f"Are weights tied? {model.lm_head.weight is model.model.language_model.embed_tokens.weight}")
print(f"lm_head first 5 values: {model.lm_head.weight[0, :5]}")
print(f"embed_tokens first 5 values: {model.model.language_model.embed_tokens.weight[0, :5]}")
```

**Current Output:**

```
config.tie_word_embeddings: NOT FOUND
text_config.tie_word_embeddings: True
AyaVisionForConditionalGeneration LOAD REPORT from: CohereForAI/aya-vision-8b
Key            | Status  | 
---------------+---------+-
lm_head.weight | MISSING | 
Notes:
- MISSING: those params were newly initialized because missing from the checkpoint. Consider training on your downstream task.
Are weights tied? False
lm_head first 5 values: tensor([ 0.0172, -0.0304, -0.0094,  0.0109,  0.0464], dtype=torch.bfloat16, grad_fn=<SliceBackward0>)
embed_tokens first 5 values: tensor([ 0.0024,  0.0228, -0.0121,  0.0084, -0.0048], dtype=torch.bfloat16, grad_fn=<SliceBackward0>)
```

Fixing this issue should also resolve the latest `test_modeling_aya_vision.py` failures:
```
FAILED tests/models/aya_vision/test_modeling_aya_vision.py::AyaVisionIntegrationTest::test_small_model_integration_batched_generate_multi_image
AssertionError: ' rondaEraguan relação connotationsMinesentityId관광 retailer `[` Buñuel extreme Anadolu Oğ Bradfordender mayoritas Compiled clasific凝 sebagaimanaПлей برنده昏bersecurity'
!= 'Wooden path to water,\nMountains echo in stillness,\nPeaceful forest lake.'

FAILED tests/models/aya_vision/test_modeling_aya_vision.py::AyaVisionIntegrationTest::test_small_model_integration_forward
AssertionError: False is not true : Actual logits: tensor([ 3.5117, -7.4062, -0.1681, -1.7754, -0.6709], dtype=torch.float16)
Expected logits: tensor([1.6396, 0.6094, 3.1992, 8.5234, 2.1875], dtype=torch.float16)
Difference: tensor([ 1.8721,  8.0156,  3.3672, 10.2969,  2.8594], dtype=torch.float16)

FAILED tests/models/aya_vision/test_modeling_aya_vision.py::AyaVisionIntegrationTest::test_small_model_integration_generate_chat_template
AssertionError: ' Buffered 형태取景电影 Пей realizó argues χωρών전은 vigne insignلسلات ropa gây吾المراجع tı Прот制裁 몇몇 passionate'
!= 'The image depicts a cozy scene of two cats resting on a bright pink blanket. The cats,'

FAILED tests/models/aya_vision/test_modeling_aya_vision.py::AyaVisionIntegrationTest::test_small_model_integration_generate_text_only
AssertionError: ' pierwszy сто EI Ваг Judgeurllink Interestedजनवरżycz dắt chilling Bedfordshire Bedfordshire印第安 conval Convergence oyuncul אבי� variations Bedfordshirerhus Sorocaba海南 Relegated Bedfordshire'
!= "Whispers on the breeze,\nLeaves dance under moonlit skies,\nNature's quiet song."
```

### Expected behavior

```
config.tie_word_embeddings: True
text_config.tie_word_embeddings: True
Are weights tied? True
lm_head first 5 values: tensor([ 0.0024,  0.0228, -0.0121,  0.0084, -0.0048], dtype=torch.bfloat16, grad_fn=<SliceBackward0>)
# Same values
embed_tokens first 5 values: tensor([ 0.0024,  0.0228, -0.0121,  0.0084, -0.0048], dtype=torch.bfloat16, grad_fn=<SliceBackward0>)
```

Comments: