fix to ensure that returned tensors after the tokenization is Long
<!-- This line specifies which issue to close after the pull request is merged. -->
Fixes #7026 

# [Codecov](https://codecov.io/gh/huggingface/transformers/pull/7039?src=pr&el=h1) Report
> Merging [#7039](https://codecov.io/gh/huggingface/transformers/pull/7039?src=pr&el=desc) into [master](https://codecov.io/gh/huggingface/transformers/commit/762cba3bdaf70104dc17cc7ff0f8ce13ba23d558?el=desc) will **not change** coverage.
> The diff coverage is `0.00%`.

[![Impacted file tree graph](https://codecov.io/gh/huggingface/transformers/pull/7039/graphs/tree.svg?width=650&height=150&src=pr&token=9qOlN6Hb1c)](https://codecov.io/gh/huggingface/transformers/pull/7039?src=pr&el=tree)

```diff
@@           Coverage Diff           @@
##           master    #7039   +/-   ##
=======================================
  Coverage   79.13%   79.13%           
=======================================
  Files         164      164           
  Lines       31143    31143           
=======================================
  Hits        24646    24646           
  Misses       6497     6497           
```


| [Impacted Files](https://codecov.io/gh/huggingface/transformers/pull/7039?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [src/transformers/data/data\_collator.py](https://codecov.io/gh/huggingface/transformers/pull/7039/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9kYXRhL2RhdGFfY29sbGF0b3IucHk=) | `93.18% <0.00%> (+0.35%)` | :arrow_up: |
| [src/transformers/file\_utils.py](https://codecov.io/gh/huggingface/transformers/pull/7039/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9maWxlX3V0aWxzLnB5) | `82.41% <0.00%> (-0.26%)` | :arrow_down: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/huggingface/transformers/pull/7039?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/huggingface/transformers/pull/7039?src=pr&el=footer). Last update [762cba3...db8ea89](https://codecov.io/gh/huggingface/transformers/pull/7039?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
<|||||>Wouldn't it be better to do `torch.tensor(e, dtype=torch.long)` when creating the tensor, instead of casting the batch once the tensors are created?<|||||>@LysandreJik, made the suggested changes. :+1: <|||||>Thanks for the fix!