You Could Have Come Up with Kimi Delta Attention

(blog.doubleword.ai)

231 points | by AnhTho_FR 3 hours ago

26 comments

  • xp84 39 minutes ago
    When I see these types of articles and headlines, it just makes me supremely grateful for all the many people far smarter[1] than me. And humbles me, too, since I actually passed for a "very smart person" in places like high school and undergrad. In fact, I'm 'smart' for an average person, but there are definitely millions of people who make me look like a rube in comparison.

    [1] I specifically mean those who are able to hold very big complex ideas and systems in their head, and reason about them, which seems to be an important talent for mathematicians.

    • abixb 24 minutes ago
      Yes. I continue to believe that humans will still be the source of the vast majority of novel ideas, even as they increasingly use AI-related tools to accelerate their works.

      One of the though experiments I ran with one of my friends during a recent conversation over drinks was this: raising a bunch of "control group" kids away from the screens and the algorithmic ocean of "normie-tier content," and in a very learner-friendly setting with hyper-strict control on the quality of media and source material they get access to, just like we've been doing it with frontier models. Think of it like a monastery but for kids, while teaching them all the latest advances in our understanding of reality through mathematics, engineering, computer science, deep learning, and whatnot.

      What I'm getting at it is that we might still need super smart people to push the boundaries of knowledge while using super-advanced AI tools, and anyone who says AI will "completely replace" humans are just misguided. We will always need super smart people with largely unadulterated thinking.

      • dmd 0 minutes ago
        You should read 'Anathem' by Neal Stephenson, which goes into great deal about this kind of establishment.
      • phoghed 7 minutes ago
        Not sure I follow, what are you doing with these philosopher kings after you mint them?
  • rekshaw 2 hours ago
    after a cursory read, I can confidently say I could not, in fact, have come up with Kimi Delta Attention.
    • penguin_booze 1 hour 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 56 minutes ago
        Also the proof is so trivial that it’s left to the reader.
        • BurnerOptical 47 minutes ago
          This one hurts the most, esp. in fields you're not familiar.
          • hnfong 36 minutes ago
            Well, at least these days an actually trivial (to a domain expert) proof can be delegated to a frontier model...
        • cubefox 27 minutes 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.
      • egeozcan 43 minutes 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 35 minutes 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 11 minutes 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”, but suddenly linear algebra and statistics became important. Don’t panic, it’s just another textbook on the shelf.

      • Razengan 58 minutes ago
        Right next to "Learn More" by software UI designers.
    • devy 32 minutes 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.

      • Barbing 7 minutes 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.
    • glaslong 6 minutes ago
      * a completely different "you" who spent countless hours gaining expertise on a wholly diverged life path
    • nope1000 2 hours ago
      I don't even know most words they used in the paper haha
    • dd8601fn 1 hour ago
      Yeah, pretty sure the “you” in “you could have” is a different “you” than “we”.
    • frankus 57 minutes ago
    • londons_explore 1 hour ago
      The notation looks complex, but underneath it's all just adding and multiplying.

      Nothing complex

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

        "New algorithm, or fmadd?"

        "... fmadd."

      • baq 1 hour ago
        as is practically all of transformer maths if you squint hard enough...
    • yongjik 55 minutes 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."

    • world2vec 2 hours ago
      Not even close for me too.
    • vovavili 2 hours ago
      I thought I was the only one.
    • queenkjuul 1 hour ago
      They lost me just describing the notation lol
  • TrackerFF 1 hour ago
    Machine learning could need, and probably has needed, some unified math notation for the past 15 years IMO. With that said, it was worse back in the day - when ML papers were the products of researchers from all over, you'd see some wild notation.

    Many will likely disagree with me, but inconsistent notation (across papers!) is to me friction. At least in this article the author explicitly explains the notation at the very start...that is not always the case. Rarely, even.

    EDIT: Didn't even notice the notation switch, much appreciated.

    • olalonde 52 minutes ago
      I never understood people who preferred traditional math notation (e.g. single letter symbols, weird characters like ∣q⟩ instead of writing down an explicit type, etc.). I guess the main advantage is terseness? To me, the mathematical expressions would be so much easier to understand if they were just written in pseudo code or an actual programming language like Python.
      • glaslong 1 minute ago
        You really just get tired of writing/reading "AbstractJavaSerializerBeanFactoryFactoryAbstactMutatorFactoryAccessEnterpriseBeanFactory()" over and over again.

        So you and all your peers agree to call that procedure "ẽ"

      • OkayPhysicist 6 minutes ago
        Terseness is a significant advantage in pattern recognition. If you write a long, detailed breakdown of every step, not only are you spending a bunch of time writing, you're also obscuring the natural symmetries of the statement.

        It's like saying "I never understood people who prefer to use functions instead of inlining everything". Adding a bunch of visual noise to a statement doesn't improve comprehension.

      • aeternum 43 minutes ago
        Math notation ultimately is pseudo code just with mostly single letter variables and many operators that are encoded purely by position thus not even requiring a symbol.

        Remember that the oft-used e^x is actually an infinite series, even writing it out in summation form would be quite verbose given its frequency in many equations.

        • SkyBelow 28 minutes ago
          I feel the magic in math is that the notation is to a more universal sort of language, and the e^x captures that. e^x means that infinite series, but it means a few other things at the same time. That those different things are sometimes related, that e^2 means e*e, a simple enough operation most can understand, but that it also means that infinite series with 2 in place of x, is part of the complexity of math that makes it quite different than a classical programming language. With most programming languages, someone assigned those equivalent meaning, and while it might be important to understand why, it shows you the mind of the who designed the language. But, in math (and in true Computer Science), when you see an equivalence of this sort, whose mind are you now glimpsing into?

          But, for someone just starting out (or even an expert who just wandered into a new area), this becomes a barrier to understanding. Sometimes we need the mathematical summary, what tells us the immediately answer we are interested in, perhaps even if it loses the deeper nuances that are beneficial for the experts more fluent in the language.

          (And yes, all math notation is human created, so it makes my point quite a bit messier in practice.)

        • crubier 34 minutes ago
          exp(x)
          • kurthr 27 minutes ago
            Longer to write and generally a numerical rather than symbolic representation.
      • crubier 35 minutes ago
        This 1,000%

        Trying to read any math paper is basically like trying to read CodeGolf.

      • htrp 49 minutes ago
        math notation doesn't bias towards English language understanding like pseudocode
        • dfee 35 minutes ago
          but it biases towards the latin alphabet. so your point is diminished.
          • tyre 7 minutes ago
            and Greek!
      • dboreham 29 minutes ago
        Well, humanity struggled for 2000 years trying to do mathematics without notation, so its benefit is not to be sniffed at. But really it's just an APL-vs-Fortran type debate. They're not fundamentally different. Remember also that Ramanujan had to re-use paper it was so costly/hard to find.
    • whatsakandr 5 minutes ago
      I used to think this, then I realized that the amount of time you spend with equations is so much more than code, and the terseness makes them much easier to read once you know what the symbols are.

      Also, letters avoid having to name them, naming being a hard problem and all.

  • neutrinobro 2 hours ago
    You know its a doozy when the author writes a disclaimer at the top saying that bra-ket notation was chosen in order to make the algorithm and data structures clearer.
    • CodesInChaos 2 hours ago
      One of the more annoying parts of my physics study was getting used to the new matrix multiplication notation they came up with every semester.
      • kurthr 1 hour ago
        bra-ket is the (most?) general form of tensor manipulation.

        Raising and lowering operators for summation notation are the beginner tools for covariant derivatives of the metric tensor.

        Christoffel symbols are where it's at, if you need to write out the Ricci tensor. The more constrained the space the more concise the notation can be.

        Note that MechE tensor notation has an even more compact (eigen) form for principal stresses.

        • LogicFailsMe 46 minutes ago
          All of this is true, but I don't believe and I want to be wrong about this that there is something in this notation that starts at an ELI 5 level and gently guides you to physicist level expertise. I all but majored in math (deriving back prop was trivial once it was clear it was the chain rule as one example) but I have never been able to keep bra ket notation straight in my head for the more exotic operations. Einsteinian notation on the other hand is a few minutes of furled brows and then all is clear.

          It is what has separated me from being able to code just about anything on a GPU and being known for some of that work and coming up with a better way to run ab initio quantum chemistry on them.

          It truly has been my Waterloo for many years. So make me wrong.

          • kurthr 38 minutes ago
            Yeah, bra-ket is arbitrary tensors (inner and outer multiplication) rather than the nice 4D of space-time (with derivatives).

            I will say that seeing transformers written this way gives me a bit more intuition for what is going on (being able to identify correct equations), but there's enough complexity in actual transformer implementations, that it still feels like I'm fooling myself.

            Conceivably, I think you could use Feynman diagrams to talk about phonon dispersion in (eg asymetric crystaline) solids, but even though they're a "simplification", they're overkill for the problem.

  • croemer 1 hour ago
    LLM written for sure:

    > The identity [...] is the whole trick. The outer product is a matrix; the inner product is a number. We no longer store every past key and value. We store their summed outer products in the fixed-size state S_t.

    • robertclaus 1 hour ago
      Ya, probably started with asking for a buzzy title.
    • geraneum 1 hour ago
      This is what you get when you prompt claude to avoid –
  • HonshinM 1 hour ago
  • juancn 54 minutes ago
    I really liked the ket notation. I was aprehensive at first, but it makes operations much more clear.

    I would have liked some refresher on some variables though (like d_k in quadratic attention).

  • luciana1u 11 minutes ago
    love the toggle between math notation and physics notation. two flavors of confusion, nicely packaged.
  • _Microft 1 hour ago
    Side note, before you ask: yes, bra-ket notation is called like that because of the brackets.

    https://en.wikipedia.org/wiki/Bra-ket_notation

  • piterrro 1 hour ago
    At first I felt bad about not having come up with this solution. But then I realized I have problems with writing binary search by myself in JS and immediately felt better.

    Now way I could have come up with Kimi Delta Attention.

    • bee_rider 1 hour ago
      Lots of linear algebra codes are actually “easy to write” in a way. It isn’t like conventional CS where you are always going a bunch of recursive nonsense going on. There should be mathematical relationships between all of the variables, there are well implemented libraries for the common mathematical concepts, and it is rare to need to go more than a couple loops deep (anything more complex than that should get shunted off into a library anyway).
  • Kushagra125 2 hours ago
    The toggle is really useful. Liked it!!
  • sodapopcan 26 minutes ago
    Ohhhhh Diag(αt), right. I was almost there but had left the placeholder "Diag(foo)" and never noticed. I now see is why I didn't come up with it first. So close!
  • scarmig 2 hours ago
    I like the math vs physics toggle.
  • spwa4 2 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 2 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 1 hour 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?

  • _davide_ 1 hour ago
    Loved this incremental evolution, things gets way more understandable...usually xD
  • andai 1 hour ago
    >You Could Have Come Up With Kimi Delta Attention

    What? Little old me! Well, then, let's have a look...

    > (First paragraph)

    > A note on notation: this article defaults to bra-ket notation because (in my quantum-inspired opinion) it makes the shapes in this derivation very clear. The Math notation switch above rewrites every equation using conventional bold vectors and explicit transposes instead. In bra-ket mode, ∣ q ⟩ ∣q⟩ is a column vector, ⟨ k ∣ ⟨k∣ is a row vector, ⟨ k ∣ q ⟩ ⟨k∣q⟩ is a number, and ∣ v ⟩ ⟨ k ∣ ∣v⟩⟨k∣ is a matrix. Vectors face right by default, while keys face left when written into the linear-attention state. We work with one causal attention head and real-valued vectors, assume DeltaNet’s keys are normalized, and let the state map from key space to value space.

    Hmm... Guess not!

    • 5555watch 1 hour ago
      I love that they let you switch to a more common q'k notation!
  • bee_rider 1 hour ago
    Where do linear algebra folks go to get started with ML stuff? It seems pretty easy but the hardware is expensive.
    • sva_ 1 hour ago
      I think Karpathys nn zero to hero is a good starting point. And you can experiment on small networks using pretty normal hardware.
    • stuxnet79 1 hour ago
      > It seems pretty easy but the hardware is expensive.

      Huh?

      If your aim is to truly 'get started' with ML then hardware is absolutely not a bottleneck (either local or cloud).

      Remember that ML is much more than LLMs. Even modern day LLMs can be quantized to a point where they can run on local hardware although their capabilities won't be as impressive.

      I would recommend looking into some of Andrej Karpathy's videos if you want a grasp of the basics.

    • nifets 1 hour ago
      what is a linear algebra folk?
  • nurettin 33 minutes ago
    It is heartwarming to see how sarcasm turns into a celebration of mediocrity.
  • anshumankmr 1 hour ago
  • lain98 52 minutes ago
    Its greek to me.
  • enraged_camel 58 minutes ago
    If I could, I'd be working for one of the labs and commanding a seven-figure salary. :)
  • mnky9800n 2 hours ago
    why are you using braket notation?
    • leonvoss 1 hour ago
      He has a master's degree in physics from Oxford. Also there is a toggle to normal notation. Well, CS notation. I'm not a fan of transpose marks everywhere. I like an even more mathematics notation.
      • mezark 57 minutes ago
        And a PhD in Quantum Computing! I'm a physicist so a fan of bra-ket tbh
  • brcmthrowaway 2 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 1 hour 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.

    • choilive 1 hour 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 2 hours ago
      It's all vibes.
  • asdfman123 2 hours ago
  • codeduck 1 hour ago
    Hmm. Hmmm. Hmm. HMMM. Hmm.

    Yep! I know some of these words.

  • myshapeprotocol 2 hours ago
    [flagged]