Token-Native Storage: Read and Write in your Agent's Language
Kumar Shivendu
cs.DB, cs.CL, cs.IR
Submitted: 2026-08-03
Comments: 12 pages, 6 figures, 2 tables
Code: https://github.com/kshivendu/token-storage
License: http://creativecommons.org/licenses/by/4.0/
The gist: Search and database engines still store text as UTF-8, a format built for humans.
Terminology
Abstract
Search and database engines still store text as UTF-8, a format built for humans. But the systems that increasingly read and write that text (embedders, rerankers, and language-model agents) work with token IDs, not characters, so every access pays to translate between the two. As agents become the primary readers and writers of stored text, we argue for token-native storage: keep the text as the model's own byte-pair-encoding (BPE) token IDs. Packing r50k IDs as uint16 already beats UTF-8 by 2.25x on English with no compression, and an entropy coder on top reaches 3.30x. Across six tokenizers and three corpora (English, code, Hindi), compressing token IDs matches or beats every byte codec, even a corpus-trained zstd dictionary. Two findings sharpen the case. BPE numbers tokens by merge order instead of frequency, and re-ranking by frequency lets a plain integer codec (streamvbyte) recover most of the entropy coder's ratio while decoding 7x faster, a near-free change to how AI labs publish vocabularies. And because a model reads token IDs, not text, a token-native store hands over the IDs directly instead of re-tokenizing on every read. The only requirement is that reader and writer share a tokenizer, and different model families often use different ones today, so we argue for standardization: a published, shared vocabulary, the way ASCII and UTF-8 standardized text.
Sources
- UniSearch: Rethinking Search System with a Unified Generative Architecture
- Asymmetric numeral systems: entropy coding combining speed of Huffman coding with compression rate of arithmetic coding
- CLaRa: Bridging Retrieval and Generation with Continuous Latent Reasoning
- Frequency-Ordered Tokenization for Better Text Compression
- Training LLMs over Neurally Compressed Text
- Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformer
- Neural Machine Translation of Rare Words with Subword Units
- LoPace: A Lossless Optimized Prompt Accurate Compression Engine for Large Language Model Applications
- OneGen: Efficient One-Pass Unified Generation and Retrieval for LLMs
Related papers
- SAGA: Synthetic Agentic Graph Architecture for Temporal Benchmark Generation
- Cost-Aware Mixture-of-Experts Coordination for Model Markets
- Amora: Communication-Efficient Private Approximate Nearest Neighbors Search
- Vibe Coding on Trial: Operating Characteristics of Unanimous LLM Juries
- Human-Level Text-to-SQL via Reinforcement Learning on Verified Data, Without Pipeline Engineering
- MetaJoin: Adaptive Join Selections for Heterogeneous Tables