Caveman Compression: MLM-Guided Token Removal for Reducing LLM Inference Costs

Large language models (LLMs) are increasingly deployed in settings where inference cost and latency are dominated by long input contexts. In this work, we propose Caveman Compression, a simple, training-free method for reducing input length while preserving downstream performance. Our approach uses a masked language model (MLM) to estimate token predictability and selectively removes highly predictable tokens, while protecting factual anchors such as named entities, numbers, dates, and compound nouns. This yields compressed prompts that remain semantically faithful but are shorter and cheaper to process. We evaluate Caveman Compression on question answering style benchmarks using multiple LLMs, measuring both answer quality and effective token savings. Across tasks, the method achieves substantial input length reductions (e.g., 30–50% fewer tokens) with only minor drops in accuracy, and in some settings matches the performance of the full input. Because it requires no additional training or model modification, Caveman Compression can be easily integrated into existing LLM pipelines to reduce inference cost and latency.

Publication Details

Journal
Zenodo (CERN European Organization for Nuclear Research)
Published
2025-12-08
DOI
https://doi.org/10.5281/zenodo.17857839
Primary Topic
Topic Modeling
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Caveman Compression: MLM-Guided Token Removal for Reducing LLM Inference Costs

Zenodo (CERN European Organization for Nuclear Research)
Topic Modeling
article

Caveman Compression: MLM-Guided Token Removal for Reducing LLM Inference Costs

article en

Abstract

Large language models (LLMs) are increasingly deployed in settings where inference cost and latency are dominated by long input contexts. In this work, we propose Caveman Compression, a simple, training-free method for reducing input length while preserving downstream performance. Our approach uses a masked language model (MLM) to estimate token predictability and selectively removes highly predictable tokens, while protecting factual anchors such as named entities, numbers, dates, and compound nouns. This yields compressed prompts that remain semantically faithful but are shorter and cheaper to process. We evaluate Caveman Compression on question answering style benchmarks using multiple LLMs, measuring both answer quality and effective token savings. Across tasks, the method achieves substantial input length reductions (e.g., 30–50% fewer tokens) with only minor drops in accuracy, and in some settings matches the performance of the full input. Because it requires no additional training or model modification, Caveman Compression can be easily integrated into existing LLM pipelines to reduce inference cost and latency.

Zenodo (CERN European Organization for Nuclear Research)
Openalex Percentile: Top 20%
Topic Modeling
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Caveman Compression: MLM-Guided Token Removal for Reducing LLM Inference Costs · Zenodo (CERN European Organization for Nuclear Research) (2025) | TGRS Research Map | TGRS