pub enum PreSplit {
Qwen35,
DeepseekV3,
Spm,
UnknownFallbackQwen35,
}Expand description
The pre-tokenizer split a loaded Tokenizer runs. Constructed only through
PreSplit::resolve, so “we do not know how to split for this model” is not a state a live
tokenizer can be in unless the operator asked for it via the env opt-out.
Variants§
Qwen35
unicode::split_qwen35 — serves both qwen35 and qwen2.
DeepseekV3
unicode::split_deepseek_v3 — DeepSeek-V3 and the Step-3.5/3.7-Flash family.
Spm
gemma4 SPM-style BPE: bpe_tokenize splits whole lines itself and the pre id is never
consulted. Requires the gemma4 vocab model, not just the pre string.
UnknownFallbackQwen35
MEMRA_ALLOW_UNKNOWN_PRETOKENIZER=1 was set for an unrecognized pre. Runs the qwen35
split; token ids are NOT exact and every downstream measurement is invalid.
Implementations§
Trait Implementations§
impl Copy for PreSplit
impl Eq for PreSplit
impl StructuralPartialEq for PreSplit
Auto Trait Implementations§
impl Freeze for PreSplit
impl RefUnwindSafe for PreSplit
impl Send for PreSplit
impl Sync for PreSplit
impl Unpin for PreSplit
impl UnsafeUnpin for PreSplit
impl UnwindSafe for PreSplit
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more