Skip to content

Fix Tokenize of new line, Remove space inserts#3

Merged
martindevans merged 1 commit intomartindevans:gguffrom
saddam213:feature/gguf
Aug 28, 2023
Merged

Fix Tokenize of new line, Remove space inserts#3
martindevans merged 1 commit intomartindevans:gguffrom
saddam213:feature/gguf

Conversation

@saddam213
Copy link
Copy Markdown

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

/// <param name="context"></param>
public InteractiveExecutor(LLamaContext context) : base(context)
{
_llama_token_newline = Context.NativeHandle.Tokenize("\n", false, Context.Encoding);
Copy link
Copy Markdown
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 👍

Comment thread LLama/LLamaInstructExecutor.cs
Comment thread LLama/LLamaEmbedder.cs
@martindevans
Copy link
Copy Markdown
Owner

Looks good, thanks for fixing this!

@martindevans martindevans merged commit 974f160 into martindevans:gguf Aug 28, 2023
martindevans pushed a commit that referenced this pull request Feb 15, 2026
Documentation cleanup and navigation reorganization.
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