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: 189,159 of 198,430
Downloads: 1,166

Daily

Ranking: 23,618 of 198,401
Downloads: 10

Depended by

RankDownloadsName
196,978329ruby_llm-toolbox

Depends on

RankDownloadsName
2,6648,056,375tiktoken_ruby
4,8351,866,723tokenizers
166,2313,324sentencepiece

Owners

#GravatarHandle
1iconwashu214