Can't load wangchanberta (Camembert model) for train text classification model
Author: wannaphong
Pull request: no

### System Info

- `transformers` version: 4.34.1
- Platform: Linux-5.15.120+-x86_64-with-glibc2.35
- Python version: 3.10.12
- Huggingface_hub version: 0.17.3
- Safetensors version: 0.4.0
- Accelerate version: 0.23.0
- Accelerate config: 	not found
- PyTorch version (GPU?): 2.1.0+cu118 (True)
- Tensorflow version (GPU?): 2.13.0 (True)
- Flax version (CPU?/GPU?/TPU?): 0.7.4 (gpu)
- Jax version: 0.4.16
- JaxLib version: 0.4.16
- Using GPU in script?: Yes
- Using distributed or parallel set-up in script?: No

### Who can help?

@gante @Rocketknight1  @ArthurZucker

### Information

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

### Tasks

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

### Reproduction

I fellow [https://huggingface.co/docs/transformers/tasks/sequence_classification](https://huggingface.co/docs/transformers/tasks/sequence_classification). I changed model and dataset for train text classification model with [airesearch/wangchanberta-base-att-spm-uncased](https://huggingface.co/airesearch/wangchanberta-base-att-spm-uncased). It can't train. It say

```
You're using a CamembertTokenizerFast tokenizer. Please note that with a fast tokenizer, using the `__call__` method is faster than using a method to encode the text followed by a call to the `pad` method to get a padded encoding.
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
[<ipython-input-18-3435b262f1ae>](https://localhost:8080/#) in <cell line: 1>()
----> 1 trainer.train()

3 frames
[/usr/local/lib/python3.10/dist-packages/transformers/trainer.py](https://localhost:8080/#) in compute_loss(self, model, inputs, return_outputs)
   2816         else:
   2817             if isinstance(outputs, dict) and "loss" not in outputs:
-> 2818                 raise ValueError(
   2819                     "The model did not return a loss from the inputs, only the following keys: "
   2820                     f"{','.join(outputs.keys())}. For reference, the inputs it received are {','.join(inputs.keys())}."

ValueError: The model did not return a loss from the inputs, only the following keys: logits. For reference, the inputs it received are input_ids,attention_mask.
```

Google colab: [https://colab.research.google.com/drive/1TthDy7Li1veLHAVpuSlpMkGLsK8JK2i3?usp=sharing](https://colab.research.google.com/drive/1TthDy7Li1veLHAVpuSlpMkGLsK8JK2i3?usp=sharing)

### Expected behavior

It should can train.

Comments:
Hi,

This is not a bug, you're not preparing any `labels` for the model (the dataset only consists of `input_ids` and `attention_mask`).

@NielsRogge I was fixed the notebook but It still has the error.

```
RuntimeError: CUDA error: device-side assert triggered
CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.
For debugging consider passing CUDA_LAUNCH_BLOCKING=1.
Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.
```

Colab: https://colab.research.google.com/drive/1TthDy7Li1veLHAVpuSlpMkGLsK8JK2i3?usp=sharing

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.