Enums§
- Tokenizer
Family - Tokenizer families for different LLM providers.
Constants§
- COUNTING_
FAMILY - The tokenizer family
count_tokensuses for all read/savings accounting.
Functions§
- count_
tokens - Counts BPE tokens using the default tokenizer (o200k_base).
- count_
tokens_ for - Counts BPE tokens using the specified tokenizer family.
- counting_
family_ label - Label of the tokenizer used for counting (e.g.
"o200k_base"). - detect_
tokenizer - Detects the appropriate tokenizer family from a client or model name.
- encode_
tokens - Encodes text into BPE token IDs (o200k_base).
- encode_
tokens_ for - Encodes text into BPE token IDs for the specified tokenizer family.