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 Tokenize of new line, Remove space inserts #3

Merged
merged 1 commit into from
Aug 28, 2023

Conversation

saddam213
Copy link

Hope im not getting in the way here.

Been playing with the GUFF branch, had a few issues with the InteractiveExecutor throwing trying to tokenize \n

I changed it to use the newline for LLama.cpp, not sure if this is the correct approch, so feel free to scrutinize.

I also removed the inserted spaces as they are no longer required llama : more tokenizer fixes #2810

All 3 executors seem to be working for me now

@@ -26,7 +26,7 @@ public class InteractiveExecutor : StatefulExecutorBase
/// <param name="context"></param>
public InteractiveExecutor(LLamaContext context) : base(context)
{
_llama_token_newline = Context.NativeHandle.Tokenize("\n", false, Context.Encoding);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like a much better way to do it 👍

@martindevans
Copy link
Owner

Looks good, thanks for fixing this!

@martindevans martindevans merged commit 974f160 into martindevans:gguf Aug 28, 2023
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

Successfully merging this pull request may close these issues.

2 participants