1
RahulDey12 /tiktoken-php
A PHP implementation of OpenAI's BPE tokenizer tiktoken.
PHP9

special-tokens 话题在 GitHub 上没有填写简介,这里按 Star 数汇总最相关的热门仓库。
A PHP implementation of OpenAI's BPE tokenizer tiktoken.
Detect and neutralize LLM chat-template special tokens (ChatML, Llama, Mistral, Gemma, Qwen, DeepSeek, Command-R) in untrusted text — zero-dependency CLI + library and CI gate against Special Token Injection.
Keep literal special-token strings as ordinary text in vLLM Chat Completions (Qwen3+)
Custom BPE Tokenizer, trained for 1256 merges. Can be trained further, we can load the previously trained tokenizer and also there's an option to add or remove special tokens that you need.
Turns each letter into a raw byte number and keeps each chat marker as one token, then restores the original text.