Skip to content

v0.12.1 — Vectorized BPE training

Choose a tag to compare

@cattolatte cattolatte released this 07 Jul 01:32
4bffbff

BPETokenizer.train is now vectorized with numpy — ~8× faster than the naive Python loop (gap grows with corpus size), byte-level semantics and losslessness unchanged. numpy is imported lazily so encode/decode stay dependency-light.