Kimi K3 Models oberts Moonshot AI Mixture of Experts Kimi Delta Attention Attention Residuals infraestructura IA

Per dins de Kimi K3: com funcionen el MoE de 2,8 bilions, KDA i Attention Residuals

Kimi K3 activa només 16 de 896 experts per token. Expliquem Stable LatentMoE, Kimi Delta Attention, Attention Residuals i els colls d’ampolla reals.

Per què un model de 2,8 bilions no calcula amb tots els paràmetres

Kimi K3 té 2,8 bilions de paràmetres totals, però no els activa tots per generar cada token. El vídeo de Caleb Writes Code explica les peces que permeten escalar un model tan gran sense convertir cada resposta en un càlcul dens de 2,8 bilions: mescla d’experts, representacions latents, atenció lineal híbrida i connexions residuals selectives.

La idea central és separar capacitat total de càlcul actiu. K3 reparteix part del model en 896 experts i n’activa 16 per token, a més d’experts compartits. Això equival aproximadament a l’1,8% del conjunt d’experts, però no vol dir que tot el model consumeixi exactament l’1,8% del càlcul: també hi ha capes compartides, atenció, encaminament i comunicació entre dispositius.

La mida continua tenint un cost físic. Els pesos s’han d’emmagatzemar i distribuir, i un desplegament gran necessita moure dades entre acceleradors. Moonshot recomana supernodes de 64 acceleradors o més. L’eficiència no depèn només de quants experts s’activen, sinó de si el sistema els pot alimentar sense perdre temps en comunicació.

Mescla d’experts: més capacitat amb una ruta curta

En un model MoE, un encaminador assigna cada token als experts que considera més adequats. Així es pot augmentar la capacitat especialitzada sense passar sempre per totes les xarxes del model. K3 porta aquesta dispersió a un extrem: escull 16 experts entre 896.

Com més gran és el catàleg i més petita la selecció, més delicat és l’equilibri. Si l’encaminador envia massa tokens als mateixos experts, alguns acceleradors queden saturats mentre altres estan infrautilitzats. Moonshot afirma que utilitza Quantile Balancing, que deriva l’assignació de la distribució dels resultats del mateix encaminador i elimina actualitzacions heurístiques i un hiperparàmetre sensible.

El vídeo ho compara amb valorar els experts per posició relativa, no només per una puntuació absoluta. És una analogia útil, però el resultat final depèn de l’entrenament complet, del repartiment de càrrega i de la implementació del servei. Una arquitectura elegant no garanteix per si sola una latència baixa.

Stable LatentMoE i el coll d’ampolla de la comunicació

Quan els experts viuen en GPU diferents, cada activació pot obligar a transmetre representacions per la xarxa interna del servidor. Aquesta operació «all-to-all» es converteix fàcilment en un coll d’ampolla: reduir multiplicacions no ajuda gaire si les dades passen massa temps viatjant.

El vídeo descriu Stable LatentMoE com una projecció a una representació de dimensió inferior abans de l’encaminament. Els experts treballen sobre aquest espai latent i, després, el resultat torna a la dimensió original. L’objectiu és reduir tant les dades que circulen entre acceleradors com part del càlcul dels experts.

Moonshot encara no havia publicat tots els detalls del model quan es va anunciar K3. El blog oficial presenta Stable LatentMoE i Quantile Balancing, però remet l’explicació completa a un informe tècnic posterior. Per això convé distingir el que el fabricant ha documentat del que el vídeo interpreta a partir del diagrama.

Kimi Delta Attention: memòria eficient per a seqüències llargues

L’atenció completa compara moltes posicions de la seqüència entre si i el seu cost creix molt amb la longitud. Kimi Delta Attention, o KDA, és una forma d’atenció lineal recurrent que manté un estat compacte i l’actualitza a mesura que arriben tokens nous.

La KDA parteix de la família DeltaNet i Gated DeltaNet. En lloc d’acumular informació sense discriminació, aplica una regla de correcció i comportes que decideixen què retenir i què oblidar. La proposta de Moonshot introdueix un control més fi per canal, de manera que diferents components de la representació poden tenir ritmes de memòria diferents.

K3 no elimina del tot l’atenció completa. Combina tres capes KDA amb una capa d’atenció global Gated MLA. Aquesta arquitectura híbrida intenta obtenir el cost favorable de l’atenció lineal durant bona part del recorregut i conservar punts periòdics d’interacció global.

La finestra anunciada és d’un milió de tokens. Això indica quina entrada admet el servei, no que cada detall es recuperi sempre amb la mateixa precisió. Memòria computacional eficient i memòria semàntica fiable són problemes relacionats, però no idèntics.

Attention Residuals: triar què recuperar de capes anteriors

