bump Torch 2.1 with broken compatibility `torch.compile`
Author: Borda
Pull request: yes

# What does this PR do?

This PR updates the minimum required version of Torch to 2.1 due to an issue with `torch.compile` in 2.0. The problem was identified through Dependabot in [#3027](https://github.com/Lightning-AI/torchmetrics/pull/3027), where all versions passed except for 2.0.

Fixes #37238

Issue Details

When running tests with Torch 2.0, we encountered the following error:
```py
@torch.compiler.disable(recursive=False)
AttributeError: module 'torch' has no attribute 'compiler'
```

This happens because `torch.compiler` does not exist in 2.0, causing failures in dependencies like transformers.

**Changes**
- Set the minimum Torch version to 2.1 to ensure compatibility with `torch.compile`.
- Updated relevant dependencies accordingly.

**Impact**
- This update ensures that `torch.compile` is available and avoids compatibility issues.
- Users running Torch 2.0 will need to upgrade to 2.1 or higher.


## Before submitting
- [ ] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
- [ ] Did you read the [contributor guideline](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md#create-a-pull-request),
      Pull Request section?
- [ ] Was this discussed/approved via a Github issue or the [forum](https://discuss.huggingface.co/)? Please add a link
      to it if that's the case.
- [x] Did you make sure to update the documentation with your changes? Here are the
      [documentation guidelines](https://github.com/huggingface/transformers/tree/main/docs), and [here are tips on formatting docstrings](https://github.com/huggingface/transformers/tree/main/docs#writing-source-documentation).
- [ ] Did you write any new necessary tests?


## Who can review?

Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.

well, this is eventually affecting multiple domains...

Models:

- text models: @ArthurZucker
- vision models: @amyeroberts, @qubvel
- speech models: @eustlb
- graph models: @clefourrier


Comments:
Hi 👋, thank you for opening this pull request! The pull request is converted to draft by default. The CI will be paused while the PR is in draft mode. When it is ready for review, please click the `Ready for review` button (at the bottom of the PR page). This will assign reviewers and trigger CI.

I'm okay with bumping the dependency - `2.0` is quite old by now. cc core maintainers @arthurzucker @cyrilvallez 

It's fine by me, but cc @ArthurZucker for final decision about that

also reported in https://github.com/huggingface/transformers/issues/37238

it's in my plan to drop the support of torch 2.0: internally, we drop the support of a torch major version that is released more than 2 years ago, and torch 2.0 is released in March 15 2023.

There are more stuffs to do instead of just changing the `setup.py` file. If you are ok, I will push changes to this PR's branch tomorrow.

Looks like I am not able to push the branch. I will open another PR for this. #37277

Hi @Borda I'm closing this PR and we will go with #37277. 

But thank you a lot for this work!

when will this be released?

Hi @Borda We have a general release v4.51.0 last week. The next general release would be around the beginning of May.