Allow token regression in ForTokenClassification models
# 🚀 Feature request

Current `ForTokenClassification` class implementation for all models does not support regression. I propose to adapt the current implementation for all the `ForTokenClassification` models in order to enable out-of-the-box token regression when `num_labels == 1`, similarly to what is currently available in the `ForSentenceClassification` models.

Concretely, this would mean converting this (taken from `AlbertForTokenRegression` as an example, line 873 in `modeling_albert.py`):

```python
if labels is not None:
    loss_fct = CrossEntropyLoss()
    # Only keep active parts of the loss
    if attention_mask is not None:
        active_loss = attention_mask.view(-1) == 1
        active_logits = logits.view(-1, self.num_labels)[active_loss]
        active_labels = labels.view(-1)[active_loss]
        loss = loss_fct(active_logits, active_labels)
    else:
        loss = loss_fct(logits.view(-1, self.num_labels), labels.view(-1))
    outputs = (loss,) + outputs
return outputs  # (loss), logits, (hidden_states), (attentions)
```

into something like this:

```python
if labels is not None:
    if self.num_labels == 1:
        # We are doing regression
        loss_fct = MSELoss()
        logits_view = logits.view(-1)
    else:
        # We are doing classification
        loss_fct = CrossEntropyLoss()
        logits_view = logits.view(-1, self.num_labels)
    # Only keep active parts of the loss
    if attention_mask is not None:
        active_loss = attention_mask.view(-1) == 1
        active_logits = logits_view[active_loss]
	active_labels = labels.view(-1)[active_loss]
	loss = loss_fct(active_logits, active_labels)
    else:
	loss = loss_fct(logits_view, labels.view(-1))
    outputs = (loss,) + outputs

return outputs  # (loss), logits, (hidden_states), (attentions)
```

## Motivation

I am currently working with token-level regression using multiple transformer models to predict eye-tracking metrics that are commonly considered as proxies for cognitive processing in psycholinguistics (e.g. word reading times, fixation counts, etc.). Given that most of those are continuous metrics, the ability to use `transformers` for token regression would make my work much faster. Moreover, I believe that this functionality can benefit other researchers working with token-level continuous metrics.

## Your contribution

If this feature is regarded as interesting by maintainers, I can submit a PR with the suggested changes applied to all currently supported models.

I think that's a reasonable feature – Thoughts @LysandreJik @thomwolf?<|||||>This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
