Hacker News front page7 min readintermediate
Generate fonts where every LLM token is the same width
Summary
This article introduces "token-space fonts" which render each LLM token with equal width, allowing users to visualize how text is tokenized. It provides a web-based compiler to generate these fonts for various LLM tokenizers and instructions for integrating them into Discord and Slack.
- Token-space fonts visualize LLM tokenization by rendering each token at a fixed width (e.g., 3 em).
- A web-based compiler allows generating custom token fonts for various LLM tokenizers (DeepSeek, Llama 3, Claude ctok, etc.).
- Detailed instructions are provided for integrating these fonts into Discord (via Vesktop/Vencord) and Slack (via userscript).
- The tool is transparent about known discrepancies and limitations, including whitespace handling, normalization, and browser rendering issues.
Engineers working with LLMs can use these fonts to visually debug and understand how different tokenizers segment text, which is crucial for prompt engineering and model behavior analysis.
7/10