atlas

Research map / Large language models / Language, safety and interpretability

Language Models as Zero-shot Lossless Gradient Compressors: Towards General Neural Parameter Prior Models

NeurIPS 2024 · Large language models › Language, safety and interpretability · approach: LLM pruning and scaling data · 0 citations (OpenAlex)

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Proposes LM-GC, which serializes 32-bit gradients into hexadecimal text with separators and uses a frozen pretrained LLM's token probabilities in arithmetic coding for zero-shot lossless gradient compression.

Problem

Lossless compression of neural network gradients for distributed/federated learning, which needs a good probability model of high-dimensional, structured gradient data; existing codecs are designed for other modalities.

Approach

Use off-the-shelf pretrained LLMs (zero-shot, no weight updates) as priors for arithmetic coding over gradients converted into grouped hexadecimal text with separators, which better matches the floating-point structure and tokenization LLMs understand.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Use LM-GC with Tinyllama 1.1B and hexadecimal serialization with spaces instead of the strongest traditional codecCIFAR-10 ConvNet gradients · CIFAR-10 ConvNetcompression rate (%): 41.26±0.8 -> 38.83±0.4Helped
Add hexadecimal formatting and spaces instead of using ISO-8859-1 (ablation)LM-GC with LLAMA 2 7B · CIFAR-10 ConvNetcompression rate (%): 109.07±0.2 -> 32.26±0.5Helped
Add spaces as separators to hexadecimal serialization (ablation)LM-GC with LLAMA 2 7B · CIFAR-10 ConvNetcompression rate (%): 72.10±0.5 -> 32.26±0.5Helped
Use a larger language model (ablation)LM-GC · CIFAR-10 ConvNetcompression rate (%): 117.38±0.0; 71.85±0.2; 109.07±0.2Helped
Use hexadecimal serialization with spaces instead of no separators (ablation)LM-GC with Tinyllama 1.1B · CIFAR-10 ConvNetcompression rate (%): 36.30±0.8 -> 38.83±0.4Mixed
Use hexadecimal serialization with spaces instead of no separators (ablation)LM-GC with Tinyllama 1.1B · CIFAR-10 VGG-16, ResNet-18 and ViTcompression rate (%)Helped
Increase the context window size (ablation)LM-GC with LLAMA 2 7B · Gradient compressioncompression rate (%)Helped
Group bytes using BPG 1, 2 or 4 rather than BPG 3 or no grouping (ablation)LM-GC with Tinyllama and LLAMA 2 · Gradient compressioncompression rate (%)Helped
Use smaller bytes-per-group settings, which add separators (ablation)LM-GC · Gradient compressioncomputation overheadHurt
Add LM-GC after quantization or sparsificationGradient compression pipeline · Quantization and sparsification settingscompression rateHelped
Apply run-length encoding instead of LM-GCConvNet gradients · TinyImageNetcompression rate (%): 450.28±0.3; 278.08±0.2; 198.57±0.0; 71.90±0.0Hurt

Surprising findings

Limitations

Experimental setup

Datasets: MNIST CIFAR-10 TinyImageNet

Benchmarks: CIFAR-10 gradients MNIST gradients TinyImageNet gradients

Metrics: compression rate (%) token count

Baselines: PNG FLAC GZIP LZMA FPZIP CABAC run-length encoding SignSGD

Builds on: arithmetic coding Torchac

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy