Top
Best
New

Posted by AnhTho_FR 6 hours ago

A walk through of the DeltaNet family of linear attention variants(blog.doubleword.ai)
276 points | 114 commentspage 3
brcmthrowaway 6 hours ago|
I could never get this about modern machine/deep learning or even the Transformers. Yes, it's not exactly rocket science, but when I see the data flow diagrams, it's not clear what is calculated in real time or multiple steps.

Is it really one big computation f(g(h(x)))?

malwrar 5 hours ago||
Yes.

Each token prediction is one big function call. Then you just recursively generate more tokens until run out of context or the model predicts a next token indicating end of sequence. Technically the model outputs a matrix where the last row is a probability distribution, but I’m counting sampling from it as part of the chain. Hundreds of billions of dollars has gone into just making the function fatter and gradually changing pieces here and there.

brcmthrowaway 3 hours ago||
I remember the concept of layers, as essentially defining the matrix math dimensions. And for a given model/framework, they were static. That always bugged me (not very dynamic).. is this still the case?
malwrar 2 hours ago||
The sizes for the matrices are decided up front (“hyperparameters”, more or less guesstimated) and the values that are learned (“parameters”, for completeness) and remain static after training. The layering just refers to the core “transformer block” being chained inside the model that contains most of the weights. Those themselves are pretty simple, usually just an MLP followed by an attention function, with variations on formulation & “multi-heading” in most of the new models. Behind the terms and math and inner architectural choices, it’s pretty much still the same GPT pattern of ‘“lie” = decode(sample(lm_head(T_1(T_2(…T_n(encode(“the cake is a”))))))’, with T_i(…) being the ith layer.

You know, I haven’t kept up with MoE and etc where there’s a bit of selection going on, so I should probably be more humble. I think new work has only added different “paths down the same hill” though (no recurrence, just select different matrices), but could be wrong there. I don’t think I’m wrong on my general intuition, just want to be epistemically honest!

choilive 5 hours ago|||
What's your distinction between real time vs multiple steps? All computation is done in steps.

Is it all one big computation? Its turtles all the way down.

leonvoss 5 hours ago||
It's all vibes.
joe_the_user 3 hours ago||
Overall, all the different linear attentions out there are approximations the original (quadratic) attention and this is important for the whole "AI" enterprise[2].

Original attention involves (very crudely) an approach of scanning how every token (roughly a word) relates every other token and training a classic neural network on related tokens - to get either language translation or next word prediction (and next word prediction is what "seems intelligent" in LLMs). [1]

The problem is that since original attention is "everything to everything else" it scales quadratically (O(n^2)) with the size of the train set (or train set window) and so basically even the largest data center can use that once a truly vast training set is accumulated. Which is to say that "dirty little secret" of LLMs following the "Attention Is All You Need" paper don't actually scale. That model (in my crude, amateur understanding) is elegant for allowing every word's connection to every other word to be weighed and still brute-force for not starting with or achieving "understanding" of the words [3 give only some background but also why "full" attention is powerful].

Linear attention is a way around the quadratic quality of original attention so everyone is naturally using clever approaches to make it work. Simplifying terribly - you're trying to determine the value of word before you see in context. But my intuition is that since (Everything X Everything) is inherently a quadratic relationship, none of these can capture their expanded data set in the way original LLMs did - not they are worse but all the models seem likely to hit diminishing returns in terms of blindly capturing meaning from all-the-world's text (and data).

Background and notes: [1] https://en.wikipedia.org/wiki/Transformer_(deep_learning_arc... [2] Linear Transformers Are Secretly Fast Weight Programmers: https://proceedings.mlr.press/v139/schlag21a/schlag21a.pdf [3] Transformers are Deep Infinite-Dimensional Non-Mercer Binary Kernel Machines: https://arxiv.org/pdf/2106.01506

nurettin 4 hours ago||
It is heartwarming to see how sarcasm turns into a celebration of mediocrity.
lain98 4 hours ago||
Its greek to me.
enraged_camel 4 hours ago||
If I could, I'd be working for one of the labs and commanding a seven-figure salary. :)
asdfman123 5 hours ago||
Relevant XKCD

https://xkcd.com/2501/

codeduck 5 hours ago||
Hmm. Hmmm. Hmm. HMMM. Hmm.

Yep! I know some of these words.

rekshaw 6 hours ago||
after a cursory read, I can confidently say I could not, in fact, have come up with Kimi Delta Attention.
penguin_booze 4 hours ago||
"you could have..." is among the top insulting phrases used by maths-adjacent people. Others in that league are "it should now be obvious...", "it's abundantly clear...", "it can be easily shown that...", "this is nothing but..." etc.

The rest of us reading this are like, holy batman, what the fuck was that?!

ozgung 4 hours ago|||
Also the proof is so trivial that it’s left to the reader.
BurnerOptical 4 hours ago|||
This one hurts the most, esp. in fields you're not familiar.
hnfong 4 hours ago||
Well, at least these days an actually trivial (to a domain expert) proof can be delegated to a frontier model...
cubefox 4 hours ago|||
In the future this might be replaced with "you can verify this fact by asking an LLM of your choice". Similar to how people in chat arguments already post screenshots of an LLM answer to show that their opinion is correct.
moffkalast 2 hours ago||
Counterexample left as an exercise for Fable
egeozcan 4 hours ago||||
Answer with:

You could have your own hacker news, it's just a textbox, a bunch of tables and headings! Once you add these, it'll be abundantly clear that you also need a database. It should now be obvious that you also need a user system and it can be easily shown that needs a backend. Admin tools, tests, statistics, performance checks and so on can easily be derived from such backend.

jameshart 4 hours ago||||
Math educators like Grant Sanderson (3blue1brown) use it in a very specific way: the goal of a mathematical explanation is to make the learner feel like they could have come up with something. And a really good mathematical communicator can absolutely do that.

A piece like this which uses it in a headline but in no way makes an average reader feel like they could have come up with it is just badly misjudging how good of an explanation it is.

wrs 3 hours ago||
I don’t think “you” in these titles ever really refers to an “average reader”. Some familiarity with the field is required. Imagine how non-programmers (and many programmers) feel about some examples I just Googled:

“You Could Have Invented Parser Combinators”

“You Could Have Invented Container Runtimes”

“You Could Have Invented Git”

Given the references to “mathematicians”, I think this reaction is more about an unfamiliarity with the concept of applied mathematics, which is ironic for practitioners in a field containing so much that is (or should be) regarded that way.

Software used to be all about “discrete math”, logic, maybe a bit of queuing theory…and now suddenly linear algebra and statistics became important. Don’t panic, it’s just another textbook on the shelf.

aesthesia 2 hours ago|||
I think the origin of the title formula is Timothy Chow's "You Could Have Invented Spectral Sequences" (https://www.ams.org/notices/200601/fea-chow.pdf), which is certainly not aimed at an average reader.
jameshart 3 hours ago|||
So I think what’s a little unfair there is that “you could have invented container runtimes”[1] is an article which really tries to answer ‘how does someone who works in traditional software development with an understanding of operating systems and deployment that is a few years out of date get brought up to date on what they need to know so that to them, something like container runtimes become a logical and obvious thing that solves a problem they now understand?’

What this particular mathematical writeup seems to address is ‘how does someone who is already up to speed on the mathematical underpinnings of attention kernel neural networks get brought up to date on what they need to understand in order to see this new algorithm as obvious’

Which is a smaller audience to be sure, and - given how fast this field has grown - somewhat disingenuous in its implications.

This kind of title is appropriate for a piece aimed at helping someone who is a little behind the curve catch up. In the field of deep learning it should be obvious even to the people inside it riding that curve that it is moving really fast and that this kind of content only works for people who are running to keep up.

[1] https://medium.com/@gtrevorjay/you-could-have-invented-conta...

sva_ 3 hours ago||||
Chill, it's just a rhetorical phrase. They want to show that this KDA is the result of a series of incremental improvements, and I think they did a pretty good job at that.

I often find people get annoyed at mathy stuff because they seem to think that they should be able to read it like a (comparatively low information dense) newspaper article or something similar.

Math isn't like that, it usually has high information density and you need to parse every single symbol. And also people make this mistake where they gloss over stuff they don't get because they think they'll just understand things from context. Works great in normal literature - but math ain't like that. If you don't understand something, go back to the definitions.

Razengan 4 hours ago|||
Right next to "Learn More" by software UI designers.
devy 4 hours ago|||
Doubleword AI is conducting a classic textbook marketing trick called newsjacking.

Writing a detailed technical post behind the news of Kimi K3 and KDA algorithm with an audacious title like "You Could Have Invent Breakthrough It too" they are pre-filtering out the ones who couldn't comprehend with quick read (myself included) and attracting the ones who agreed with the blog post. At the end with a strong CTA to promoting their 10x cheapter open weight model AI inference and hiring too.

Good job Doubleword, I see what you are doing there.

mezark 3 hours ago|||
lol - co-founder of Doubleword here. honoured you think we have sophisticated enough marketing to 'newsjack'. What actually happened is my cofounder wrote it over the weekend because he's a mega-nerd and put it live yesterday. I hadn't even read it until I saw this hacker news thread lol

We're just a group of guys and gals who like inference!

arkj 3 hours ago||
The blogs from doubleword are indeed full precision. A great team doing a fantastic job.
Barbing 3 hours ago|||
“Kimi Delta Attention” because “Kimi K3 Delta Attention (oh that’s just our little internal name for it as a joke)” passes no sniff tests.
Barbing 2 hours ago||
(HN titled updated from previous “You Could Have Come Up With Kimi Delta Attention” … gotta check if someone maintains an “Editing The Gray Lady” for HN, for title histories and derankings)
nope1000 6 hours ago|||
I don't even know most words they used in the paper haha
dd8601fn 5 hours ago|||
Yeah, pretty sure the “you” in “you could have” is a different “you” than “we”.
frankus 4 hours ago|||
Relevant xkcd: https://www.explainxkcd.com/wiki/index.php/2501:_Average_Fam...
londons_explore 4 hours ago|||
The notation looks complex, but underneath it's all just adding and multiplying.

Nothing complex

teach 4 hours ago|||
Grand Theft Auto VI looks complex, but underneath it's all just ones and zeros and NAND
ReactiveJelly 4 hours ago||||
"I invented a new algorithm"

"New algorithm, or fmadd?"

"... fmadd."

baq 4 hours ago||||
as is practically all of transformer maths if you squint hard enough...
glaslong 3 hours ago|||
* a completely different "you" who spent countless hours gaining expertise on a wholly diverged life path
world2vec 6 hours ago|||
Not even close for me too.
yongjik 4 hours ago|||
Imagine reading the title again in the voice of the Asian Father Meme.

"You could have come up with Kimi Delta Attention, but you didn't, did you."

vovavili 6 hours ago|||
I thought I was the only one.
trollbridge 5 hours ago||
Thank goodness. There are dozens of us.
ma-r-s 5 hours ago||
dozens!!!
arnavpraneet 5 hours ago||
possibly scores!!!
cloudcalvin118 4 hours ago||
Scores? More like "grosses"
queenkjuul 5 hours ago||
They lost me just describing the notation lol
denysvitali 4 hours ago||
Same!
spwa4 5 hours ago||
No, you couldn't have. There are plenty of ML innovations that when push comes to shove only depend on having access to more compute, but this is one of the worst examples I've ever seen.

I always thought that the jump from LSTM/GRU -> Attention wasn't a particularly big one. Instead of partial unroll, do a full unroll. Why not (because it's too expensive, that's why not). Every component was known, and everybody anywhere near ML knew perfectly well why NOT to try that: because you just don't have the compute to fully unroll an LSTM. From that point attention is optimized (they key-query mechanic). The big innovation is not so much the mechanism itself but realizing the parallelize-ability of it.

It's sort of like if one would today make the "improvement" to attention to replace they key-query-value mechanic by just dropping it while making the entire context the latent space. That will outperform attention, nearly guaranteed. It'll also make even Google's cluster networks meltdown. Attention is one of those innovations that came mostly from realizing you had better hardware than everybody else and asking yourself how to use it. It's still quite the accomplishment, they had to get it working. But nobody else was really capable of making this leap.

leonvoss 5 hours ago||
I agree 100%. This field is not amenable to progress from people with a pen sitting in a corner proving theorems. The math is mostly uncertain vibes and to test it you need millions of dollars of compute. Smart loners just can't.
p1esk 4 hours ago||
replace they key-query-value mechanic by just dropping it while making the entire context the latent space.

What do you mean by this? Like concatenating all token embeddings into one large vector?

myshapeprotocol 6 hours ago|
[flagged]