Saved in:
Bibliographic Details
Main Authors: Shao, Jintian, Huang, Hongyi, Wu, Jiayi, Cheng, YiMing, Wu, ZhiYu, Shan, You, Zheng, MingKai
Format: Preprint
Published: 2025
Subjects:
Online Access:https://arxiv.org/abs/2505.10202
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866908364798164992
author Shao, Jintian
Huang, Hongyi
Wu, Jiayi
Cheng, YiMing
Wu, ZhiYu
Shan, You
Zheng, MingKai
author_facet Shao, Jintian
Huang, Hongyi
Wu, Jiayi
Cheng, YiMing
Wu, ZhiYu
Shan, You
Zheng, MingKai
contents Large Language Models (LLMs) have achieved remarkable success but face significant computational and memory challenges, particularly due to their extensive output vocabularies. The final linear projection layer, mapping hidden states to vocabulary-sized logits, often constitutes a substantial portion of the model's parameters and computational cost during inference. Existing methods like adaptive softmax or hierarchical softmax introduce structural complexities. In this paper, we propose VQ-Logits, a novel approach that leverages Vector Quantization (VQ) to drastically reduce the parameter count and computational load of the LLM output layer. VQ-Logits replaces the large V * dmodel output embedding matrix with a small, shared codebook of K embedding vectors (K << V ). Each token in the vocabulary is mapped to one of these K codebook vectors. The LLM predicts logits over this compact codebook, which are then efficiently "scattered" to the full vocabulary space using the learned or preassigned mapping. We demonstrate through extensive experiments on standard language modeling benchmarks (e.g., WikiText-103, C4) that VQ-Logits can achieve up to 99% parameter reduction in the output layer and 6x speedup in logit computation, with only a marginal 4% increase in perplexity compared to full softmax baselines. We further provide detailed ablation studies on codebook size, initialization, and learning strategies, showcasing the robustness and effectiveness of our approach.
format Preprint
id arxiv_https___arxiv_org_abs_2505_10202
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle VQ-Logits: Compressing the Output Bottleneck of Large Language Models via Vector Quantized Logits
Shao, Jintian
Huang, Hongyi
Wu, Jiayi
Cheng, YiMing
Wu, ZhiYu
Shan, You
Zheng, MingKai
Computation and Language
Large Language Models (LLMs) have achieved remarkable success but face significant computational and memory challenges, particularly due to their extensive output vocabularies. The final linear projection layer, mapping hidden states to vocabulary-sized logits, often constitutes a substantial portion of the model's parameters and computational cost during inference. Existing methods like adaptive softmax or hierarchical softmax introduce structural complexities. In this paper, we propose VQ-Logits, a novel approach that leverages Vector Quantization (VQ) to drastically reduce the parameter count and computational load of the LLM output layer. VQ-Logits replaces the large V * dmodel output embedding matrix with a small, shared codebook of K embedding vectors (K << V ). Each token in the vocabulary is mapped to one of these K codebook vectors. The LLM predicts logits over this compact codebook, which are then efficiently "scattered" to the full vocabulary space using the learned or preassigned mapping. We demonstrate through extensive experiments on standard language modeling benchmarks (e.g., WikiText-103, C4) that VQ-Logits can achieve up to 99% parameter reduction in the output layer and 6x speedup in logit computation, with only a marginal 4% increase in perplexity compared to full softmax baselines. We further provide detailed ablation studies on codebook size, initialization, and learning strategies, showcasing the robustness and effectiveness of our approach.
title VQ-Logits: Compressing the Output Bottleneck of Large Language Models via Vector Quantized Logits
topic Computation and Language
url https://arxiv.org/abs/2505.10202