VocabTailor: Dynamic Vocabulary Selection for Downstream Tasks in Small Language Models

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Zhang, Hanling, Zhou, Yayu, Fang, Tongcheng, Yuan, Zhihang, Dai, Guohao, Ouyang, Wanli, Wang, Yu
Format: Preprint
Published: 2025
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866917416521433088
author Zhang, Hanling
Zhou, Yayu
Fang, Tongcheng
Yuan, Zhihang
Dai, Guohao
Ouyang, Wanli
Wang, Yu
author_facet Zhang, Hanling
Zhou, Yayu
Fang, Tongcheng
Yuan, Zhihang
Dai, Guohao
Ouyang, Wanli
Wang, Yu
contents Small Language Models (SLMs) provide computational advantages in resource-constrained environments, yet memory limitations remain a critical bottleneck for edge device deployment. A substantial portion of SLMs' memory footprint stems from vocabulary-related components, particularly embeddings and language modeling (LM) heads, due to large vocabulary sizes. Existing static vocabulary pruning, while reducing memory usage, suffers from rigid, one-size-fits-all designs that cause information loss during the prefill stage and lack flexibility. In this work, we identify two key principles underlying the vocabulary reduction challenge: the lexical locality principle, the observation that only a small subset of tokens is required during any single inference, and the asymmetry in computational characteristics between vocabulary-related components of SLM. Based on these insights, we introduce VocabTailor, a novel decoupled dynamic vocabulary selection framework that addresses memory constraints through offloading embedding and implements a hybrid static-dynamic vocabulary selection strategy for LM Head, enabling on-demand loading of vocabulary components. Comprehensive experiments across diverse downstream tasks demonstrate that VocabTailor achieves a reduction of up to 99% in the memory usage of vocabulary-related components with minimal or no degradation in task performance, substantially outperforming existing static vocabulary pruning. Our code is available at https://github.com/AwakenedInsects/VocabTailor.
format Preprint
id arxiv_https___arxiv_org_abs_2508_15229
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle VocabTailor: Dynamic Vocabulary Selection for Downstream Tasks in Small Language Models
Zhang, Hanling
Zhou, Yayu
Fang, Tongcheng
Yuan, Zhihang
Dai, Guohao
Ouyang, Wanli
Wang, Yu
Computation and Language
Artificial Intelligence
Machine Learning
Small Language Models (SLMs) provide computational advantages in resource-constrained environments, yet memory limitations remain a critical bottleneck for edge device deployment. A substantial portion of SLMs' memory footprint stems from vocabulary-related components, particularly embeddings and language modeling (LM) heads, due to large vocabulary sizes. Existing static vocabulary pruning, while reducing memory usage, suffers from rigid, one-size-fits-all designs that cause information loss during the prefill stage and lack flexibility. In this work, we identify two key principles underlying the vocabulary reduction challenge: the lexical locality principle, the observation that only a small subset of tokens is required during any single inference, and the asymmetry in computational characteristics between vocabulary-related components of SLM. Based on these insights, we introduce VocabTailor, a novel decoupled dynamic vocabulary selection framework that addresses memory constraints through offloading embedding and implements a hybrid static-dynamic vocabulary selection strategy for LM Head, enabling on-demand loading of vocabulary components. Comprehensive experiments across diverse downstream tasks demonstrate that VocabTailor achieves a reduction of up to 99% in the memory usage of vocabulary-related components with minimal or no degradation in task performance, substantially outperforming existing static vocabulary pruning. Our code is available at https://github.com/AwakenedInsects/VocabTailor.
title VocabTailor: Dynamic Vocabulary Selection for Downstream Tasks in Small Language Models
topic Computation and Language
Artificial Intelligence
Machine Learning
url https://arxiv.org/abs/2508.15229