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

Fix Llama 3.1 generation #1444

Merged
merged 2 commits into from
Oct 20, 2024
Merged

Fix Llama 3.1 generation #1444

merged 2 commits into from
Oct 20, 2024

Conversation

regisss
Copy link
Collaborator

@regisss regisss commented Oct 20, 2024

What does this PR do?

In the text-generation example, the pad token id is set to 0 by default for Llama models. This was introduced by a bad config for Decapoda-research models. However, this is not compatible with Llama 3.1 and newer.
Since the model from Decapoda-research is quite old now, this PR removes this and changes the logic to set the pad token id.

Fixes #1378 #1170.

Before submitting

  • This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
  • Did you make sure to update the documentation with your changes?
  • Did you write any new necessary tests?

@regisss regisss merged commit df6b919 into main Oct 20, 2024
5 of 7 checks passed
@regisss regisss deleted the fix_llama_3.1_generation branch October 20, 2024 14:18
@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.

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.

meta-llama/Llama-3.1-8B-Instruct generate output shows unexpected padding
2 participants