Categories: None [Edit]

ruby_llm-tokenizer

https://rubygems.org/gems/ruby_llm-tokenizer
https://github.com/washu/ruby_llm-tokenizer
Pure-Ruby facade over Hugging Face `tokenizers`, OpenAI `tiktoken_ruby`, and SentencePiece bindings that maps ruby_llm model identifiers (gpt-4o, llama-3, mistral, ...) to the correct tokenizer and exposes a small API for counting, analyzing, and truncating text against a model's context window. Includes an opt-in approximation backend for models with no published tokenizer (Claude).

Total

Ranking: 190,268 of 197,085
Downloads: 920

Daily

Ranking: 28,078 of 197,066
Downloads: 5

Depended by

RankDownloadsName
196,498264ruby_llm-toolbox

Depends on

RankDownloadsName
2,7127,552,286tiktoken_ruby
4,9921,691,018tokenizers
166,5953,222sentencepiece

Owners

#GravatarHandle
1iconwashu214