Cannot tokenize byte sequences that are not valid UTF-8 due to design flaw
Open
- Dominant language
- Rust
- Stars
- 134
- Forks
- 24
- Avg merge
- 16h 27m
- Merged PRs (30d)
- 11
Description
Hello,
The BPE algorithm is capable of tokenizing any byte sequence, and LLMs generally accept any sequence of tokens and use token dictionaries that can successfully represent any byte sequence, but the encode method in bpe-openai accepts a type that has to be valid UTF-8. So there are lots of byte sequences, many of which are only 1 byte long, which you cannot tokenize using this library.
Contributor guide
Assessment
This issue has not been assessed yet.