Commit 972dc78
test(tokenizer): BPE UTF-8 regression fixtures for v0.27.0 fix
Adds four HF-verified tokenization assertions to scripts/test_tokenizer.sh:
café → [924, 58858]
naïve → [3376, 37572, 586]
日本語 → [101059, 102819]
привет → [124436, 26991, 8178]
All four exercise the GPT-2 direct-byte codepoint range (U+00A1-U+00FF)
that v0.27.0 fixed. Before the fix they fell through to byte-fallback
with wrong token IDs; the regression test nails the correct IDs down so
any future refactor of encode_byte_to_bpe_char fails loudly.
8/8 PASS locally.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 34661a8 commit 972dc78
1 file changed
Lines changed: 16 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
78 | 94 | | |
79 | 95 | | |
80 | 96 | | |
| |||
0 commit comments