-
Notifications
You must be signed in to change notification settings - Fork 102
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support "fuse unknown" configuration (#117)
* Bring over hf token envvar from preview branch * Add tests for Gemma, including edge cases Edge cases also added for other BPE tokenizers, but not for T5 yet. * Sort added tokens by length (descending) to avoid early partial matches Similar to huggingface/transformers.js@c305c38 * Store vocab as NSString to allow multiple tokens with the same Unicode canonical representation. * Remove comments * Go back to making vocab dictionaries private * Use ungated copy of Gemma tokenizer * Use NSString in UnigramTokenizer * Support fuse_unk configuration. Tested on one of the T5 testEdgeCases(). * Remove duplicate function
- Loading branch information
Showing
5 changed files
with
39 additions
and
11 deletions.
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
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
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
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
Large diffs are not rendered by default.
Oops, something went wrong.