fix: tokenization of special characters:#850
Merged
abetlen merged 1 commit intoabetlen:mainfrom Nov 2, 2023
Merged
Conversation
It should behave like llama.cpp, where most out of the box usages treat special characters accordingly
Contributor
Author
Contributor
Author
|
@abetlen In case you missed this. |
|
What about removing the empty test.py file? |
Owner
|
@antoine-lizee looks good, I'm slightly hesistant to change the default behaviour of the |
|
Nope, that will not be sufficient. In my case, I'm infilling codes using |
Owner
|
I'll go ahead and merge this in as is for now, should have time in the next week to address any issues if this causes breaking changes. @antoine-lizee thank you for the contribution! |
abetlen
pushed a commit
that referenced
this pull request
Nov 2, 2023
It should behave like llama.cpp, where most out of the box usages treat special characters accordingly
abetlen
added a commit
that referenced
this pull request
Nov 3, 2023
* Add low-level batching notebook * fix: tokenization of special characters: (#850) It should behave like llama.cpp, where most out of the box usages treat special characters accordingly * Update CHANGELOG * Cleanup * Fix runner label * Update notebook * Use llama_decode and batch api * Support logits_all parameter --------- Co-authored-by: Antoine Lizee <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
It should behave like llama.cpp, where most out of the box usages treat special characters accordingly. See #838 (comment) for more details.
I checked that with this fix, the vanilla call to
llm.create_completion(temperature=0)leads to exactly the same results for a simple chat prompt than when using./main --temp 0fromllama.cpp- which it didn't before.I changed the behaviour also for the embeddings and the LlamaTokenizer. I'm missing context so might be wrong on those, but I figured it would be good to be consistent.