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

llama 3 tokenizer no longer works - updated eos token #44

Open
avianion opened this issue May 13, 2024 · 5 comments
Open

llama 3 tokenizer no longer works - updated eos token #44

avianion opened this issue May 13, 2024 · 5 comments

Comments

@avianion
Copy link

The official llama 3 70b instruct repo has updated the eos token

"eos_token": "<|eot_id|>",

Yet when using this library and using that eos token, no output is outputted because it used the old eos token.

Suggesting to fix this @npuichigo

@npuichigo
Copy link
Owner

which part do you mean? Triton backend should have parameter like stop_words

@avianion
Copy link
Author

"chat_template": "{% set loop_messages = messages %}{% for message in loop_messages %}{% set content = '<|start_header_id|>' + message['role'] + '<|end_header_id|>\n\n'+ message['content'] | trim + '<|eot_id|>' %}{% if loop.index0 == 0 %}{% set content = bos_token + content %}{% endif %}{{ content }}{% endfor %}{% if add_generation_prompt %}{{ '<|start_header_id|>assistant<|end_header_id|>\n\n' }}{% endif %}",

@poddamatt98
Copy link

Hi @avianion, I am reporting the issue you are describing. Using the liquid template defined in the repo, the model is returning an empty response. I also tried converting your chat template from Jinja to Liquid, but without results.
I wonder if you have solved this issue.
@npuichigo can you help us with this?

@npuichigo
Copy link
Owner

@poddamatt98 I will take a look at this when I have time.

@poddamatt98
Copy link

poddamatt98 commented Aug 2, 2024

problem solved modifying </s> with <|eot_id|> both in row 245 in src/routes/chat.rs and in row 226 in src/routes/completions.rs.

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

No branches or pull requests

3 participants