Fix `XGLMModelLanguageGenerationTest.test_batched_nan_fp16`
# What does this PR do?

#18057 added this test to test running with fp16.

However, `from_pretrained(model_name, torch_dtype=torch.float16` seems **not able to change the dtype** for weights registered below:
https://github.com/huggingface/transformers/blob/a7bc4221c0c09857b30ac467e7de86d3f5a7c482/src/transformers/models/xglm/modeling_xglm.py#L168-L176
and `hidden_states` becomes again `float32` (because `position` is) at
https://github.com/huggingface/transformers/blob/a7bc4221c0c09857b30ac467e7de86d3f5a7c482/src/transformers/models/xglm/modeling_xglm.py#L715
and finally failed at `hidden_states = self.self_attn_layer_norm(hidden_states)` with
```bash
RuntimeError: expected scalar type Float but found Half
```

_The documentation is not available anymore as the PR was closed or merged._<|||||>@sgugger OK, let me check if I can do something for (not a real) weights defined by

```python
self.register_buffer("weights", emb_weights)

```