ICLR 2024 Study Finds Language Models Can Compress Text, Images, and Audio

Hacker NewsHacker News·Original
Operator Bae ChangHyun

Key point

In 1GB tests, Chinchilla 70B compressed ImageNet and LibriSpeech to 48.0% and 21.0% of original size, below PNG’s 58.5% and FLAC’s 30.9%.

Details

  • The ICLR 2024 paper Language Modeling Is Compression argues that sequence prediction and lossless compression are two views of the same process: arithmetic coding turns a model’s predicted probabilities into code lengths, while a compressor’s code lengths can define predictions.
  • On 1GB enwik9/ImageNet/LibriSpeech datasets, Chinchilla 70B’s raw compressed-to-original-size rates were 8.3%/48.0%/21.0%; Llama 2 7B’s were 8.9%/53.4%/23.1%. Baseline rates in the same dataset order: gzip 32.3%/70.7%/36.4%; LZMA2 23.0%/57.9%/29.9%; PNG 42.9%/58.5%/32.2%; FLAC 89.5%/61.9%/30.9%.
  • Counting model storage changes the result: with float16 weights counted as 2 bytes per parameter, Chinchilla 70B’s adjusted rates were 14008.3%/14048.0%/14021.0%. The paper says foundation models may need datasets on the order of terabytes or more to achieve non-trivial adjusted compression rates.
  • Model size has a data-dependent optimum. On enwik9, enwik8-trained models of 200K/800K/3.2M parameters had raw rates of 30.9%/21.7%/17.0%. When model storage is included, larger models can worsen adjusted compression rates on smaller datasets.

Cross-modal and in-context results

  • Table 1 reports Chinchilla 70B raw rates of 48.0% for ImageNet and 21.0% for LibriSpeech, compared with PNG at 58.5% for ImageNet and FLAC at 30.9% for LibriSpeech.
  • In-context compression rates, averaged over 100 sequences, generally improved as sequence length increased. Chinchilla 1B had the best rates across all three modalities and tested sequence lengths.

Tokenization and evaluation limits

  • On enwik9, ASCII rates for 200K/6.4M/38M models were 22.9%/13.6%/6.4%. BPE rates in the same model-size order were: 1K vocabulary, 25.4%/14.8%/6.9%; 2K, 25.6%/15.7%/7.4%; 5K, 23.1%/17.1%/8.7%; 10K, 21.3%/17.0%/8.9%; 20K, 19.3%/16.4%/9.0%. Larger vocabularies shorten sequences but make next-token prediction harder; they tended to help smaller models and hurt larger ones.
  • The Transformer context was 2048 tokens; the enwik8-trained model used 1 byte per token and pretrained models used 4. Longer streams were evaluated in 2048-byte chunks without prior-chunk history. Image patches were 32×64 grayscale pixels, with one byte per pixel; LibriSpeech data consisted of 16-kHz English speech divided into 2048-byte chunks.
  • Compression-based generation was a qualitative test, not evidence that compression guarantees good generation: the image samples were incoherent overall, and errors accumulated over longer outputs.

This summary was generated automatically by AI. Check the original for the author's claims and context. Copyright belongs to the original author.

Our guide explains how the AI works. Report summary errors, attribution issues, or removal requests via Contact.