CLAIApr 16

Compressing Sequences in the Latent Embedding Space: $K$-Token Merging for Large Language Models

arXiv:2604.1515320.6h-index: 7
AI Analysis

This work addresses the computational and memory costs of long prompts in LLMs by introducing a latent-space compression method that improves efficiency without significant performance loss.

K-Token Merging compresses sequences by merging contiguous blocks of K token embeddings into single embeddings via a lightweight encoder, achieving up to 75% input length reduction with minimal performance degradation on structural reasoning, sentiment classification, and code editing tasks.

Large Language Models (LLMs) incur significant computational and memory costs when processing long prompts, as full self-attention scales quadratically with input length. Token compression aims to address this challenge by reducing the number of tokens representing inputs. However, existing prompt-compression approaches primarily operate in token space and overlook inefficiencies in the latent embedding space. In this paper, we propose K-Token Merging, a latent-space compression framework that merges each contiguous block of K token embeddings into a single embedding via a lightweight encoder. The compressed sequence is processed by a LoRA-adapted LLM, while generation remains in the original vocabulary. Experiments on structural reasoning (Textualized Tree), sentiment classification (Amazon Reviews), and code editing (CommitPackFT) show that K-Token Merging lies on the Pareto frontier of performance vs. compression, achieving up to 75% input length reduction with minimal performance degradation.

Foundations

The foundational work for this paper's niche, ranked by how specifically the neighbourhood builds on it — not by global fame.

Your Notes