8000 Fix broken example generation script for Llama3 by sarckk · Pull Request #38062 · huggingface/transformers · GitHub
[go: up one dir, main page]

Skip to content

Fix broken example generation script for Llama3 #38062

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

Merged
merged 1 commit into from
May 20, 2025

Conversation

sarckk
Copy link
Contributor
@sarckk sarckk commented May 10, 2025

What does this PR do?

Running this script with Llama3 fails with error:

...
--> 316     return _sentencepiece.SentencePieceProcessor_LoadFromFile(self, arg)
TypeError: not a string

As mentioned in #30607 this is because Llama3 tokenizer is not based on sentencepiece. The fix is to use AutoTokenizer which will use PreTrainedTokenizerFast for Llama3.

@github-actions github-actions bot marked this pull request as draft May 10, 2025 18:49
Copy link
Contributor

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.

@sarckk sarckk marked this pull request as ready for review May 10, 2025 18:50
@Rocketknight1
Copy link
Member

LGTM but cc @itazap for tokenizers

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

@itazap
Copy link
Collaborator
itazap commented May 13, 2025

yep agreed! Looks good and matches conclusion in #30607

@sarckk
Copy link
Contributor Author
sarckk commented May 14, 2025

@Rocketknight1 hi any blockers for merging this PR?

@sarckk
Copy link
Contributor Author
sarckk commented May 20, 2025

cc @ArthurZucker

Copy link
Collaborator
@ArthurZucker ArthurZucker left a comment

Choose a reason for hiding this comment

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

Yes thanks!

@ArthurZucker ArthurZucker merged commit 555715f into huggingface:main May 20, 2025
14 checks passed
@sarckk sarckk deleted the fix-generation-example branch May 20, 2025 16:39
faaany pushed a commit to faaany/transformers that referenced this pull request May 21, 2025
Fix broken example generation script for llama3
xvyv99 pushed a commit to xvyv99/transformers that referenced this pull request May 21, 2025
Fix broken example generation script for llama3
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.

5 participants
0