Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use weights_only=True with torch.load for transfo_xl #35241

Merged
merged 1 commit into from
Dec 20, 2024
Merged

Conversation

ydshieh
Copy link
Collaborator

@ydshieh ydshieh commented Dec 12, 2024

What does this PR do?

Just to move forward with a huntr report. Use weights_only=True for torch.load in src/transformers/models/deprecated/transfo_xl/tokenization_transfo_xl.py.

Remark

Although TransfoXL is deprecated, I am trying to check if this PR breaks something by running

tokenizer = TransfoXLTokenizer.from_pretrained("transfo-xl-wt103")

but that is failing even on main. I don't do anything trying to fix it though.

@ydshieh ydshieh requested a review from LysandreJik December 12, 2024 15:47
@ydshieh ydshieh changed the title fix Use weights_only=True with torch.load for transfo_xl Dec 12, 2024
@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

@LysandreJik LysandreJik left a comment

Choose a reason for hiding this comment

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

Agreed!

@ydshieh ydshieh merged commit 0fc2970 into main Dec 20, 2024
11 checks passed
@ydshieh ydshieh deleted the fix_torch_load branch December 20, 2024 14:40
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.

3 participants