Les connexions residuals convencionals sumen la sortida de cada capa al corrent que passa a la següent. Són essencials per entrenar xarxes profundes, però l’acumulació uniforme pot diluir informació: una capa avançada rep una barreja de tot el que s’ha afegit abans.

Attention Residuals substitueix aquesta agregació fixa per una selecció apresa sobre representacions anteriors. Cada capa pot donar més pes als estats que li resulten útils. La versió Block AttnRes agrupa capes en blocs per limitar memòria i comunicació, un detall important quan el model es reparteix entre molts acceleradors.

El repositori oficial descriu AttnRes com un reemplaçament compatible amb connexions residuals estàndard. Els resultats publicats pels autors són prometedors, però continuen sent experiments de l’equip que proposa el mètode. La incorporació a K3 aporta una prova a gran escala; l’avaluació independent ha de determinar quant del guany prové d’aquesta peça i quant de dades, entrenament i infraestructura.

Rendiment real: el sistema és més que l’arquitectura

Moonshot atribueix a aquestes decisions una millora aproximada de 2,5 vegades en eficiència d’escalat respecte de Kimi K2. També utilitza entrenament conscient de quantització, pesos MXFP4 i activacions MXFP8. Són afirmacions del fabricant i no equivalen a dir que qualsevol instal·lació executarà K3 2,5 vegades més de pressa.

En producció importen la xarxa entre GPU, la memòria disponible, el processament per lots, la memòria cau de prefixos i els kernels. KDA, per exemple, necessita una implementació específica de la memòria cau; Moonshot diu que n’ha preparat una per a vLLM. Sense aquest suport, una arquitectura teòricament eficient pot funcionar malament.

El preu oficial és de 3 dòlars per milió de tokens d’entrada sense memòria cau, 0,30 amb encert de memòria cau i 15 per milió de sortida. Aquest preu reflecteix el servei de Moonshot, no el cost garantit d’un proveïdor que allotgi els pesos en una infraestructura diferent.

Conclusió

L’interès tècnic de Kimi K3 no és només la xifra de 2,8 bilions. El model combina una mescla d’experts extremadament dispersa, compressió latent, atenció lineal híbrida i agregació residual selectiva. Totes quatre peces ataquen un coll d’ampolla diferent: càlcul, comunicació, context i profunditat.

El vídeo ofereix una explicació intuïtiva d’aquest conjunt, però alguns detalls de Stable LatentMoE encara depenien de la informació preliminar del llançament. La lectura més segura és que K3 mostra com es pot escalar la capacitat total mantenint una ruta activa relativament estreta; no que la mida deixi de tenir cost.

La prova definitiva serà veure els pesos, l’informe tècnic, implementacions independents i mesures sobre maquinari real. En models MoE d’aquesta escala, el disseny de la xarxa i el programari de servei poden ser tan decisius com les equacions.

Contrast i context

Fonts consultades

4 fonts
  1. 01
  2. 02
  3. 03
  4. 04

Font de treball

Transcripció amb marques de temps

