Can gzip be a language model?

(nathan.rs)

58 points | by networked 2 hours ago

5 comments

  • Culonavirus 36 minutes ago
    This tracks perfectly with Winrar being more profitable than OpenAI... coincidence? I think not!
    • wolfi1 22 minutes ago
      winrar is profitable? sure? well, on the other hand, they sure don't make losses
  • tromp 6 minutes ago
    I'm more interested in the converse question: how well does an LLM perform as a compressor, compared to gzip (ignoring its insanely lower speed)?
    • gkbrk 2 minutes ago
      Top contestant in the Hutter Prize uses a neural network for compression. So fair to say, LLMs would perform pretty well compared to gzip.
    • asdfsa32 1 minute ago
      lossless vs lossy is the question.
  • Tornhoof 9 minutes ago
    Previous discussions of that specific page https://news.ycombinator.com/item?id=48557691
  • mg 34 minutes ago

        give it a normal text prompt, and it
        continues that prompt by searching
        for the byte sequences that compress
        best.
    
    One moment, how are we supposed to know how well that search was done? There is no way to search a meaningful part of the search space.

    So the result only gives us some lower bound of how well gzip works as a "plausibility tester" of a continuation of a text. The space of possible sequences is many orders of magnitude larger than what was searched. So there might be sequences in there that compress much better.

    The text mentions beamsearch, but I don't see a discussion about how well beamsearch performs in finding the global optima when it comes to gzip compressibility of a text?

  • bob1029 20 minutes ago
    Not without attention or something approximating it.

    The fact that gzip is relatively fast should be your first clue that something important is missing.

    Gzip is great at predicting the next token for one very specific narrative. LLMs can predict next tokens for entire universes of narratives. Searching for the correct next token across this space scales ~quadratically with the input size. Gzip scales linearly. I can gzip a one terabyte file. Imagine feeding that much into an LLM. These are wildly different animals that happen to overlap in a very small way. Equating compression to intelligence looks increasingly silly to me.

    If we must compare language models to compression, they are much more like jpeg and mp3 than they are gzip and flac. I can go fuck with a jpeg file pretty severely at the bitstream level and still have something resembling performance on the other side. Gzip cannot remotely approach this.

    • Retr0id 9 minutes ago
      > Gzip scales linearly. I can gzip a one terabyte file.

      In part because gzip only has a 32KiB window size, and I think it'd be at least quadratic within that window if you were going for optimal compression.

      • Sesse__ 2 minutes ago
        Match-finding does not need to be quadratic. However, truly optimal gzip block splitting is very slow, indeed.
    • amelius 17 minutes ago
      Perhaps a better question is if LLMs are used as compressors, how well is that expected to work.
      • magicalhippo 7 minutes ago
        > if LLMs are used as compressors, how well is that expected to work

        Quite well. This project[1], by Fabrice Bellard of ffmpeg fame, is quite old in AI years and uses an ancient LLM, but still beats xz by a solid margin.

        [1]: https://bellard.org/ts_zip/

      • Retr0id 8 minutes ago
        Extremely well, aside from speed.
        • bob1029 4 minutes ago
          > aside from speed.

          And energy consumption.