Hacker News

Top stories

Live mirror
30 storiesupdated just nowView source snapshot
  1. Can gzip be a language model?(nathan.rs)
    26comments
  2. MiMo v2.6(xiaomi.com)
    392comments
  3. Spymarks, Not Watermarks(brand.io)
    101comments
  4. Attention is all you have(alicegg.tech)
    228comments
  5. Transformers Explained Visually(poloclub.github.io)
    62comments
  6. What Sun got wrong(dtrace.org)
    330comments
  7. MiMo-v2.6-Pro: Intelligence, Performance and Price Analysis(artificialanalysis.ai)
    9comments
  8. I don't want to read what you didn't write(colinbreck.com)
    241comments
  9. AI coding has made CI a bottleneck, so we reworked ours to keep up(linear.app)
    246comments
  10. Looking forward to Git 2.56 – and 3.0(lwn.net)
    49comments
  11. NASA’s Mars Sample Return mission is dead(science.org)
    318comments
  12. Engineering Memory: On learning to memorize first 100 digits of pi (2024)(gregorygundersen.com)
    6comments
  13. Divide by depth for instant 3D(gabrieloc.com)
    24comments
  14. World Wide Words(worldwidewords.org)
    1comments
  15. PDF Forgeries Are Surprisingly Rare (2022)(gwern.net)
    28comments
  16. The Advisory Group on Mathematics and Artificial Intelligence(terrytao.wordpress.com)
    63comments
  17. Claude Status – Elevated errors for multiple models(claude.com)
    75comments
  18. Socrates vs. the Written Word (2011)(wondermark.com)
    17comments
  19. How do traffic signals work? (2019)(practical.engineering)
    60comments
  20. Python Workers are now generally available(cloudflare.com)
    38comments
  21. What It's Like to Work in One of America's Data Centers(wsj.com)
    1comments
  22. HERMES radio enables voice and data communication over vast distances(ieee.org)
    58comments
  23. Frontier AI on Your Own Hardware(timdettmers.com)
    77comments
  24. Grok 4.7(x.ai)
    481comments
  25. Apple Copland D11E4 Booting in the Browser(pagetable.com)
    39comments
  26. Turn off and restrict access to Apple Intelligence features on Mac(support.apple.com)
    195comments
  27. More floating point alternatives(wizardzines.com)
    22comments
  28. First Shader from Zero in Godot 4(gdquest.com)
    8comments
  29. Why does mathmain need an encrypted loader?(safedep.io)
    37comments
  30. Used ThinkPad Buyer's Guide (2019)(bobble.tech)
    discuss

Can gzip be a language model?

79 pointsby 2h agonathan.rs
27 comments
1h agoHN ↗

This tracks perfectly with Winrar being more profitable than OpenAI... coincidence? I think not!

53m agoHN ↗

winrar is profitable? sure? well, on the other hand, they sure don't make losses

15m agoHN ↗

They're one of the few companies that actually manage to sell "boxed software" (i.e. has not changed much in years but new customers keep buying it)

That said, Windows users should use 7-Zip. Better compression format, unpacks more kinds of archives

14m agoHN ↗

That’s surprising. Seems there is a niche for everything.

1h agoHN ↗

    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?

10m agoHN ↗

That's a fair question. Suppose we have a way to find a byte sequence x that globally minimises len(gzip(context + prompt + x)) over all sequences x of length n. Here + denotes string concatenation.

It's unclear if this is very useful.

The reason it may not be very useful is that one of Deflate's ingredients is a pass that replaces repeated substrings with backreferences to the earlier occurrence in the plaintext input stream.

E.g. suppose we want to find an n=200 byte sequence x that minimises len(gzip(context+prompt+x)).

If there exists any 200 byte sequence y such that prompt+y is a substring of context, then Deflate can encode prompt+y as a backreference to that earlier sequence - it needs to store a match-length & a distance-length, encoded using its Huffman trees. This candidate solution y may not be a global minima to our stated objective function, but if not, it's probably going to be a very good near-optimal approximate solution.

Taking a step back, repeating huge chunks of the input context produces something that's great for minimising compressed output size but doesn't seem particularly helpful as a generative model.

51m agoHN ↗

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.

48m agoHN ↗

Perhaps a better question is if LLMs are used as compressors, how well is that expected to work.

38m agoHN ↗

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/

41m agoHN ↗

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.

33m agoHN ↗

Match-finding does not need to be quadratic. However, truly optimal gzip block splitting is very slow, indeed.

19m agoHN ↗

I'll concede the window part, but Gzip runs within the physical confines of a single cpu core and is typically entirely resident in local caches. The point is not just the quadratic scaling but also what it scales with.

Show me an LLM that can run at 300 megabytes per second. Even dedicated ASICs with weights burned in will never move this fast.

16m agoHN ↗

I agree, but also equating LLMs with intelligence is wrong.

37m agoHN ↗

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)?

33m agoHN ↗

Top contestant in the Hutter Prize uses a neural network for compression. So fair to say, LLMs would perform pretty well compared to gzip.

10m agoHN ↗

Even ignoring speed per GP, the Hutter Prize's metric includes the size of the decompressor. LLMs would be disqualified for being larger than 1GB.

21m agoHN ↗

Interesting approach, I wonder how this could be used as a classifier. :)

14m agoHN ↗

I've used LZO as a spam classifier on chat. Spam tends to be very content-less and repetitive...

19m agoHN ↗

This is fun, but historically people have gone a bit overboard with saying that models like this, or n-gram language models, are anywhere close to large neural network models. There is certainly a connection though.