10 fragments
Consulta la transcripció
  1. 0:00 , obre el vídeo en una pestanya nova

    The DeepSeek moment back in January 2025 was a pretty big deal. Not just because DeepSeek practically caught up to OpenAI when it comes to benchmarks, but it's also the fact that DeepSeek trained their model for a fraction of the cost if you consider only the GPU rental costs. Similarly, Qwen 1.5 has now nearly caught up to Anthropic and OpenAI, but not just in benchmarks, but it's casting a broader question around who will be leading AI innovation in the model layer of the AI stack. People want to know whether Chinese models will become the next frontier in the AI race, and how Chinese models like Qwen 1.5 will affect the demand for intelligence from the application layer. These are certainly interesting discussions to talk about, and we can make a lot of fun conjectures to debate how the rest of the industry might shape up to. But, what's really impressive about Qwen 1.5 is not just in the benchmarks alone, but how it affects the layers below as we look at the semiconductor industry and how the economics of inference looks like. So, in order to look at the bigger picture, we have to look at the model architecture and see how the ground is shifting underneath us. And at a high level, Qwen 1.5 is all about efficiency and intelligence. And since there's a lot to go through, let's start with what we already all know, and then build our understanding from there. Quick disclaimer, this video does get slightly

  2. 1:16 , obre el vídeo en una pestanya nova

    more technical than usual as the video goes on. But, I really think it's important to at least get a grasp on why innovations coming from Qwen 1.5 is so unique. So, let's start by grounding our discussion from what we all know, or at least heard of by now, which is mixture of experts. Ever since around 2024, mixture of experts started to become adopted as the industry standard, and a large majority of models now use mixture of experts at the core. The idea behind mixture of experts is to activate only a small portion of the model instead of the entire model, largely to reduce the compute overhead to process each token. Now, depending on the model that you choose, you'll have different levels of sparsity of experts. Minimax M3 activates around 3.1% of experts. Incline from Thinking Machine at 3.1% Neumotron 3 Ultra activates around 4.3% and now Chimera 3 around 1.8% expert activated, which makes this model not just the biggest in size among open models, but one of the smallest activation ratios. Chimera 3 is divided into 896 experts and only 16 experts are activated per token, which is how they got to 1.8% activation ratio at any given time. And even comparing this model to their previous Chimera 2 model, which was a 1 trillion parameters in size, they not only grew their number of experts more than double while decreasing the activation of experts from 2% to 1.8%, which goes to show how

  3. 2:43 , obre el vídeo en una pestanya nova

    they scale their model in size without sacrificing efficiency. So, the question is how does this efficiency here actually look like when we run them on GPUs in data centers. In other words, does the efficiency also carry out when it comes to inference? A model like Chimera 3 that's this big is typically spread across many GPUs in data centers. Even at a lower precision, the model's weight alone is scattered across nearly six GPUs in Nvidia DGX B300 setup. And this leaves very little room for the context windows to be stored in the form of KB cache and more. So, in a more realistic deployment setup, your experts will typically be spread across supernode of 64 GPUs, which is what they recommend, or even Nvidia NVL72 configuration containing 72 chips in a single rack, which means every token that passes through the model could be doing many trips across GPUs interconnected within the rack because experts are spread across a wide array of GPUs, which means now token will need to travel from GPU to GPU to activate experts that are scattered. And every time data moves from one GPU to another GPU, it adds a communication overhead. KimiK3 added what's called Stable Latent MoE, building on top of Mixture of Experts. And if you have seen my recent video on NeMoTron, it's very similar to NeMoTron's Latent MoE, where the token embedding is compressed into a lower latent representation. Since token needs

  4. 4:09 , obre el vídeo en una pestanya nova

    to travel from GPU to GPU, having a much more compressed token representation helps reduce the communication overhead depending on the compression ratio. And since our token is compressed into a lower dimension, it reduces the amount of data that's actually passed between the GPUs and also the compute that's performed on them since the dimension is reduced as well. This is what Latent MoE does. We can see it from their diagram of KimiK3 showing the down projection of the token first, routed to experts with two shared experts that's always activated by default, and flowing the rest through the pool of experts here. And later, it gets projected back up to the original dimension for softmax. And this pool of experts that you see here is typically spread across many GPUs in a server. And the word stable in stable latent MoE here likely refers to their efforts in stabilizing the router during training when it comes to selecting the experts. Since KimiK3 practically split the model into 896 experts, selecting only 16 experts from a huge list of experts is not a trivial task. The router needs to consider the whole list of experts with their own scores and choose. And even a small variation can throw off the router big time. In other words, you can't have this many experts and select this little without a strong mechanism that help keep the balance in training. Instead of using popular methods like in the case of Deep Seek 33 or NeMoTron 3 Ultra that use bias to

  5. 5:37 , obre el vídeo en una pestanya nova

    nudge the router to pick experts by penalizing overused experts and promoting underused experts to reach equilibrium, KimiK3 improved the selection mechanism by using what's called quantile balancing, which helps expert allocation directly from the distribution of router scores, kind of like making each expert take the LSAT and grading them by percentile curve, rather than comparing them using a fixed raw scores. This helps the router decide which expert should be selected relative to the rest of the experts in score. Okay, the next component we'll get into for Kimi K3 is this bottom left section of the diagram. And this is really the meat and bone when it comes to why Kimi K3 is such a beautifully crafted model. This section right here is what helped contribute Kimi K3 to maintain six-time decoding throughputs, while also scoring higher than the status quo without sacrificing the speed. And what makes this entire thing possible is what's called Kimi Delta attention, or KDA for short. And surprisingly, KDA has already been around since October 2025. So, Kimi K3 essentially adopts what they already reached 9 months ago into their new model, but at a much bigger scale. So, how does KDA really work? Because it seems like it works really well. The keyword here is the letter A, attention. I'm sure we all heard of by now that attention is expensive. But we also love a model that can offer a 1 million

  6. 6:55 , obre el vídeo en una pestanya nova

    context window at the application layer. And even here in the US, where we have much more compute available, offering a model at 1 million context window without modifying the attention is sort of foolish. The technical terminology that we use is making something quadratic complexity into sub-quadratic or even linear. And there are so many different ways that researchers have contributed to make this happen. And one of them is called linear attention. And linear attention works exactly how it sounds. How do we make our growing compute demand more manageable as the model scales? Models like Nemotron 3 uses what's called Mamba 2, which replaces some of its attention layer that's known to be expensive with a recurrent state space memory. If this sounds gibberish to you, basically the core idea is having a predefined memory cell where new information coming in updates the old memory while old memory is erased at a learned rate following a decay schedule. For those who are mathematically inclined, the equation would look something like this where alpha determines how much previous memory has decayed and the new information writes the current memory on top. You might notice that this sounds a lot like recurrent neural network and it practically is, at least in how memory is stored by the model. And this will become more important later in the video when we get into exactly how Kim i K3

  7. 8:12 , obre el vídeo en una pestanya nova

    optimizes even further. Now, building on this learned decay idea, what if instead of rewriting the memory with the new value, we find the error instead and only apply that error to correct our memory to make sure that this is all efficient. This method is called gated delta net, which improves the decay rule, as you can see, to not only decay old memories according to schedule, but also efficiently update the error between its value and the predicted. So, using gated delta net, we have more efficiency in how the memory is updated. And reading through the paper for gated delta net, it explicitly says that the challenge still is implementing gated delta in a hardware efficient manner. So, now we finally get to Kim i delta attention, which is what Kim i K3 incorporates in their model. And mathematically, Kim i delta simply replaces the decay control in the gated delta net with a function that gives you a much more fine-grained control over how memory is exactly decayed and actually carries out through each channel. Gated delta net couldn't independently control how much information is retained and forgotten, and KDA essentially allows more granular control of how information is actually retained and forgotten channel by channel at different rates. And in Kim i's case, they interleave the Kim i delta attention at a 3:1 ratio following their ablation study that helped them pick the more ideal ratio. And you can

  8. 9:32 , obre el vídeo en una pestanya nova

    see in the diagram here where they have three KDA layers with one global attention called gated MLA, making this a hybrid linear attention by definition. I mentioned earlier how this looks a lot like a recurrent neural network. And the reason why it's important here is because when it comes to training, one of the biggest drawbacks with RNN was its inefficiency in training compared to transformers because of the sequential nature that made training difficult due to temporal dependence. Following the original paper in gated Delta net that used chunk-wise parallel to optimize on training, Kimi also optimized by grouping multiple steps to help parallelize training to deal with temporal dependencies. And you can read through their hardware efficient chunk-wise algorithm here to get deeper understanding into how they actually work. Now, looking back at Kimi's diagram, we covered stable latent movie, we just covered Kimi Delta attention and hybrid layers. One big thing that you might have noticed here was this whole section showing many red lines. The red pipes here have a lot to do with how the plumbing works in information moving across the network. This is called attention residual. And much like how Kimi Delta attention was released 9 months before it was incorporated into Kimi K3's official release, attention residual was also released back in March, so about 4 months before the

  9. 10:47 , obre el vídeo en una pestanya nova

    release of Kimi K3. Residual network in general is sort of like this unsexy blue-collar part of model architecture since it's about creating streams for communication to happen much like real plumbing. Now, I did a thorough explanation on the theory behind residual network when I covered Deep Seek MHC video for reference. But the reason why we need this in the first place is because typically we have so many layers doing operations on top of our input where by the time you get to the end, the information gets distorted so much that it becomes really difficult to train looking back the deeper the model gets. And residual network helps us create the plumbing that's necessary for information to carry layer by layer without the pressure building up. So, just like plumbing may be necessary to relieve water pressure, residual network help allow models to scale in layers by creating additional streams for inputs to retain its original state as it moves through layers and modifications are applied on top. And standard residual connection in transformers did help, but the drawback is that layers that are deeper into the model often become diluted since they know very little about layers that are much earlier on. Attention residual changes this by allowing the current layer to selectively pull information from earlier residual states. And for Qwen 1.5 they're incorporated into a logical

  10. 12:04 , obre el vídeo en una pestanya nova

    block and grouping together to prevent connection layer from becoming too expensive. So, not only do we have information flowing between layers, grouping previous layers into a bigger logical block helps reduce too much information flowing between layers, thereby decreasing the interconnect burden on GPUs. And looking at the research paper for attention residual, it showed very strong results in comparison since it makes the model a lot more expressive. And this is a great addition to Qwen 1.5 model. Now, as a closing note, I'm personally excited to see how Qwen 1.5 actually runs on more advanced chips here in the US. There's already been talks of our government potentially banning Qwen 1.5, but I think that would be a huge mistake given that we have so much gain in the US. Even looking at just how much more advanced we are in chip and the infrastructure layer to unleash the model potentially at a faster or potentially cheaper inference than their current pricing at $3 per million input token and $15 per million output tokens. I'm also really curious to see how this number might look when new clouds in the US get a hold of this open model and serve them for general public use. And it certainly paints an interesting dilemma where Chinese models that are shooting for efficiency could be run more efficiently here in the US assuming that we can leverage our stacks underneath.