-
Notifications
You must be signed in to change notification settings - Fork 362
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
Implement gpt2 (BPE) GGUF tokenizer conversion #397
Merged
+508
−329
Merged
Changes from 3 commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
6a803a2
Implement gpt2 gguf tokenizer
EricLBuehler aa10e21
Fix unk tok calculation
EricLBuehler d66e5af
Remove normalizer
EricLBuehler d267f11
Merge
EricLBuehler 5881440
Update gguf tokenizer
EricLBuehler 8d4dba5
Allow adding unk token when found
EricLBuehler 763241e
Add unk token to builder if provided.
EricLBuehler be4ebc0
Improve add_special_tokens
EricLBuehler c2ba871
Use tokenizerx builder
EricLBuehler aa338be
Add useful comment
EricLBuehler 4685783
Bump version to 0.1.16 (#404)
EricLBuehler 2591a9e
Add and update template READMEs (#405)
EricLBuehler 46ecfac
Improve Rust docs (#406)
EricLBuehler 146f751
Expose phi3v loader and remove unused deps (#408)
EricLBuehler 286e7fd
Support format for mixtral where experts are in one tensor (#355)
EricLBuehler 41b34f6
Normal loading metadata for vision models (#409)
EricLBuehler c29b7cb
Phi 3 vision ISQ support (#410)
EricLBuehler 4756196
Remove causal masks cache (#412)
EricLBuehler 552cd0e
Fix: use new slice_assign (#415)
EricLBuehler d21be7d
Fix Phi-3 GGUF (#414)
EricLBuehler 335aa0a
Work on the gpt2 conversion
EricLBuehler 361c744
Add comment
EricLBuehler f09750c
Add some tests
EricLBuehler 53a4225
Update readme
EricLBuehler File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just curious, BPE has support for setting
unk
in it's builder variant, is it not relevant for some reason? (I know very little about these things)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@polarathene the GGUF file I am testing with (QuantFactory/Meta-Llama-3-8B-Instruct-GGUF) does not have a unk token in the metadata, so I left it out here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, but what about when they do? I assume that's possible since the tokenizer builder for BPE does support setting
unk
? There is no check for this, so if there was it'd just ignore it and introduce a bug?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I wasn't sure if this is guaranteed to be not provided, but just in case I added 8d4dba5 and 763241e.