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

EOS TOKEN PROBLEM? #131

Open
debajoycs98 opened this issue Jan 17, 2025 · 1 comment
Open

EOS TOKEN PROBLEM? #131

debajoycs98 opened this issue Jan 17, 2025 · 1 comment

Comments

@debajoycs98
Copy link

I see that for llama3 8B the llm generates made up questions and answers after solving the original problem. That causes answers to come wrong. Why does this happen? Is there a way to fix this?

@debajoycs98 debajoycs98 changed the title EOS TOKEN PROBLEM MAYBE EOS TOKEN PROBLEM? Jan 17, 2025
@Ber666
Copy link
Collaborator

Ber666 commented Jan 22, 2025

Yes I think they are caused by the EOS token setting.. For example, we may have set "\n" as the eos in some applications, so that the model wouldn't continue to make up new questions after it generates expected output for the current question. But since the tokenizers for different LLMs are not the same, maybe ".\n" or ".\n\n" is tokenized as one token in a new model, in which case the "\n" token cannot be not catched..

There are several workarounds: (1) you could play with the tokenizer to find out the appropriate EOS token for the LLM you use (2) You could use other LLM engines like SGLang or VLLM

Could you share me the script you are running and the line that caused the error? Maybe I can provide some quick suggestions if I've seen similar problems.

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

2 participants