RuntimeError when using Label smoother
### System Info

- `transformers` version: 4.23.1
- Platform: Linux-5.4.0-124-generic-x86_64-with-glibc2.31
- Python version: 3.9.5
- Huggingface_hub version: 0.10.0
- PyTorch version (GPU?): 1.12.1+cu116 (True)
- Tensorflow version (GPU?): not installed (NA)
- Flax version (CPU?/GPU?/TPU?): not installed (NA)
- Jax version: not installed
- JaxLib version: not installed
- Using GPU in script?: No
- Using distributed or parallel set-up in script?: No

### Who can help?

@sgugger

### Information

- [ ] The official example scripts
- [ ] 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

Initially, I encountered 
```
  File "/root/searcher-ranker/.venv/lib/python3.9/site-packages/transformers/trainer_pt_utils.py", line 481, in __call__
    nll_loss = log_probs.gather(dim=-1, index=labels)
RuntimeError: index 1 is out of bounds for dimension 1 with size 1
```
when setting label_smoothing_factor for TrainingArguments, however I managed to simplify reproduction to just calling LabelSmoother instance. 

Minimal example can be seen here (be aware that the data provided there is pre-tokenized using the same tokenizer as the model):
https://colab.research.google.com/drive/1GYI4rV7br7RCXlIO1xjkdk8HSzHxbhma?usp=sharing

### Expected behavior

I guess there should be no problem doing label smoothing as this is just trivial binary classification task.
However, I do have a feeling that I might be doing something wrong, although I seem to have double-checked everything.

Thanks!
Label smoothing is not for regression tasks, but when you have several labels.<|||||>@sgugger thanks for answering! 
My bad, I spotted my error. I am doing not regression, but binary classification, so I had to provide `num_labels=2` instead of 1.