Man pages for rtiktoken
A Byte-Pair-Encoding (BPE) Tokenizer for OpenAI's Large Language Models

decode_tokensDecodes tokens back to text
get_token_countReturns the number of tokens in a text
get_tokensConverts text to tokens
model_to_tokenizerGets the name of the tokenizer used by a model
rtiktoken documentation built on April 15, 2025, 1:35 a.m.