Kimi K3 Architecture Overview and Notes

(sebastianraschka.com)

337 points | by ModelForge 11 hours ago

15 comments

  • constantlm 5 hours ago
    So, unlike what leaders of western labs labs would like you to believe (that Kimi is just the result of distillation attacks), they are introducing new and novel approaches.
    • nostromo 4 hours ago
      Even if they are distilling, I don't particularly care. Anthropic and others have been distilling copyrighted material by to build these models, largely without permission.
      • wnsdy95 1 hour ago
        this is so true honestly
        • mensetmanusman 43 minutes ago
          If you redefine the technical world distilling to mean training on text, you are correct.
      • ransom1538 1 hour ago
        Exactly,let Anthropic get back to training on the New York times.
    • FinchNova12 1 hour ago
      "Kimi is largely a byproduct of distillation" and "Kimi is introducing new and novel approaches" are not mutually exclusive, and I'm not sure it's clear from the paper how much of the improvement comes from the new approaches. So I wouldn't take the new approaches to be much evidence about whether the distillation attacks occurred.
      • anon373839 47 minutes ago
        > distillation attacks

        Like the distillation “attacks” Anthropic conducted against literally millions and millions of different creators?

    • boomskats 4 hours ago
      No! It's just not fair!! What about our financial bubble!
    • hlynurd 4 hours ago
      "attack"
  • thatsgcasey 7 hours ago
    Sabastian Raschka is one of the great LLM researchers/authors. I highly recommend his substack
    • rsolva 6 hours ago
      This seems like a rare gem in a space swamped with lazily LLM generated summaries. Added to my RSS feed!
    • Upvoter33 3 hours ago
      I would describe him as a leading educator / explainer / teacher in this space.
    • hugopuybareau 5 hours ago
      Never heard of him before but I was amazed how straight to the point yet very easy to grasp it was
    • 3abiton 7 hours ago
      I second that. I've always enjoyed his work!
  • augment_me 1 hour ago
    I feel like the Kimi team is amongst the best in the industry to pick and choose what is meaningful from the other models. For example, avoiding the expensive and empirically uncertain mHC in favor of simpler residuals. Latent MoE.

    My only doubts are around Linear Attention instead of DSA as this is inherently lossy. You are kind of banking on that your query is inherently in the embedding space of the model already and can be lossy.

    • mensetmanusman 42 minutes ago
      They need to work on token cost for unrestrained problem solving.
  • mickael-kerjean 2 hours ago
    Genuine question: how reproducible / usable / verifiable are these architectures from the published documentation? Are they similar to PDF/DWG/PSD specifications, where the format look like an open spec at first sight until you attempt to implement it and realize the crucial implementation details are undocumented?
    • calebkaiser 2 hours ago
      Implementing models directly from papers is typically pretty doable (and is of course more straightforward when the full implementation is open sourced). Often there is some amount of specific knowledge, like particular hyperparameters, that is missing and has to be trial and errored by the community, but generally speaking, getting the core model architecture implemented is a reasonable task for most well documented models.

      Reproducing the exact training run, however, is basically impossible without the original dataset and training pipeline (here meaning all of the code + infra involved in actually executing the pre and post training loops). Also, it would be exorbitantly expensive to do if you weren't also a lab trying to train a similar model.

      But you can still scale the architecture down and experiment as a solo researcher using the published research. There are probably some open source implementations already on GitHub for any given big open model release.

    • dannyw 1 hour ago
      The architectures are high level concepts and the mechanics usually have enough detail for you to try and implement.

      Transformers are very "mendable" in that you can permute the architecture in crazy or random ways, and still basically always end up with get a coherent LLM. The difference comes down to training efficiency, inference efficiency, and usually minor differences in performance.

      Hyperparams and stuff, I mean it's standard to do a sweep anyway.

    • GaggiX 2 hours ago
      The code is open source, and there probably several different implementations.
  • Ilaurens 6 hours ago
    "Interestingly, Kimi K3 got rid of all RoPE layers and uses NoPE (No Positional Embeddings) everywhere instead."

    It just baffles me that this even works at all. Doesn't it just become a token soup? Is attention that precise that a second token can tell its the second token just because it learns to accumulate something in the embedding space without any sort of inductive bias?

    • yhocd 1 hour ago
      The primary author of RoPE, Jianlin Su, is currently working at Moonshot (KIMI)
    • itkovian_ 6 hours ago
      Causal masking allow model to learn implicit positional embeddings. The meme that a transformer block is permutation invariant is not true.
      • ModelForge 4 hours ago
        And adding to that, there is also the recurrent state in the Kimi Delta Attention. I wouldn't call it position information but more sth like "position sensitivity"
    • augment_me 1 hour ago
      When you have recurrent blocks in your model, you implicitly have a timestep T(amount of recurrent steps). Similar to Diffusion Transformers, it then becomes valuable to encode the knowledge of where you are in this chain somehow. NoPE is more flexible than RoPE for this.
    • dwohnitmok 6 hours ago
      As a sibling comment points out you don't strictly need positional embeddings for decoder-only causal transformers. You definitely need it for non-causal ones (e.g. the encoder of the original transformer paper!).

      And yes accumulation is a good intuition for what's going on. You could imagine a part of the attention head that just kept writing to the same part of the residual stream causing that to keep accumulating (simply via attention summation) as more input tokens come in thereby functioning as a kind of index without the need for any positional encoding.

    • fspeech 6 hours ago
      Linear layers use decays (like IIR filters) that naturally provide relative positions. Full attention layers can then be free to develop concepts that attend to each other regardless of distance.
    • natrys 5 hours ago
      At least the SSM layers should have relative PE built in via recurrence, in a hybrid attention model like this.
  • rglover 3 hours ago
    Just tried K3 out for the first time today and it's a legitimate threat.

    Temporarily (maybe permanently) using it as my daily driver but it's wild how comparable it is to Opus 4.7/4.8 (what's been my go to for a bit now—wrote a quick post on what I found today [1]).

    [1] https://graybearding.bearblog.dev/kimi-k3-is-insane/

    • ATMLOTTOBEER 1 hour ago
      Agreed. Dropped my $200/mo Claude I was saturating for the $100/mo moonshot sub and have no complaints

      Plus I can actually see the thinking traces and I’m not getting downgraded/denied by anthropic constsntly…

    • kroaton 3 hours ago
      Better than Opus 4.8 on complex tasks but tends to overthink. It found a bunch of bugs and architecture issues that only 5.6 Sol Max and Fable on my C++ projects.
  • alealvarezarg 8 hours ago
    Great breakdown. After using Kimi extensively, it's fascinating to see how architectural choices like KDA and NoPE translate into such strong real-world performance. Really impressive engineering.
  • souravsspace 7 hours ago
    i like your detailed breakdown. Thanks. <3
  • RobLach 5 hours ago
    Concise. Nice.
  • jartan2002 3 hours ago
    [flagged]
  • gokohl 10 hours ago
    Interesting that they went NoPE everywhere — everyone else hedges with RoPE in the local layers. Feels like the linear-attention stuff (Kimi Delta) is quietly doing the positional work so they can get away with it. Curious to see if it holds up at frontier scale.
    • thunderbird120 9 hours ago
      Kimi Delta Attention (KDA), despite having "Attention" in the name, isn't really attention at all in any conventional sense. It's more like an RNN which can be efficiently parallelized during training. It's a very small modification to Gated DeltaNet, which can be described as an RNN whose hidden state acts like a small, editable attention memory.

      Because it's RNN-like, it has an inherent idea that X comes before Y which comes before Z in the sequence XYZ. Transformers, by default, don't have that. They operate on sets, unordered collections of unique items. They have no idea where those items are in relation to each-other so you have to clue them in.

      Because There are 3 KDA layers per attention layer, and 3 KDA layers before the first attention layer, every single token position is going to be able to learn information about where it is in the sequence before the first actual attention layer.

      RoPE is actually a bit destructive, so being able to omit it like this is very convenient. Models like Gemma-4 have a similar structure with 5:1 Sliding Window Attention (SWA) layers for every global attention layer. These are cheap, shitty attention layers which handle local information and which go in-between the big powerful ones, KDA serves the same role in this model. In Gemma only the SWA layers have RoPE while the global attention layers omit it. SWA is actual attention, even if it only operates on a small sliding window, so it needs the positional embedding. KDA isn't, so it doesn't.

      >Curious to see if it holds up at frontier scale.

      I don't know how much more frontier scale you can get than this, but yes, there's no reason why that wouldn't work at larger scales. Honestly, more parameters just makes it easier for the KDA layers to communicate that positional information better.

    • wongarsu 10 hours ago
      Is frontier scale larger than this? Kimi K3 seems to benchmark in the same range as Opus and Fable. I would have expected they are all in the 2-4T range, with quality of the training and architecture differences as the major differentiators
    • samuelknight 9 hours ago
      It has some weird side effects though. for example KV-caches are implemented in fixed incremental token blocks (1024 from the providers I used) instead of simply caching up to the most recent input prompt input. It results in up to 1023 additional input (cache miss) tokens per inference.
      • wren6991 9 hours ago
        Sounds a lot like running the Qwen3.5/3.6-series models at home: you need checkpoints for the recurrent state (GDN in the case of Qwen). You avoid the miss for the common case of 100% prefix match (e.g. during interleaved tool calls and thinking) by keeping an additional checkpoint for the actual last generated token. If you're a cloud provider serving many concurrent clients then you might prefer to skip that complexity and always take the 1k worst-case prefill hit.

        SWA has a similar issue. Unless you keep the entire KV prefix lying around (which is not unreasonable: you retain flop + bandwidth benefits but lose capacity benefits), you need to start 1 window back from the rollback point, in order to refill the sliding window before going into normal prefill.

    • cubefox 9 hours ago
      This comment smells LLM generated.
      • losvedir 8 hours ago
        Huh, which model? I didn't pick up any of the tells. It seemed normal enough to me. (I vouched it, oops.)
        • cubefox 6 hours ago
          Telling which model wrote it is much harder than telling that some model wrote it.
      • Bolwin 8 hours ago
        Screams it in fact
      • abroadwin 8 hours ago
        "Quietly"
  • myronkeir1968 6 hours ago
    [dead]
  • myronkeir1968 6 hours ago
    [flagged]
  • pullrun 6 hours ago
    [dead]
  • dumpstertechops 6 hours ago
    [flagged]