• Bezier@suppo.fi
        link
        fedilink
        English
        arrow-up
        4
        ·
        7 months ago
        1. Compress file
        2. Edit the prompt to “die hard 4k h265”
        3. Decompress
        4. Free movie

      • fluxion@lemmy.world
        link
        fedilink
        English
        arrow-up
        2
        ·
        7 months ago

        Vid was basically you playing with a cat so it got replaced with a token to fetch some stock footage of someone playing with a cat when you decompress.

  • andallthat@lemmy.world
    link
    fedilink
    English
    arrow-up
    5
    ·
    edit-2
    7 months ago

    I tried reading the paper. There is a free preprint version on arxiv. This page (from the article linked by OP) also links the code they used and the data they tried compressing, in the end.

    While most of the theory is above my head, the basic intuition is that compression improves if you have some level of “understanding” or higher-level context of the data you are compressing. And LLMs are generally better at doing that than numeric algorithms.

    As an example if you recognize a sequence of letters as the first chapter of the book Moby-Dick you’ll probably transmit that information more efficiently than a compression algorithm. “The first chapter of Moby-Dick”; there … I just did it.

  • skip0110@lemm.ee
    link
    fedilink
    English
    arrow-up
    4
    ·
    7 months ago

    This is not new knowledge and predates the current LLM fad.

    See the Hutter prize which has had “machine learning” based compressors leading the ranking for some time: http://prize.hutter1.net/

    It’s important to note when applied to compressors, the model does produce a code (aka encoding) that exactly reproduces the input. But on a different input the same model is unlikely to produce an impressive compression.

  • AbouBenAdhem@lemmy.world
    link
    fedilink
    English
    arrow-up
    4
    ·
    edit-2
    7 months ago

    The basic idea behind the researchers’ data compression algorithm is that if an LLM knows what a user will be writing, it does not need to transmit any data, but can simply generate what the user wants them to transmit on the other end

    Great… but if that’s the case, maybe the user should reconsider the usefulness of transmitting that data in the first place.

  • futatorius@lemm.ee
    link
    fedilink
    English
    arrow-up
    3
    ·
    7 months ago

    Where I work, we’ve been looking into data compression that’s optimized by an ML system. We have a shit-ton of parameters, and the ML algorithm compares the number of sig figs in each parameter to its byte size, and truncates where that doesn’t cause any loss of fidelity. So far, it looks promising, really good compression factor, but we still need to do more work on de-skilling the decompression at the receiving end.

    I wouldn’t have thought LLM was the right technology to use for something like this.

  • Alphane Moon@lemmy.world
    link
    fedilink
    English
    arrow-up
    3
    ·
    edit-2
    7 months ago

    I found the article to be rather confusing.

    One thing to point out is that the video codec used in this research (but for which results weren’t published for some reason), H264, is not at all state of the art.

    H265 is far newer and they are already working on H266. There are also other much higher quality codecs such as AV1. For what it’s worth, they do reference H265, but I don’t have access to the source research paper, so it’s difficult to say what they are comparing against.

    The performance relative to FLAC is interesting though.

  • besselj@lemmy.ca
    link
    fedilink
    English
    arrow-up
    1
    ·
    7 months ago

    So if I have two machines running the same local LLM and I pass a prompt between them, I’ve achieved data compression by transmitting the prompt rather than the LLM’s expected response to the prompt? That’s what I’m understanding from the article.

    Neat idea, but what if you want to transmit some information that an LLM can’t tokenize and generate accurately?

  • xep@fedia.io
    link
    fedilink
    arrow-up
    1
    ·
    7 months ago

    If this really is lossless, it is incredible. I’m skeptical until I see it in action though.

    • MudMan@fedia.io
      link
      fedilink
      arrow-up
      2
      ·
      7 months ago

      Lossless is the big claim that nobody is fixating on because “AI” discussions only ever run one set of talking points.

      I get how semantic understanding would trade performance for file size when doing compression. I don’t get how you can deterministically use it to always get the exact same complete output from a partial input. I’d love to go over the full paper. And even then the maths would probably go way, way over my head.

      • barsoap@lemm.ee
        link
        fedilink
        English
        arrow-up
        0
        ·
        7 months ago

        So… crystal ball, I don’t have access to the paper either. Think arithmetic coders as neural nets are function approximators. You send an initial token and the NN will start to generate deterministically, once you detect a divergence from the lossless ideal you send another token to put it on track again. Make it a sliding window so things don’t become too computationally expensive. You architect the model not to be smart but to need little guidance following “external reasoning” so to speak.

        The actual disadvantage of this kind of thing will be the model size, yes you might be able to transmit a book in a kilobyte (100x or more compression) but both encoder and decoder will need access to gigabytes of neural weights, and that’s just for text. It’s also not going to be computationalliy cheap, though probably cheaper than PAQ.

        • MudMan@fedia.io
          link
          fedilink
          arrow-up
          0
          ·
          7 months ago

          Trading processing power for size is a thing. I guess it depends on application and implementation. Well, and on the actual size of the models required.

          It’s one of those things that makes for a good headline, but then for usability it has to be part of a whole conversation about whether you want to spend the bandwidth, the processing power on compression, the processing power on real time upscaling, the processing power on different compression tools, something else or a mix of the above.

          I suppose at some point it’s all “benchmarks or it didn’t happen” for these things. And when it comes to ML benchmarks are increasingly iffy anyway.

  • Harlehatschi@lemmy.ml
    link
    fedilink
    English
    arrow-up
    0
    ·
    7 months ago

    Ok so the article is very vague about what’s actually done. But as I understand it the “understood content” is transmitted and the original data reconstructed from that.

    If that’s the case I’m highly skeptical about the “losslessness” or that the output is exactly the input.

    But there are more things to consider like de-/compression speed and compatibility. I would guess it’s pretty hard to reconstruct data with a different LLM or even a newer version of the same one, so you have to make sure you decompress your data some years later with a compatible LLM.

    And when it comes to speed I doubt it’s nearly as fast as using zlib (which is neither the fastest nor the best compressing…).

    And all that for a high risk of bricked data.

    • modeler@lemmy.world
      link
      fedilink
      English
      arrow-up
      0
      ·
      7 months ago

      I’m guessing that exactly the same LLM model is used (somehow) on both sides - using different models or different weights would not work at all.

      An LLM is (at core) an algorithm that takes a bunch of text as input and produces an output of a list of word/probabilities such that the sum of all probabilities adds to 1.0. You could place a wrapper on this that creates a list of words by probability. A specific word can be identified by the index in the list, i.e. first word, tenth word etc.

      (Technically the system uses ‘tokens’ which represent either whole words or parts of words, but that’s not important here).

      A document can be compressed by feeding in each word in turn, creating the list in the LLM, and searching for the new word in the list. If the LLM is good, the output will be a stream of small integers. If the LLM is a perfect predictor, the next word will always be the top of the list, i.e. a 1. A bad prediction will be a relatively large number in the thousands or millions.

      Streams of small numbers are very well (even optimally) compressed using extant technology.