Compressing Sequences in the Latent Embedding Space: K-Token Merging for Large Language Models
On the map: Efficient LLM inference and serving → Prompt and context compression
Abstract (arXiv)
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. Code is available at https://github.com/shsjxzh/K-Token-Merging.
Key facts. No citing papers in the map yet (data through 14 Oct 2026). Placed in Prompt and context compression, one of 12 directions in Efficient LLM inference and serving. Builds on 21 of its 31 references that are in the map. First posted on arXiv 16 Apr 2026.
Builds on
21 of 31 references.
Closest ancestors · 9
Same direction, newest first
- 2025Lossless Token Sequence Compression via Meta-Tokens30 May
- 2024Prompt Compression for Large Language Models: A Survey16 Oct
- 2024TACO-RL: Task Aware Prompt Compression Optimization with Reinforcement Learning19 Sep
- 2024Prompt Compression with Context-Aware Sentence Encoding for Fast and Improved LLM Inference2 Sep
- 2024xRAG: Extreme Context Compression for Retrieval-augmented Generation with One Token22 May
- 2024LLMLingua-2: Data Distillation for Efficient and Faithful Task-Agnostic Prompt Compression19 Mar
- 2023TCRA-LLM: Token Compression Retrieval Augmented Large Language Model for Inference Cost Reduction24 Oct
- 2023LongLLMLingua: Accelerating and Enhancing LLMs in Long Context Scenarios via Prompt Compression10 Oct
- 2023Discrete Prompt Compression with Reinforcement Learning17 Aug
Other references · 12
- 2017Attention Is All You Needcited by 60,361
- 2020Language Models are Few-Shot Learnerscited by 32,419
- 2021The Power of Scale for Parameter-Efficient Prompt Tuningcited by 3,795
- 2022Token Merging: Your ViT But Fastercited by 1,021
- 2024A Survey on Large Language Models for Code Generationcited by 658
- 2023Learning to Compress Prompts with Gist Tokenscited by 390
- 2023Adapting Language Models to Compress Contextscited by 356
- 2024A Survey on LLM-based Code Generation for Low-Resource and Domain-Specific Programming Languagescited by 66
- 2024Learning to Compress Prompt in Natural Language Formatscited by 55
- 2025Scaling Embedding Layers in Language Modelscited by 20
- 2025LLM/Agent-as-Data-Analyst: A Surveycited by 16
- 2024UniICL: An Efficient Unified Framework Unifying Compression, Selection, and Generationcited by 6
Built on by
Not cited yet.
Similar, not cited
Close in wording, no citation either way
- 2026Lexical Prompt Compression for Large Language Models: A Training-Free, Deterministic Pipeline with Empirical Pareto Analysis Across Eleven Task Categories
- 2026SemanticFold: Latent Sequence Compression SeparatesLanguage Modeling, Decodability, and Reasoning
- 2026zip2zip++: Towards Inference-Time Token Compression with Minimal Quality Loss
- 2023A Survey on Model Compression for Large Language Models
- 2023LLMLingua: Compressing Prompts for Accelerated Inference of Large Language Models
- 2025Learning to Compress: Unlocking the Potential of Large Language Models for Text Representation
- 2024500xCompressor: Generalized Prompt Compression for Large Language Models
- 2026SelKV: Selective KV Cache Merging with Per-Token Merge-or-Drop and Attention Compensation