HackerTube English?
← Hacker Paper

HACKER PAPER · 2024 · ICLR 2024

Language Modeling Is Compression

Grégoire Delétang, Anian Ruoss, Paul-Ambroise Duquenne, Elliot Catt, Tim Genewein, Christopher Mattern, Jordi Grau-Moya, Li Kevin Wenliang, Matthew Aitchison, Laurent Orseau, Marcus Hutter, Joel Veness

23 个 HN 账号提及1 个账号明确推荐阅读 HN 评论 ↓

这篇论文在回答什么?

论文把自回归预测与无损编码联系起来:模型给下一单位分配的概率,可以通过算术编码转化为所需的码长。作者在预处理后的文本、图像和音频样本上比较语言模型与传统压缩器,并区分仅算数据输出的压缩率和同时计入模型参数的压缩率。它提供的是理解训练目标与评测口径的办法,并未证明善于压缩就能成为可靠助手。

怎样理解它的贡献

  1. 01

    在论文讨论的算术编码设置下,交叉熵损失与期望码长相连,因此可以从编码长度审视预测目标。

  2. 02

    固定预训练模型的离线压缩实验必须交代输入预处理、上下文长度和编码开销;表中仅算数据的成绩与计入模型体积的成绩回答不同问题。

  3. 03

    模型体积与被压缩数据量共同影响调整后的成绩,更大模型不能在任意数据规模上自动取得更好的总压缩率。

回到原文核对

页码按 PDF 文件从第 1 页计算。跳页是否生效取决于原站阅读器;也可以按章节和短引查找。

minimizing the log-loss is equivalent to minimizing the compression rate
§ 2 · PDF 第 4 页 · ICLR 2024 proceedings查看这一页 ↗
it adds the model size to the log-loss of the data
§ 3.2 · PDF 第 5 页 · ICLR 2024 proceedings查看这一页 ↗

导读依据: ICLR 2024 proceedings ↗

把论文放进一个更大的问题

这些主题把论文与视频中的具体论点放在一起阅读。

Hacker News 评论 23

这里展示已核验、带论文链接的提及,按时间倒序排列,并非某个投稿下的全部评论。推荐、引用与批评分开标注;保留评论原文。

thisIsFiner引用原评论 ↗
This isn't that insane to anyone with old school engineering experience and not abstract thought experiment engineering in the cloud.

Language modeling is compression[1] and all the state to manage the cloud doesn't organically exist, it's added to the system.

We will see huge gains as all the developer middleware is compressed out as nonsense syntax outdated to the task at hand of linking phones and tablets to world models governments control.

Sam Altman was just saying they know best how to use your memory; what they decide is stored in memory is what we all experience.

It's not to store and copy around versions of C and Python and JS. They don't exist organically.

This shit will continue to get whittled down to just the geometric state transforms in memory and on screen just how government agencies decide. It's all electrical state in the machine at the end of the day. The math of machine latent space is what they're recursively self learning towards.[2]

[1] https://arxiv.org/abs/2309.10668

[2] https://arxiv.org/pdf/2605.27734
lotrg引用原评论 ↗
Agree with you, I do

Language modeling is fundamentally compression: https://arxiv.org/abs/2309.10668

The entire endeavor is ultimately fundamentally coupled to reducing compute

Eventually we will compress models further by removing outdated knowledge like Python and Cobol cause who needs 1960s like languages to then layout data in the screen when the model has knowledge of geometry and can mutate the screen geometry without needing a Python interpreter or C compiler
d0nkee引用原评论 ↗
OpenAI is already a "math research" company

Computer science has been a subset of math since the field was established decades before the first vacuum tube or transistor based machine was invented

"Computer" was coined to describe humans who did math all day

What we been doing the last few decades is fundamentally just algebra relative to values in RAM; LLMs only work because of math: https://arxiv.org/abs/2309.10668

def arbitraryFunctionName() { some math to achieve a physical state in memory } ...where arbitrary function name is some biz logic or use case

We're just pushing those arbitrary semantics from the code to the presentation layer; just need to ship a kernel that handles geometry transforms to draw to screen what looks like a text editor and a video game and label it via the GUI

Text systems are just outdated GUI that we had to start with due to hardware limitations back in the day.
查看其余 19 条评论
jackhurwitz引用原评论 ↗
I'm doing my PhD in compression-based machine learning, wanted to contribute a few clarifying points.

