-
Notifications
You must be signed in to change notification settings - Fork 88
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* 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 * Switch test to microsoft tokenizer, verify in Python
- Loading branch information
Showing
10 changed files
with
129 additions
and
40 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"text": "Fatouville-Grestain est une commune du Nord-Ouest du d\u00e9partement de l'Eure situ\u00e9e au \nbord de l'estuaire de la Seine et \u00e0 proximit\u00e9 du d\u00e9partement du Calvados. Selon l'atlas des paysages \nde Haute-Normandie, elle appartient \u00e0 la r\u00e9gion naturelle du Lieuvin. Toutefois, l'Agreste, le service \nde la statistique et de la prospective du minist\u00e8re de l'Agriculture, de l'Agroalimentaire et de la For\u00eat, \nla classe au sein du pays d'Auge (en tant que r\u00e9gion agricole).La commune est \u00e0 moins de dix kilom\u00e8tres \u00e0 \nl'est de Honfleur, \u00e0 autant de Beuzeville et \u00e0 environ dix-sept kilom\u00e8tres de Pont-Audemer.", "bpe_tokens": ["Fat", "ou", "ville", "-", "G", "rest", "ain", "\u2581est", "\u2581une", "\u2581commune", "\u2581du", "\u2581Nord", "-", "Ouest", "\u2581du", "\u2581d\u00e9partement", "\u2581de", "\u2581l", "'", "Eure", "\u2581situ\u00e9e", "\u2581au", "\u2581", "\n", "bord", "\u2581de", "\u2581l", "'", "est", "uaire", "\u2581de", "\u2581la", "\u2581Seine", "\u2581et", "\u2581\u00e0", "\u2581proximit\u00e9", "\u2581du", "\u2581d\u00e9partement", "\u2581du", "\u2581Cal", "vados", ".", "\u2581Selon", "\u2581l", "'", "atlas", "\u2581des", "\u2581paysages", "\u2581", "\n", "de", "\u2581Haute", "-", "Norman", "die", ",", "\u2581elle", "\u2581appartient", "\u2581\u00e0", "\u2581la", "\u2581r\u00e9gion", "\u2581naturelle", "\u2581du", "\u2581Lieu", "vin", ".", "\u2581Toutefois", ",", "\u2581l", "'", "Ag", "reste", ",", "\u2581le", "\u2581service", "\u2581", "\n", "de", "\u2581la", "\u2581statistique", "\u2581et", "\u2581de", "\u2581la", "\u2581prospective", "\u2581du", "\u2581minist\u00e8re", "\u2581de", "\u2581l", "'", "Agriculture", ",", "\u2581de", "\u2581l", "'", "Agro", "alimenta", "ire", "\u2581et", "\u2581de", "\u2581la", "\u2581For", "\u00eat", ",", "\u2581", "\n", "la", "\u2581classe", "\u2581au", "\u2581sein", "\u2581du", "\u2581pays", "\u2581d", "'", "Au", "ge", "\u2581(", "en", "\u2581tant", "\u2581que", "\u2581r\u00e9gion", "\u2581agricole", ").", "La", "\u2581commune", "\u2581est", "\u2581\u00e0", "\u2581moins", "\u2581de", "\u2581dix", "\u2581kilom\u00e8tres", "\u2581\u00e0", "\u2581", "\n", "l", "'", "est", "\u2581de", "\u2581Hon", "fleur", ",", "\u2581\u00e0", "\u2581autant", "\u2581de", "\u2581Be", "uze", "ville", "\u2581et", "\u2581\u00e0", "\u2581environ", "\u2581dix", "-", "sept", "\u2581kilom\u00e8tres", "\u2581de", "\u2581Pont", "-", "Au", "de", "mer", "."], "token_ids": [2, 33690, 507, 5259, 235290, 235319, 4803, 985, 1455, 2360, 34960, 1344, 14852, 235290, 101323, 1344, 57781, 581, 533, 235303, 128985, 80493, 992, 235248, 108, 51123, 581, 533, 235303, 644, 106910, 581, 683, 53876, 1008, 1305, 72883, 1344, 57781, 1344, 2659, 119613, 235265, 86721, 533, 235303, 64117, 848, 141362, 235248, 108, 495, 70628, 235290, 74906, 3917, 235269, 11340, 133635, 1305, 683, 33927, 72277, 1344, 174959, 2964, 235265, 145673, 235269, 533, 235303, 6665, 62423, 235269, 709, 2566, 235248, 108, 495, 683, 160719, 1008, 581, 683, 40675, 1344, 85986, 581, 533, 235303, 79742, 235269, 581, 533, 235303, 166317, 104544, 844, 1008, 581, 683, 1699, 19941, 235269, 235248, 108, 522, 30739, 992, 8399, 1344, 11928, 499, 235303, 2159, 541, 591, 479, 21482, 907, 33927, 113917, 846, 2841, 34960, 1455, 1305, 15006, 581, 51102, 118516, 1305, 235248, 108, 235257, 235303, 644, 581, 9073, 129564, 235269, 1305, 54409, 581, 2065, 52172, 5259, 1008, 1305, 15265, 51102, 235290, 91012, 118516, 581, 52291, 235290, 2159, 495, 977, 235265], "decoded_text": "<bos>Fatouville-Grestain est une commune du Nord-Ouest du d\u00e9partement de l'Eure situ\u00e9e au \nbord de l'estuaire de la Seine et \u00e0 proximit\u00e9 du d\u00e9partement du Calvados. Selon l'atlas des paysages \nde Haute-Normandie, elle appartient \u00e0 la r\u00e9gion naturelle du Lieuvin. Toutefois, l'Agreste, le service \nde la statistique et de la prospective du minist\u00e8re de l'Agriculture, de l'Agroalimentaire et de la For\u00eat, \nla classe au sein du pays d'Auge (en tant que r\u00e9gion agricole).La commune est \u00e0 moins de dix kilom\u00e8tres \u00e0 \nl'est de Honfleur, \u00e0 autant de Beuzeville et \u00e0 environ dix-sept kilom\u00e8tres de Pont-Audemer."} |
Large diffs are not rendered by default.
Oops, something went wrong.
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