Skip to content

Fix crash of custom models in Notebook or Repl#43690

Merged
Cyrilvallez merged 3 commits intomainfrom
fix-custom-models-in-repl
Feb 3, 2026
Merged

Fix crash of custom models in Notebook or Repl#43690
Cyrilvallez merged 3 commits intomainfrom
fix-custom-models-in-repl

Conversation

@Cyrilvallez
Copy link
Member

What does this PR do?

Fix #43645. It's quite unusual, but no reason it should crash in general

@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
Contributor

@vasqu vasqu left a comment

Choose a reason for hiding this comment

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

Should we add a small warning? It might be confusing for users when they use set_xx then

@Cyrilvallez
Copy link
Member Author

Due to current implem, the warning would be shown all the time, even when the model is not even a MoE, so I think it would be even more confusing tbh...

@Cyrilvallez Cyrilvallez merged commit 432ddfa into main Feb 3, 2026
26 checks passed
@Cyrilvallez Cyrilvallez deleted the fix-custom-models-in-repl branch February 3, 2026 13:20
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.

Transformers 5.0.0 breaks defining and then initializing custom models in Jupyter notebooks

3 participants