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

Support end/beginning of sequence other than BOS and EOS #83

Open
rlouf opened this issue Oct 25, 2024 · 0 comments
Open

Support end/beginning of sequence other than BOS and EOS #83

rlouf opened this issue Oct 25, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@rlouf
Copy link
Member

rlouf commented Oct 25, 2024

This issue is very general; I do not have a MRE yet.

Large Language Models use the EOS token to signify that the generation is over. Instruct models are different: they have other special tokens to mark the beginning and end of an instruction, as well as the beginning and end of the model's response, see for instance OpenAI's. My impression with the current setup is that generation does not stop when these special tokens are generated, and that generating a turn start token is not disallowed, unlike with the BOS and EOS token.

I noticed this when I went over the SCP examples. There we use JSON-based structured generation to generate the different entries. It turns out that some of the JSON fields contained these special tokens, and then more text, as you can see in this commit where I made the correction by hand.

@rlouf rlouf added the bug Something isn't working label Oct 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant