Expand description
HuggingFace tokenizer wrapper.
Downloads and caches the tokenizer.json from a HuggingFace model
repository using hf-hub, then loads it for fast encoding.
Functions§
- load_
tokenizer - Load a tokenizer from a
HuggingFacemodel repository. - tokenize_
query - Tokenize a query string for embedding, truncating to
model_max_tokens.