Expand description
The canonical ByT5 byte table (SPEC.md §4) — fixed, no vocab files.
UTF-8 byte b maps to id b + 3; one trailing EOS (id 1) is
appended on encode; pad = 0, unk = 2. Ids are NOT raw bytes —
feeding text.as_bytes() directly produces silent garbage on real
models (the classic ByT5 interop bug; SPEC.md §4 warning).
Constants§
- BYTE_
OFFSET - Byte offset: id = byte + 3.
- EOS_ID
- Special id 1: end of sequence (stops decode; appended on encode).
- PAD_ID
- Special id 0: padding (skipped on decode).
- UNK_ID
- Special id 2: unknown (skipped on decode).