Fix IndexError Bug in XLMRoberta/Camembert ForMultipleChoice by restoring the pooler
Author: pariidanDKE
Pull request: yes

<!-- ci-dashboard-badge:start -->
[![CI](https://transformers-ci.lor-e.huggingface.cool/badge/pr?pr=47147)](https://transformers-ci.lor-e.huggingface.cool/d/pytest-observability-by-pr/pytest-observability-branch?var-pr=47147)
<!-- ci-dashboard-badge:end -->

# What does this PR do?

`XLMRobertaForMultipleChoice` and `CamembertForMultipleChoice` crash on any forward pass with
`IndexError: tuple index out of range`.

Minimal repro:
```python
import torch
from transformers import AutoModelForMultipleChoice
m = AutoModelForMultipleChoice.from_pretrained("FacebookAI/xlm-roberta-base")
ids = torch.zeros(1, 2, 8, dtype=torch.long)              # (batch, num_choices, seq_len)
m(input_ids=ids, attention_mask=torch.ones_like(ids))     # -> IndexError before this fix
````

This is because both heads build their backbone **without** a pooler:

```python
# modular_xlm_roberta.py  (XLMRobertaForMultipleChoice.__init__)
self.roberta = XLMRobertaModel(config, add_pooling_layer=False)
```

while the forward assumes the pooler is present:

```python
#  XLMRobertaForMultipleChoice.forward()
pooled_output = outputs[1]
```

With `add_pooling_layer=False`, the base model returns only `last_hidden_state`, so `outputs` has a single element and `outputs[1]` is out of range.

## Fix


```python
self.roberta = XLMRobertaModel(config, add_pooling_layer=True)
```


Files:

- `src/transformers/models/xlm_roberta/modular_xlm_roberta.py` (+ generated `modeling_xlm_roberta.py`)
- `src/transformers/models/camembert/modular_camembert.py` (+ generated `modeling_camembert.py`)


## Code Agent Policy

- [x] I confirm that this is not a pure code agent PR.

**Ai Usage:** The diagnosis (and spotting that `CamembertForMultipleChoice` shares the bug) was done with AI assistance; the one-line fix I've reviewed and verified myself.

## 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://huggingface.co/docs/transformers/contributing) and the
      [Pull Request](https://huggingface.co/docs/transformers/pr_checks) checks?
- [ ] 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.
- [ ] Did you make sure to update the documentation with your changes according to the [guidelines](https://github.com/huggingface/transformers/tree/main/docs)?
- [ ] Did you write any new necessary [tests](https://huggingface.co/docs/transformers/testing)?




Comments:
**[For maintainers]** Suggested jobs to run (before merge)

run-slow: camembert, xlm_roberta

<!-- ci-dashboard-recap:start -->

---

### CI recap

**Dashboard:** [View test results in Grafana](https://transformers-ci.lor-e.huggingface.cool/d/pytest-observability-by-pr/pytest-observability-branch?var-pr=47147)
**Latest run:** [28891805770](https://github.com/huggingface/transformers/actions/runs/28891805770)
**Result:** `success` | Grafana metrics are not available yet.

<!-- ci-dashboard-recap:end -->