Skip to content

Update torch minimum version to 2.4#41307

Merged
Rocketknight1 merged 17 commits intohuggingface:mainfrom
cyyever:pt_23
Feb 4, 2026
Merged

Update torch minimum version to 2.4#41307
Rocketknight1 merged 17 commits intohuggingface:mainfrom
cyyever:pt_23

Conversation

@cyyever
Copy link
Contributor

@cyyever cyyever commented Oct 3, 2025

What does this PR do?

PyTorch 2.10 has been released. Looking forward to lift the PT minimum version again.

@Rocketknight1
Copy link
Member

I'm not sure we automatically bump the Torch version with new releases like we do with Python! cc @ydshieh @Cyrilvallez, is that a policy?

@Cyrilvallez
Copy link
Member

Humm no indeed, we don't have something like "we support last 5 versions". Bumps are usually not correlated with a new version, but for other internal technical reasons

@ydshieh
Copy link
Collaborator

ydshieh commented Oct 17, 2025

There is a (not-written) convention about : if a torch version is released 2 years ago, we will drop it.

@ydshieh
Copy link
Collaborator

ydshieh commented Oct 17, 2025

But torch 2.2 is out Jan 30, 2024, not yet fully 2 years old.

@cyyever
Copy link
Contributor Author

cyyever commented Oct 17, 2025

The PyTorch release time is not quite regular. I recall that 2.8.0 had taken half a year. IMO a two year policy is good..

@matthewdouglas
Copy link
Member

@cyyever PyTorch does a release approximately every quarter now.

Given #41960 this may make sense even though 2.2 isn't at two years yet. There's overlap on this with #42135.

@Rocketknight1 wdyt?

@ydshieh
Copy link
Collaborator

ydshieh commented Nov 20, 2025

OK for me

@Cyrilvallez
Copy link
Member

Actually, there are other instances of that functions without protection. They should use our internal is_tracing instead for security, I'm gonna update them.
We can still bump torch though, I don't mind

@Rocketknight1
Copy link
Member

cc @cyyever this got lost (my bad), and now it's time to bump to 2.4 instead of 2.3! Would you be okay with updating the version number here and then I can approve and merge it? If not I can make a separate PR

@cyyever cyyever changed the title Update torch minimum version to 2.3 Update torch minimum version to 2.4 Jan 27, 2026
Signed-off-by: Yuanyuan Chen <cyyever@outlook.com>
Signed-off-by: cyy <cyyever@outlook.com>
Signed-off-by: cyy <cyyever@outlook.com>
@cyyever
Copy link
Contributor Author

cyyever commented Jan 27, 2026

@Rocketknight1 More updates

@Rocketknight1
Copy link
Member

Okay, now we just need to fix our own CI 😅

@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

Copy link
Member

@Rocketknight1 Rocketknight1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CI is passing now, and thanks for the comprehensive cleanup of version checks that we don't need anymore!

@Rocketknight1
Copy link
Member

well okay one test is failing, hold on 🫠

@cyyever
Copy link
Contributor Author

cyyever commented Feb 4, 2026

@Rocketknight1 It is green

@Rocketknight1
Copy link
Member

@cyyever there was another merge conflict today - if I can get it green again after that I'll merge!

@github-actions
Copy link
Contributor

github-actions bot commented Feb 4, 2026

[For maintainers] Suggested jobs to run (before merge)

run-slow: albert, bert, clvp, deepseek_v3, depth_anything, diffllama, esm, falcon, gpt_neo, gptj, kyutai_speech_to_text, mimi, moshi, nemotron

@Rocketknight1 Rocketknight1 merged commit a276a76 into huggingface:main Feb 4, 2026
25 checks passed
@cyyever cyyever deleted the pt_23 branch February 5, 2026 00:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants