Rust + PyO3 (abi3) · O(N) Causal Router · 100% Byte-Lossless

One unified tokenizer.
Turkish, English, 22 Code Languages & Math.

QuatronTokenizer unifies morphological Turkish segmentation (KoktenV2), root-aware English BPE, and syntax-preserving code & LaTeX-Math tokenization under a single 128-aligned vocabulary with 20 strictly causal FiLM conditioning channels.

Python pip install quatron-tokenizer
Rust cargo add quatron-core
CLI cargo install quatron-cli
Input Sequence quatron-unified-81920
Tokens
-
UTF-8 Bytes
-
Bytes / Token
-
Roundtrip
-
Turkish 0% English 0% Code 0% Math 0% Control / <think> 0%
Click any token to inspect channels
20 Causal Channels (available_at ≤ t) Token #0
- TR
Select a token on the left to inspect its 20 FiLM conditioning values and causal statuses.
# Channel Value Status

Three specialized engines. Zero wasted allocations.

Shared read-only memory tables via Arc, flat O(1) lookup arrays, and bit-exact KOKTEN2S training shards.

quatron-kokten · TR

KoktenV2 Morphology

Turkish root, suffix, and clitic-aware lossless segmentation with 19 Universal Dependencies causal channels projected into shared FiLM slots.

quatron-codex · 22 Langs + Math

Codex Syntax & LaTeX-Math

Bounded O(N) lexer across 22 programming & shell languages plus LaTeX math, preserving single-digit arithmetic boundaries for reasoning models.

quatron-english · EN

English Root/Affix BPE

en-seg-v1 surface scanner with irregular inflection tables, shared `[0, 16)` control IDs, and zero-copy Buffer views for PyTorch and NumPy.

Measured Hardware Throughput & Footprint

Real measurements on quatron-unified-81920 (16 logical threads, --release LTO=fat, 4.00 MB mixed corpus).

Decode · Rust Source Code1,590.9 MB/s
Decode · Mixed TR + EN + Code + Math1,268.3 MB/s
Parallel 16T Encode · Turkish (KoktenV2)419.7 MB/s
Parallel 16T Encode · English301.6 MB/s
Parallel 16T Encode · Rust / LaTeX Math174.1 / 164.9 MB/s
Parallel 16T Encode · Mixed Auto-Routed151.1 MB/s
Loaded Memory RSS
61.7 MB
All 3 engines shared via Arc
Peak Parallel RSS
99.5 MB
16-thread mixed corpus run
Compression (Auto)
2.826 B/tok
+17.3% to +43.1% vs single engine
Byte Fidelity
100%
Zero-loss UTF-8 & byte fallback