Skip to content

fix: only use eos_token_id as pad_token_id if int #2774

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
Dec 2, 2024

Conversation

dvrogozh
Copy link
Contributor

@dvrogozh dvrogozh commented Nov 22, 2024

LLama 3 has a list of values as eos_token_id:

  "['<|end_of_text|>', '<|eom_id|>', '<|eot_id|>']"

This breaks tokenizer since it expects single value. This commit uses tokenizer.eos_token_id instead in such a case.

Fixes: #2440

CC: @Narsil @zucchini-nlp @ladi-pomsar

LLama 3 has a list of values as eos_token_id:
  "['<|end_of_text|>', '<|eom_id|>', '<|eot_id|>']"
This breaks tokenizer since it expects single value. This
commit uses tokenizer.eos_token_id instead in such a case.

Fixes: huggingface#2440
Signed-off-by: Dmitry Rogozhkin <[email protected]>
@zucchini-nlp
Copy link
Member

@dvrogozh Cool, looks good to me. We also need a review from TGI team

@dvrogozh
Copy link
Contributor Author

@Narsil, @OlivierDehaene : please, help to review.

Copy link
Collaborator

@Narsil Narsil left a comment

Choose a reason for hiding this comment

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

LGTM

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.

[Volta] [No flash attention] Llama 3.1 8B Instruct failed to start - "< not supported between instances of 'NoneType' and 'int'"
3 participants