AgentVocab: Structure-Aware Vocabulary Adaptation for Efficient LLM Agents
Kai Bian, Haosi Mo, Xuebo Liu, Shuangyong Song, Jing Li, Yongxiang Li, Min zhang, Xuelong Li
Abstract
Recent large language models (LLMs) have demonstrated strong capabilities across challenging tasks, enabling their widespread adoption in agentic systems that interact with external tools. In such deployments, however, LLMs are typically trained with general-purpose tokenizers designed for broad language coverage, while their usage is dominated by narrow, structured tool-calling interactions. This training–deployment mismatch leads to inefficient tokenization, where repetitive structural patterns and frequent semantic units in function calls are fragmented into long sequences of low-level tokens, increasing decoding overhead. To address this gap, we introduce , a structure-aware vocabulary adaptation framework for efficient LLM agents. AgentVocab derives specialized vocabulary entries from real tool-calling traces and adapts the model vocabulary to better reflect structural and semantic regularities, without task-specific schema engineering. Experiments on -bench and -bench show that AgentVocab preserves tool-calling performance while reducing latency relative to the vanilla baseline by 17.7% and 19.5%, respectively. Our approach is orthogonal to existing fine-tuning and agent-training methods and integrates seamlessly into standard agent pipelines. Source code and models will be available at https://github.com/Starry-159/AgentVocab.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext ceddbe5d-d010-4170-9e4a-1545a918c70cBuilds on10
- Toolformer: Language Models Can Teach Themselves to Use ToolsTimo Schick, Jane Dwivedi-Yu, Roberto Dessì, Roberta Raileanu et al.NeurIPS 2023 · 5,989 citations
- Learning to Compress Prompts with Gist TokensJesse Mu, Xiang Li, Noah D. GoodmanNeurIPS 2023 · 488 citations
- Executable Code Actions Elicit Better LLM AgentsXingyao Wang, Yangyi Chen, Lifan Yuan, Yizhe Zhang et al.ICML 2024 · 436 citations
- Getting the most out of your tokenizer for pre-training and domain adaptationGautier Dagan, Gabriel Synnaeve, Baptiste RozièreICML 2024 · 68 citations
- Magnet: Multi-turn Tool-use Data Synthesis and Distillation via Graph TranslationFan Yin, Zifeng Wang, I-Hung Hsu, Jun Yan et al.ACL 2025 · 23 citations
Related papers
- Generalizable End-to-End Tool-Use RL with Synthetic CodeGymWeihua Du, Hailei Gong, Zhan Ling, Kang Liu et al.ICLR 2026 · 13 citations
- Offline Training of Language Model Agents with Functions as Learnable WeightsShaokun Zhang, Jieyu Zhang, Jiale Liu, Linxin Song et al.ICML 2024 · 41 citations
- On Effectiveness and Efficiency of Agentic Tool-calling and RL TrainingTong Liu, Cheng Qian, Matej Cief, Yuan He et al.ICML 2026 · 1 citation
- Agentix: An Efficient Serving Engine for LLM Agents as General ProgramsMichael Luo, Xiaoxiang Shi, Colin Cai, Tianjun Zhang et al.NSDI 2026 · 27 citations
- AgencyBench: Benchmarking the Frontiers of Autonomous Agents in 1M-Token Real-World ContextsKeyu Li, Junhao Shi, Yang Xiao, Mohan Jiang et al.ACL 2026 · 14 citations
