arXiv:2610.22179cs.LGOct 2026

Manuscript Offprint

arXiv:2610.22179

LCT: Losslessly Compressed Tensors with GPU friendly execution for Training

Max Zhu, Bohang Sun, Pietro Lio, Jialin Yu

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

ABSTRACT

Lossless tensor compression could reduce memory usage during training, but training requires tensors to be repeatedly re-encoded. We introduce Losslessly Compressed Tensors (LCT), a GPU execution framework designed for this repeated encode–decode regime. LCT exploits the natural redundancy in floating point data to reduce storage for weights, activations and optimizer states. Highly optimized GPU kernels implement Huffman coding with precomputed codebooks for low compression and decompression overhead, essential for training. Our analysis characterizes LCT’s storage costs and adaptation to magnitude shifts. LCT achieves a compression ratio of up to 1.455×1.455\times, and is demonstrated in training and finetuning settings. On a 162M-parameter NanoGPT, LCT reduces memory usage by 24.6% for a 7.2% step-time increase. In Qwen3-4B fine-tuning, LCT saves up to 23.8% of peak memory, enabling a 3.5X larger context length in training on the same GPU.

1 Introduction

Memory is a limiting factor in training large language models (LLMs), larger models and longer sequence lengths have increased memory requirements. Weights, optimizer buffers and transient activation caches all consume memory. Although a slower device can be compensated for with longer training, a memory limitation is much more difficult to overcome. Offloading storage to the CPU (Rhu et al., 2016; Ren et al., 2021), or even NVMe (Rajbhandari et al., 2021) allows for larger models, but can easily suffer from IO bottlenecks.

The dominant methods to tackle this trade off accuracy for storage. Low precision training datatypes such as FP8 (Micikevicius et al., 2022) and FP4 (Chmiel et al., 2025) use fewer bits per value. However, intermediate activations and caches still use higher precision to ensure numerical stability and hardware support is limited to the most modern hardware. Activation quantization has been explored down to 2 bits per value in ActNN (Chen et al., 2021), while other methods exploited the low rank nature of activations (Shamshoum et al., 2025). Optimizer states have been quantized to 8 bits (Dettmers et al., 2022). 3-4 bit weight quantization methods such as GPTQ (Frantar et al., 2023) and AWQ (Lin et al., 2024) are widely adopted for inference. These methods are designed to minimise accuracy loss, but are not entirely lossless and require careful tuning to avoid accuracy degradation.

Lossless compression is an alternative. Gist (Jain et al., 2018) applies lossless compression to ReLU activations, but is not universally applicable. General methods have been developed to take advantage of compression for inference (Zhang et al., 2025; Hershcovitch et al., 2025; Guo and Joshi, 2026; Fan et al., 2026). However, these methods have not been applied for training. Unlike inference, weights and optimizer states are updated every step, and activations must persist between the forward and backward pass. Table 1 summarizes these lifetimes and the corresponding operations for an SGD-momentum (SGDM) step. Existing methods for lossless compression offer fast decoding speeds, but are too slow to encode (Table 4). Training turns lossless compression into a repeated encode–decode problem rather than a decode-centric one. Figure 2 illustrates this distinction.

Preprint, under review.

Code and package: https://github.com/Maxzhu123/Losslessly_Compressed_Tensors.

†^{\dagger}Corresponding author: Max Zhu (mz406@cam.ac.uk).

Figure

Figure 1: Overview of LCT. Sign-mantissa bytes remain unchanged while exponents are encoded with bounded Huffman codes with escapes for rare values. Values are packed into fixed sized streams with overflow buffers. Tensors are decoded losslessly, with fused kernels for optimizer updates.

We introduce Losslessly Compressed Tensors (LCT) (Figure 1). Designed for high performance on GPU hardware, LCT losslessly compresses the exponents of Bfloat16 (BF16) values to reduce memory usage during training. Fused pointwise operators are introduced for optimizers with compressed buffers, while a shared GPU buffer removes host synchronization during training. PyTorch autograd integration compresses cached activations. The tensors remain compressed until they are needed, at which point they are decompressed on-demand.

Our contributions are:

• A lossless BF16 codec and training integration, including GPU Triton kernels, fused pointwise updates, and a preallocated buffer.

• An analysis of coding and allocated storage costs under model mismatch, together with bounds explaining how exponent centering compensates for magnitude changes during training.

• An evaluation spanning codec throughput, fused operators, and training memory. LCT encodes 2.38×2.38\times faster than the next-fastest evaluated codec on an RTX 3090 and reduces peak memory by over 20% in training and fine tuning applications.

Figure

Figure 2: Compression use cases ordered by increasing encode-bandwidth requirement. Static inference weights amortize encoding across repeated use; autoregressive KV caches add entries at each token; general tensor compression must accommodate frequent updates. The ordering is qualitative and reflects these access patterns, rather than measured throughput.

Table 1: Tensor lifecycle and LCT codec operations per SGD-with-momentum step, after momentum initialization. The weight row covers MLP and other layer weights, assuming one dense use in forward and one in backward. Encodes include output recompression. Dense decodes materialize a tensor; fused decodes consume it within an update. Counts describe logical operations, not kernel launches.

TensorEncodesDense decodesFused decodesUses and lifetime
Weights W121Forward and backward computation; fused W←W−ηMW \leftarrow W - \eta M. Persist across steps.
Biases000Kept dense because they are small; updated with dense operations.
Momentum M102Fused M←βM+GM \leftarrow \beta M + G, then fused W←W−ηMW \leftarrow W - \eta M. Persists across steps.
Activations110Activations are encoded in forward and decoded for gradient computation in backward.

References (82)