arXiv:2611.05871cs.ITNov 2026

Manuscript Offprint

arXiv:2611.05871

The Invocation Bottleneck in LLM-Based Lossless Compression: What Can Be Removed and What Must Be Traded

Zhe Yan, Yihao Liu, Antonio Boffa, Huanchen Zhang

Zhe Yan

Xidian University

China

Angie.zheyan@gmail.com

Yihao Liu

Tsinghua University

China

liuyihao24@

mails.tsinghua.edu.cn

Antonio Boffa

EPFL

Switzerland

antonio.boffa@epfl.ch

Huanchen Zhang*

Tsinghua University

China

huanchen@tsinghua.edu.cn

Abstract

Large language models (LLMs) compress text far better than classical compressors, but LLM-based compressors are slow, particularly during decompression. We argue that their decoding time has two fundamentally different sources. Execution redundancy, such as per-token host transfers, CPU-side coding, and token-by-token encoding, is work that the coded output does not require and can be removed without changing a single output bit. Sequential dependency, one model call per decoded token, is inherent to lossless decoding and cannot be removed by better execution, only traded for more calls or for more bits. We remove execution redundancy with a GPU-resident pipeline whose block-parallel encoding is made lossless in half precision by batch-invariant kernels, speeding up arithmetic coding by up to 5.8× in encoding and 3.0× in decoding without changing its compression rate. We then study the two ways of trading sequential dependency, speculative dual-model coding (SDMC) and multi-token single-model coding (MSMC), characterize the compression cost of predicting several tokens from a shared prefix, and identify the workloads in which fewer model calls are worth that cost.

Artifact Availability: The source code, data, and other artifacts are available at https://github.com/Angie-Yan/LLM-based-Data-Compression.

1 Introduction

Data compression is fundamentally a problem of density estimation paired with entropy coding [50]: the more accurately a probabilistic model predicts upcoming symbols, the closer the resulting bitstream approaches the entropy of the source. Early learned compressors relied on lightweight statistical models or compact recurrent networks [8, 34], whose limited modeling capacity kept their compression rates well above the entropy of natural language and structured text. Large language models (LLMs) change this picture: as highly expressive next-token predictors, they make the long-standing observation that language modeling is compression [19] directly usable in practice.

LLM-based compression is increasingly relevant to long-lived archival storage, including source-code repositories, historical data-lake partitions, high-density system logs, and scientific datasets. These environments retain data for extended periods while still requiring reasonably fast access. In these settings, the one-time compute cost of compression, and of adapting auxiliary components to a data domain, can be amortized over a long retention period and over all data of that domain. Furthermore, modern data

platforms increasingly use GPUs for both analytical processing and AI inference [32]. Where such accelerators and models are already deployed, reusing them for storage operations such as decompression lowers the marginal cost of LLM-based compression, turning it from a dedicated compute expense into a plausible use of existing capacity.

LLM-based compressors pair the model's conditional probabilities P(ti∣t<i)P(t_i \mid t_{<i}) with an entropy coder, most commonly Arithmetic Coding (AC) [47, 58], as in [19, 42, 55], and reach compression rates well beyond traditional compressors such as gzip [20], zstd [14] and xz [15], the strongest of which in our evaluation is xz. Their weakness is speed. A recent economic analysis [33] concludes that, at current prices, their compute cost takes years to amortize, and follow-up work [2] shows that in the compression direction, arithmetic coding rather than model inference is the main bottleneck. Decompression is harder to accelerate, because each token's distribution depends on the tokens decoded before it. Our profiling of the public implementation accompanying [33] shows that here, too, inference is not the only cost: on our hardware, it decodes Wikipedia text at 14.3 KB/s, and CPU-side arithmetic coding together with copying each probability vector to the host accounts for about two thirds of decode time.

We argue that decoding time in LLM-based compression has two fundamentally different sources, which call for different treatment. Execution redundancy is work that the coded output does not require: transferring a full probability vector to the host for every token, building cumulative distributions on the CPU, and encoding token by token although the encoder knows the whole input. It can be removed without changing a single output bit. Sequential dependency is inherent to lossless decoding: the decoder cannot evaluate a token's distribution before it has recovered the preceding tokens. With a fixed model, it cannot be removed by better execution, only traded. Sequential calls can be made cheaper for some tokens by delegating them to a second and smaller model, although every token still requires one sequential call. Alternatively, calls can be made fewer by coding several tokens from a shared prefix; for coders that predict each offset independently, this costs bits, only part of which better predictors can recover.

We study both limits on a common backbone, the same evaluation files, and a byte-exact losslessness requirement. For execution redundancy, we build a GPU-resident coding pipeline that encodes whole blocks by teacher forcing and keeps vocabulary-sized work on the GPU, and we make it lossless in half precision with batch-invariant kernels [28], which give encoder and decoder bit-identical predictions although they call the model with different shapes. We pair the pipeline with arithmetic coding and with Rank-Tier Coding, a simple fixed-length rank code in the spirit of prior rank-based

*Also affiliated with the Shanghai Qi Zhi Institute. Corresponding author.

Figure

Figure 1: Compression rate (as 1/bpb, higher is better) versus decode throughput, averaged over Wiki and Code (Qwen2.5-0.5B [46], FP16, B=256). Removing execution redundancy speeds up arithmetic coding without changing bpb; resolving more tokens per call (MSMC) trades bpb for further decode throughput.

schemes [51, 55], which we use as a low-cost reference point to measure how much the choice of coder still matters. For sequential dependency, we evaluate one representative design for each way of paying, as a probe of the trade-off rather than a replacement for token-by-token decoding: speculative dual-model coding (SDMC), which keeps full conditioning and pays in calls, and multi-token single-model coding (MSMC), which reduces calls and pays in bits. Our individual components build on existing techniques, namely batch-invariant kernels [28], rank-based coding, speculative decoding [35], and multi-token heads [10]; the contribution lies in making them lossless and composable in a compression pipeline and in characterizing what each gains and costs. Figure 1 summarizes the resulting operating points.

Our contributions are as follows. First, we separate decoding time into execution redundancy, which can be removed without changing the output, and sequential dependency, which can only be traded for calls or for bits, and show where each dominates (Section 2). Second, we apply batch-invariant kernels [28] to make block-parallel encoding lossless in half precision, and build a GPU-resident pipeline that removes redundancy from decoding as well. With the same model and probabilities, arithmetic coding becomes 4.4–5.8× faster for encoding and 2.3–3.0× faster for decoding; entropy coding then takes under 3% of decode time, so any faster coder could add at most about 10% (Sections 3 and 6.3). Third, for multi-token coders that predict each offset independently from a shared prefix, we identify a code-length overhead set by the information lost between offsets, and show that per-offset code lengths account for the measured compression loss of 2–3× at n=6 (Sections 2.2 and 6.4). Keeping full conditioning with a draft model instead saves little decode time and halves encode throughput (Section 6.6). Finally, we model and validate both sides of the multi-token trade-off: fewer calls pay off when decoding is latency-bound, with a 5.7× speedup for single-stream decoding, but much less at large batch sizes, where batching already fills the GPU (Section 6.5). The best LLM-based operating points produce output 2.4–2.7× smaller than

xz-9, while remaining far slower. We release our implementation, including the batch-invariant kernels.

Section 2 analyzes where decoding time goes and states the two limits. Section 3 removes execution redundancy. Sections 4 and 5 study the two ways of trading sequential dependency, SDMC and MSMC. Section 6 evaluates them, Section 7 discusses related work, and Section 8 concludes the lessons and open directions.

References (25)