Batch mismatch in the given course example
### System Info

```shell
torch  1.11.0
cuda   0.13
transformers   4.20.1
linux box , ubuntu 20.04
```


### Who can help?

@LysandreJik 

### Information

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

### Tasks

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

### Reproduction

1. Go to The example provided. [Course fine-tune ](https://huggingface.co/course/chapter3/3?fw=pt)
2. Open a python file and dump all the cell provided as is. (no changes).  UP To the `trainer.train()`
3. error 

***** Running training *****
  Num examples = 3668
  Num Epochs = 3
  Instantaneous batch size per device = 8
  Total train batch size (w. parallel, distributed & accumulation) = 8
  Gradient Accumulation steps = 1
  Total optimization steps = 1377
  0%|          | 0/1377 [00:00<?, ?it/s]Traceback (most recent call last):
  File  "~/.conda/envs/hugg/lib/python3.7/site-packages/IPython/core/interactiveshell.py", line 3457, in run_code
    exec(code_obj, self.user_global_ns, self.user_ns)
  File  "<ipython-input-2-10d9618241c7>", line 55, in <module>
    trainer.train()
  File " ~/.conda/envs/hugg/lib/python3.7/site-packages/transformers/trainer.py", line 1413, in train
    ignore_keys_for_eval=ignore_keys_for_eval,
  File " ~/.conda/envs/hugg/lib/python3.7/site-packages/transformers/trainer.py", line 1651, in _inner_training_loop
    tr_loss_step = self.training_step(model, inputs)
  File "~/.conda/envs/hugg/lib/python3.7/site-packages/transformers/trainer.py", line 2345, in training_step
    loss = self.compute_loss(model, inputs)
  File "~/.conda/envs/hugg/lib/python3.7/site-packages/transformers/trainer.py", line 2377, in compute_loss
    outputs = model(**inputs)
  File "~/.conda/envs/hugg/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1110, in _call_impl
    return forward_call(*input, **kwargs)
  File "~/.conda/envs/hugg/lib/python3.7/site-packages/transformers/models/bert/modeling_bert.py", line 1775, in forward
    loss = loss_fct(logits.view(-1, self.num_labels), labels.view(-1))
  File "~/.conda/envs/hugg/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1110, in _call_impl
    return forward_call(*input, **kwargs)
  File "~/.conda/envs/hugg/lib/python3.7/site-packages/torch/nn/modules/loss.py", line 1165, in forward
    label_smoothing=self.label_smoothing)
  File "~/.conda/envs/hugg/lib/python3.7/site-packages/torch/nn/functional.py", line 2996, in cross_entropy
    return torch._C._nn.cross_entropy_loss(input, target, weight, _Reduction.get_enum(reduction), ignore_index, label_smoothing)
ValueError: Expected input batch_size (624) to match target batch_size (8).

### Expected behavior

```shell
Training the model. No errors.
```
### My comments
The local env matches that of colab in terms of package versions.  I used python3.7  as the provided colab has, and the machine has a 1 GPU (cuda 11.3). 
restarted jetbrains and it worked!  hmmmmm. 
can i delete this issue. 