The relationship between probabilistic modeling and lossless compression is very direct. A model that predicts the next symbol with probability p can on average losslessly compress that symbol with the help of an entropy coder (e.g. arithmetic coding) in -log(p) bits. Therefore improved probabilistic models immediately translate into improved lossless compressors.

There are two ways people have used compressors for ML: the first is based on the Minimum Description Length (MDL) principle [0] which says that the best model is the one which provides the shortest description of the data, counting the size of the model itself. This is similar to the technique used in this blog post (argmin code length across class-conditioned compressors) except for counting the model size. Basically you can train a compressor per class and then choose the class compressor which best compresses the test data. It is a maximum likelihood argument because of Shannon's source coding theorem: a code length L corresponds to a probability 2^-L. The second way is the Normalized Compression Distance (NCD) [1], which uses code lengths to calculate information-theoretic distances which can then be plugged into distance-based algorithms like kNN. MDL interprets compressed lengths as likelihoods, while NCD interprets them for distance calculations. The theoretical foundation is Kolmogorov complexity which is the ideal (& uncomputable) lossless compressor, used to define information distance, an "ideal" distance metric based on algorithmic similarity.

Data compression is not in principle restricted to syntactic similarity. As others have mentioned, the new wave of neural compressors (e.g. NNCP [2], CMIX [3], leading the large text compression benchmark [4]) outperform their traditional counterparts (e.g. gzip) because of the ability of neural networks to learn complex semantic patterns. Their improved ability to predict the next token means improved lossless compression. This has also been shown to be the case with pre-trained LLMs [5].

I think it's neat that improving compression improves machine learning, and improving machine learning improves compression!

Looking forward to hearing other thoughts.

[0] https://arxiv.org/abs/math/0406077 [1] https://arxiv.org/abs/cs/0111054 [2] https://bellard.org/nncp/nncp_v2.pdf [3] https://www.byronknoll.com/cmix.html [4] https://www.mattmahoney.net/dc/text.html [5] https://arxiv.org/abs/2309.10668
problynought引用原评论 ↗
Have you worked in software long? I've been in eng for almost 30 years, started in EE. Can confidently say you can't trust the humans either. SWEs have been wrong over and over. No reason to listen now.

Just a few years ago code gen LLMs were impossible to SWEs. In the 00s SWEs were certain no business would trust their data to the cloud.

OS and browsers are bloated messes, insecure to the core. Web apps are similarly just giant string mangling disasters.

SWEs have memorized endless amount of nonsense about their role to keep their jobs. You all have tons to say about software but little idea what's salient and just memorized nonsense parroted on the job all the time.

Most SWEs are engaged in labor role-play, there to earn nation state scrip for food/shelter.

I look forward to the end of the most inane era of human "engineering" ever.

Everything software can be whittled down to geometry generation and presentation, even text. End users can label outputs mechanical turk style and apply whatever syntax they want, while the machine itself handles arithemtic and Boolean logic against memory, and syncs output to the display.

All the linguist gibberish in the typical software stack will be compressed[1] away, all the SWE middlemen unemployed.

Rotary phone assembly workers have a support group for you all.

[1] https://arxiv.org/abs/2309.10668
CamperBob2引用原评论 ↗
Well, they couldn't generate 2D artwork if they weren't capable of working with multiple output dimensions.

