Skip to content
class

ByteTokenizer

extendsLookupTokenizer
ByteTokenizer

── ByteTokenizer ───────────────────────────────────────────────────

Vocab is fixed at 256 — each UTF-8 byte maps to id == byte value. No OOV is possible (every input is a sequence of bytes). Useful as a robust multilingual fallback (ByT5, byte-level LMs).

Constructors

1

Methods

3
fnconst

split_to_chunks_

int split_to_chunks_(const int & text)
fn

train

void train(const int &, int)

Fixed-vocab; training is a no-op (warns via the Python wrapper if invoked — here we silently keep the vocab unchanged).