kute-engine
The Kannaka Universal Tokenization Engine: train, store and apply
vocabularies for text, bytes, structured records and event sequences. The
library is imported as kute.
[]
= { = "kute-engine", = "0.2" }
use ;
let engine = new;
let mut config = new;
config.pretokenizer = Gpt4;
let corpus = vec!;
let vocabulary = engine.train?;
let tokenizer = engine.tokenizer?;
let tokens = engine.encode_raw?;
assert_eq!;
The command line tool is kute-cli (cargo install kute-cli installs the
kute command) and the Python package is kute-engine on PyPI.
Documentation, specifications and benchmark results are in the repository. Experimental: formats and APIs may change before 1.0.
Licensed under MIT or Apache-2.0, at your option.