Skip to main content

load_tokenizer

Function load_tokenizer 

Source
pub fn load_tokenizer(model_repo: &str) -> Result<Tokenizer>
Expand description

Load a tokenizer from a HuggingFace model repository.

Downloads tokenizer.json on first call; subsequent calls use the cache.

ยงErrors

Returns an error if the tokenizer file cannot be downloaded or parsed.