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

Tokenizer Fixes For Issue 430 #433

Merged
merged 1 commit into from
Jan 12, 2024

Conversation

martindevans
Copy link
Member

  • Added a test for tokenizing just a new line (reproduce LLama.Native.SafeLLamaContextHandle.Tokenize bug? #430)
  • Properly displaying LLamaToken
  • Removed all tokenisation code in SafeLLamaContextHandle - just pass it all through to the SafeLlamaModelHandle
  • Improved SafeLlamaModelHandle tokenisation:
    • Renting an array, for one less allocation
    • Not using &tokens[0] to take a pointer to an array, this is redundant and doesn't work on empty arrays

…rp#430)

 - Properly displaying `LLamaToken`
 - Removed all tokenisation code in `SafeLLamaContextHandle` - just pass it all through to the `SafeLlamaModelHandle`
 - Improved `SafeLlamaModelHandle` tokenisation:
   - Renting an array, for one less allocation
   - Not using `&tokens[0]` to take a pointer to an array, this is redundant and doesn't work on empty arrays
@martindevans martindevans merged commit 5b41c8e into SciSharp:master Jan 12, 2024
3 checks passed
@martindevans martindevans deleted the tokenizer_fixes_newline branch January 12, 2024 16:22
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.

1 participant