ZipServ: Fast and Memory-Efficient LLM Inference with Hardware-Aware Lossless Compression

Ruibo Fan, Xiangrui Yu, Xinglin Pan, Zeyu Li, Weile Luo, Qiang Wang, Wei Wang, Xiaowen Chu

TL;DR

ZipServ is a hardware-aware lossless compression framework for LLMs that achieves up to a 30% reduction in model size while actually speeding up inference. By replacing traditional variable-length entropy coding with a fixed-length bitmap format (TCA-TBE) and fusing decompression directly into Tensor Core registers (ZipGEMM), it eliminates the parallelism and memory bottlenecks that have historically plagued lossless GPU decoding.

What Problem Does This Paper Address?

Large Language Model (LLM) inference is heavily bottlenecked by memory capacity and bandwidth, particularly during the token-generation (decode) phase. While lossy compression methods like quantization (e.g., INT4) reduce memory footprints, they risk degrading model accuracy in safety-critical or complex reasoning scenarios.

Lossless compression guarantees bit-exact accuracy, but it has traditionally been restricted to storage or training because it severely slows down inference. The authors identify two core mismatches between traditional lossless compression and GPU architectures:

  1. Kernel-level mismatch: Traditional entropy codecs (like Huffman or ANS) produce variable-length bitstreams. Decoding them requires sequential, data-dependent operations that break the Single Instruction, Multiple Threads (SIMT) lockstep execution of GPU warps, causing massive thread divergence.
  2. System-level mismatch: Existing pipelines are decoupled—weights must be fully decompressed into global memory before being passed to compute kernels. This creates redundant, high-latency memory traffic that wipes out any bandwidth savings.
Figure 1. Execution time of lossless compression pipelines on NVIDIA L40S GPU with GateUp_Proj layers.

Methods

ZipServ introduces a hardware-aware algorithm-kernel co-design consisting of three main pillars:

  • Tensor-Core-Aware Triple Bitmap Encoding (TCA-TBE): Instead of variable-length codes, ZipServ exploits a property called exponent contiguity (where the most frequent exponents are numerically consecutive). It maps the top-7 consecutive exponents to fixed-length 3-bit codewords, using 000 as a fallback for outliers. For every $8 \times 8$ weight tile, these 3-bit codes are split into three independent 64-bit bitmaps (bit-planes). This structure ensures coalesced memory access and enables branch-free, parallel decoding via simple bitwise operations.
  • ZipGEMM (Fused Decompression-GEMM Kernel): Adopting a "load-compressed, compute-decompressed" paradigm, ZipGEMM bypasses global memory materialization entirely. It streams compressed weights directly from DRAM and decompresses them on-the-fly inside the register files that feed the GPU's Tensor Cores. It utilizes a fine-grained, two-level software pipeline to overlap memory loading, decompression, and matrix multiplication.
  • Stage-Aware Inference Strategy: ZipServ dynamically adapts its pipeline based on the inference phase. During the compute-bound prefill phase, it uses decoupled decompression because the high arithmetic intensity easily amortizes the overhead. During the memory-bound decode phase, it switches to the fused ZipGEMM kernel to maximize memory bandwidth efficiency.

Datasets

The framework was evaluated using real weight matrices extracted from a diverse set of leading open-source LLM families across various parameter scales:

  • LLaMA3.1 (8B, 70B, 405B)
  • Qwen2.5 (7B, 14B, 32B, 72B)
  • Gemma3 (12B, 27B)
  • Mistral (24B, 123B)

No new datasets or benchmarks were introduced; the focus was entirely on accelerating standard, state-of-the-art models.

Key Insights and Ideas

  • Exponent Contiguity is an Intrinsic LLM Property: The authors mathematically prove and empirically verify that the exponent fields of BF16 weights in modern LLMs are highly skewed and contiguous. For instance, the top-7 exponents cover over 95% of weights. This means complex Huffman trees can be replaced by simple base-plus-offset arithmetic.
  • Trading ALU for Bandwidth is a Winning Bet on Consumer GPUs: ZipServ deliberately introduces integer ALU operations (like __popc and bitwise ORs) to decode weights on-the-fly. On memory-bound consumer GPUs (like the RTX 4090 or 5090), this extra compute is completely hidden behind memory stall times, resulting in a net performance gain.
  • Fusing Decompression into Registers is Critical: Previous lossless methods failed because they materialized decompressed weights back into global memory. Fusing the decompression directly into the Tensor Core register file is what unlocks actual wall-clock speedups.
Highly skewed exponent bit distribution in Mistral-24B.

Key Results

  • Storage & Memory Savings: ZipServ reduces static weight footprints by up to 30% (e.g., shrinking LLaMA3.1-8B from 14.96 GB to 11.18 GB). The freed 3.78 GB is automatically repurposed to expand KV cache capacity by 1.70×.
  • Kernel Performance: The fused ZipGEMM kernel achieves up to 2.21× speedup over NVIDIA’s highly optimized cuBLAS on an L40S GPU, and up to 5.53× speedup over DFloat11 (the fastest prior lossless baseline).
  • End-to-End Acceleration: When integrated into vLLM, ZipServ delivers an average end-to-end throughput speedup of 1.22× (and up to 1.66× for long-context generation with large batch sizes).

Limitations and Future Work

  • Hardware Specifics: ZipServ is highly optimized for memory-bound, high-core-frequency consumer or inference-optimized GPUs (RTX 4090/5090, L40S). On training-oriented datacenter GPUs with massive HBM bandwidth but lower core clocks (like the A100 or H800), the intensive ALU decoding workload is harder to hide, meaning ZipGEMM sometimes trails the ultra-optimized cuBLAS baseline.
  • Small Layer Overhead: For layers with small shapes (like O_proj in smaller models), ZipGEMM can experience minor slowdowns because it requires fine-grained parameter tuning to fully saturate the hardware.
  • Future Directions: The authors plan to extend this bitmap-based compression framework to lossless KV cache compression, adapt it to other hardware architectures (like Intel AMX or AMD Matrix Cores), and apply it to model checkpointing and distributed training communication.

Summary updated

BibTeX
@misc{fan2026zipserv,
  author = {Ruibo Fan and Xiangrui Yu and Xinglin Pan and Zeyu Li and Weile Luo and Qiang Wang and Wei Wang and Xiaowen Chu},
  title = {{ZipServ: Fast and Memory-Efficient LLM Inference with Hardware-Aware Lossless Compression}},
  year = {2026},
  eprint = {2603.17435},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2603.17435},
}
Figure