github / github/rust-gems

Cannot tokenize byte sequences that are not valid UTF-8 due to design flaw

Open
#51 1 comment 0 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.