An interesting thing about transformers is that they are world-class at compressing 2D image data even when not trained on anything but textual language ( https://arxiv.org/abs/2309.10668 ). Whether that notion is relevant for 3D content would be two or three figures over my pay grade, though.
tekbruh9000引用原评论 ↗
"Higher" than an EE with an MSc in elastic structures, ~30 years industry experience, now working with PhDs across the spectrum on energy models to embed in chips? Energy models in part, inferred from categorization of LLM contents and compression of those contents into geometric functions like I described?

"Higher level" implies acceptance of geometric structure. You place tokens like a Chomsky diagrams at each step up and down, where you should see parameters to transform geometry of the structure.

My team works "above" the contrived state management of software workers to more efficiently sync memory matrix to display matrix. LLMs are a form of compression [1]. My team is working on compressing them further into sets of points that make up each glyph and functions to recreate them.

Electromagnetic geometry transforms hardcoded[2] into hardware so reduce energy use of all the outdated string mangling of software dev as most know it.

What's higher level, relative to our machines, than design and implementation of the machine?

DnD dungeon master versus WOTC game designer.

Notice outside how there are no words and philosophy? Just color gradient and geometry?

Notice inside the human body no philosophy or words?

Language is not intelligence it's an emergent phenomena of geometry created by fundamental forces of physics organizing matter at various speeds relative to light.

You've read too much into an ultimately arbitrary statement meant to invoked a subtext, a subtle emotion context. You think of language as Legos, when it is music to feel.

[1] https://arxiv.org/abs/2309.10668 [2] https://iopscience.iop.org/article/10.1088/1742-6596/2987/1/...
disruptbro引用原评论 ↗
Language modeling is compression, whittle down graph to reduce duplication and data with little relationship: https://arxiv.org/abs/2309.10668

Let’s say everyone agrees to refer to one hosted copy of a token “cat”, and instead generate a unique vector to represent their reference to “cat”.

Blam. Endless unique vectors which are nice and precise for parsing. No endless copies of arbitrary text like “cat”.

Now make that your globally distributed data base to bootstrap AI chips from. The data driven programming dream where other machines on the network feed new machines boot strap.

American tech industry is IBM now. Stuck on recent success of web SaaS and way behind the plans of AI.
b112引用原评论 ↗
Not to mention, Language Modeling is Compression https://arxiv.org/pdf/2309.10668

So text wikipedia at 24G would easily hit 8G with many standard forms of compression, I'd think. If not better. And it would be 100% accurate, full text and data. Far more usable.

It's so easy for people to not realise how massive 8GB really is, in terms of text. Especially if you use ascii instead of UTF.
Mathnerd314引用原评论 ↗
Wasn't there that thing about how large LLM's are essentially compression algorithms (https://arxiv.org/pdf/2309.10668)? Maybe that's where this article is coming from, is the idea that finetuning "adds" data to the set of data that compresses well. But that indeed doesn't work unless you mix in the finetuning data with the original training corpus of the base model. I think the article is wrong though in saying it "replaces" the data - it's true that finetuning without keeping in the original training corpus increases loss on the original data, but "large" in LLM really is large and current models are not trained to saturation so there is plenty of room to fit in finetuning if you do it right.
RadEng00引用原评论 ↗
We have to ditch language processing. And we will with online energy based models that machines boot from.

Maxwell could not get the theory of electromagnetism to work until he ditched pulleys and levers he’d included to describe the mechanics.

We won’t get AGI until we realize “there is no spoon” and language has nothing to do with our intelligence, just with out social tribalism: https://www.scientificamerican.com/article/you-dont-need-wor...

Take language out of the equation and drawing a circle, triangles, letters is just statistical physics. We can capture in energy models stored in an online state, statistical physics relative to the machine; its electromagnetic geometry: https://iopscience.iop.org/article/10.1088/1742-6596/2987/1/...

Our language doesn’t exist without humans. It’s not an immutable property of physics. It’s obfuscation and mind viruses. It’s story mode.

The computer acting as a web server or an LLM has an inherent energy model to it. New models of those patterns will be refined to a statefulness that strips away unnecessary language constructs in the system; like a lot of software most don’t use just developers.

I look forward to continuing my work in the hardware world to further compress and reduce the useless state of past systems of though we copy paste around to serve developers, to reduce context to sort through, and improve model quality: https://arxiv.org/abs/2309.10668

Single function factory hardware with embedded “prompt” that will boot from a model and the machines state will scaffold itself from there are coming: https://creativestrategies.com/jensen-were-with-you-but-were...
braaaahp引用原评论 ↗
Yeh. Data driven model syncing machines will be what kills languages, software stacks.

All the chip world talk of single function machines and how tech is now energy constrained industry, means pruning the state we store; most software is software to deliver software.

Single function pipeline hardware platforms will act as little more than sync engines from models.

I mean it’s is 2025. Still write software like it’s the 1970s. So high tech.

Edit: https://arxiv.org/abs/2309.10668

From LLMs to energy models that transform electromagnetic geometry. Saving what’s needed to recreate cat pics and emails to mom. Pruning the tail as interest dips with generational churn.
bangertho引用原评论 ↗
This already happened with Linux where people with no understanding of electrical engineering got jobs memorizing abstractions.

I look forward to a data driven system future where a few functions transform the machines electromagnetic geometry to solve a task based upon the most efficient energy model for solving a task as we continue to compress from the model all the non-essential syntax sugar of modern software.

https://arxiv.org/abs/2309.10668
zerd引用原评论 ↗
> It has long been established that predictive models can be transformed into lossless compressors and vice versa. Incidentally, in recent years, the machine learning community has focused on training increasingly large and powerful self-supervised (language) models. Since these large language models exhibit impressive predictive capabilities, they are well-positioned to be strong compressors. In this work, we advocate for viewing the prediction problem through the lens of compression and evaluate the compression capabilities of large (foundation) models. We show that large language models are powerful general-purpose predictors and that the compression viewpoint provides novel insights into scaling laws, tokenization, and in-context learning. For example, Chinchilla 70B, while trained primarily on text, compresses ImageNet patches to 43.4% and LibriSpeech samples to 16.4% of their raw size, beating domain-specific compressors like PNG (58.5%) or FLAC (30.3%), respectively.

https://arxiv.org/pdf/2309.10668

Transformers are also used in the top algorithm right now on the Large Text Compression Benchmark. https://bellard.org/nncp/nncp.pdf
gwern引用原评论 ↗
haltIncomplete引用原评论 ↗
All we’re doing is engineering new data compression and retrieval techniques: https://arxiv.org/abs/2309.10668

Are we sure there’s anything “net new” to find within the same old x86 machines, within the same old axiomatic systems of the past?

Math is a few operations applied to carving up stuff and we believe we can do that infinitely in theory. So “all math that abides our axiomatic underpinnings” is valid regardless if we “prove it” or not.

Physical space we can exist in, a middle ground of reality we evolved just so to exist in, seems to be finite; I can’t just up and move to Titan or Mars. So our computers are coupled to the same constraints of observation and understanding as us.

What about daily life will be upended reconfirming decades old experiment? How is this not living in sunk cost fallacy?

When all you have is a hammer…

I’m reminded of Einstein’s quote about insanity.
jabowery引用原评论 ↗
The increasing recognition that "Language Modeling Is Compression" https://arxiv.org/pdf/2309.10668.pdf has not yet been accompanied by recognition that lossless compression is the most principled unsupervised loss function for world models in general, including foundation language models in particular.

Take, for instance, the unprincipled definition of "parameter count" not only in the LLM scaling law literature, but the Zoo of what statisticians called "Information Criteria for Model Selection". https://en.wikipedia.org/wiki/Model_selection#Criteria

The reductio ad absurdum of "parameter count" is arithmetic coding where an entire dataset can be encoded as a single "parameter" of arbitrary precision.

By contrast, the algorithmic bit of information (whether part of an executable instruction or program literal) is an unambiguous quantity up to the choice of instruction set. If you want to quibble about that instruction set choice, take it up with John Tromp https://tromp.github.io/cl/cl.html because what I'm about to propose obviates that along with a lot of other "arguments".

Since any executable archive of any kind of data can serve as a model of the world generating that data, it follows that any executable archive of any text corpus can serve as a language model with a rigorous "parameter count". Therefore, a procedure which runs LLM benchmarks against any such executable archive as a language model, contributes a uniquely rigorous data point to the literature on LLM scaling laws.

So, what I'm proposing is that authors of lossless compression algorithms consider adding a command-line option that, at the end of decompression, saves the state of the decompression process in a file that can be read back in and executed as a language model -- with the full understanding that these language models will perform very poorly on the vast majority of LLM benchmarks. The point is not to produce high quality language models. The point is to increase rigor in the research community by providing some initial data points that exemplify the approach.
intended引用原评论 ↗
Yes! Prompts are super finicky.

You have to create a prompt/function that for a wide set of inputs, generates a token sequence that will perpetually expand in a manner that corresponds to an externally observed truth.

Way too often it feels like you have to shove a universal decoding sequence into a prompt.

“Talk your steps, list your clues, etc.”

Just trying to luck into a prompt that keeps decompressing the model/ generating the next token that ensures the next token is true.*

I recall there was a paper with a relevant title recently… https://arxiv.org/abs/2309.10668

Basically - LLMs don’t reason , they regurgitate. If they have the right training data, and the right prompt, they can decompress the training data into something that can be validated as true

——-

* Also this has to be done in a limited context window, there is no long term memory, and there is no real underlying model of thought.
直接投稿与讨论(2)Language Modeling Is Compression · 3 分 · 2023-09-30 ↗Language Modeling Is Compression · 5 分 · 2023-09-20 ↗