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: only use eos_token_id as pad_token_id if int #2774

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants