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

Special stop tokens in stop_sequences doesn't work with GGUFs #812

Open
noisefloordev opened this issue Apr 27, 2024 · 2 comments
Open

Special stop tokens in stop_sequences doesn't work with GGUFs #812

noisefloordev opened this issue Apr 27, 2024 · 2 comments

Comments

@noisefloordev
Copy link

I'm trying to use special stop tokens in stop_sequences, but it's not recognizing them as a single token. I'm passing stop_sequence: ["<|im_start|>", "<|im_end|>"] to /api/extra/tokencount, but it doesn't stop on those tokens.

It looks like llama_tokenize is adding the BOS, and changing the third parameter of TokenizeString's llama_tokenize call to add_bos seems to fix this. I'm not sure if that's the right fix, since that parameter has some other effects.

@LostRuins
Copy link
Owner

There's a planned fix upcoming for this, this should work in the next version.

@LostRuins
Copy link
Owner

Hi, Should be fixed in the latest version

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