Kimi K3 (arXiv 2607.24653, 2026-07) is Moonshot AI’s 2026 flagship: a natively multimodal MoE with 2.8T total parameters (Table 1: 2.78T) and 104B active, a 1M-token context and fully released weights. The report positions itself plainly: it “still trails the most powerful proprietary models, namely Claude Fable 5 and GPT-5.6 Sol”, but “consistently outperforms other open and proprietary models evaluated in our suite”.
The report’s story is “push both scaling axes together”. The open-model ecosystem moved fast on the test-time axis (reasoning RL, agents) but pre-training stayed in the 1T class. K3 scales pre-training to the 3T class while scaling RL, reasoning effort and long-horizon interaction to a 1M context. The architecture widens information flow in three directions.
- Length (token mixing): three layers of KDA (Kimi Delta Attention) from Kimi Linear for every Gated MLA layer.
- Depth (layer mixing): Attention Residuals — each layer reads the outputs of earlier layers selectively with softmax attention.
- Width (channel mixing): Stable LatentMoE — 16 of 896 routed experts active, computed in a latent space, stabilised by RMSNorm, SiTU-GLU and Quantile Balancing.
Together with data and training recipes, these are reported to give about 2.5× the scaling efficiency of K2 (Figure 7). This lesson assumes you have read K2 and k1.5 and opens the new parts one by one with equations and code.
At a glance
| Item | Details |
|---|---|
| Lab | Moonshot AI (Kimi Team) |
| Released | 2026-07-27 (arXiv 2607.24653, v2 2026-08-07) |
| Size | 2.78T total, 104.2B active (Table 1) |
| Architecture | 93 layers = 69 KDA + 24 Gated MLA (3:1, last layer MLA), Block AttnRes (8 blocks of 12 layers), Stable LatentMoE (16 of 896 routed + 2 shared, latent width 3584), 1 dense layer, 1 MTP layer |
| Vision | MoonViT-V2 (27 layers, 401M, patch 14, 12 heads), trained from scratch with next-token prediction |
| Context | 1M (training 8K → 64K, cooldown 256K → 1M), no positional encoding (NoPE) |
| Pre-training tokens | Not disclosed |
| Optimiser | Per-Head Muon + K2’s weight clipping, cosine LR (1% warm-up), weight decay 0.1 |
| Weights | Fully released (Hugging Face moonshotai/Kimi-K3, license listed as kimi-k3) |
| Links | arXiv · MoonEP |
What is new
- Hybrid linear attention at frontier scale: KDA 3 : MLA 1, with NoPE MLA and a channel-wise output gate. A lower bound on the KDA decay turns the whole chunk kernel into Tensor Core matmuls.
- Attention Residuals: replaces the uniform accumulation of the residual stream with depth-wise attention (in blocks).
- Stable LatentMoE: sparsity 56 (896/16), routed experts at half width in a latent space; RMSNorm and SiTU-GLU against activation blow-up, Quantile Balancing to balance nearly a thousand experts.
- Native vision: the vision encoder is no longer SigLIP-initialised but trained from scratch with next-token prediction — more stable, same performance.
- Post-training: nine experts (3 domains × 3 reasoning-effort levels) trained with RL and merged with multi-teacher on-policy distillation; a white-box RL environment that assembles harnesses from modules; knowledge-graph-guided task synthesis; million-token agentic-RL infrastructure.
Architecture
→ Go deeper: The Kimi lineage — K2 → Kimi Linear → K3.
Overall layout
Kimi K3(arXiv 2607.24653, 2026.7)는 Moonshot AI의 2026년 플래그십이다. 총 2.8T(Table 1: 2.78T), 활성 104B 파라미터의 네이티브 멀티모달 MoE이고, 1M 토큰 문맥을 지원하며 가중치를 전부 공개했다. 보고서 스스로 “가장 강한 독점 모델(Claude Fable 5, GPT-5.6 Sol)에는 전반적으로 뒤지지만, 평가한 다른 열린·독점 모델보다는 일관되게 앞선다”고 위치를 정한다.
보고서의 서사는 “두 스케일링 축을 함께 민다”이다. 열린 모델 생태계는 test-time 축(추론 RL, agent)에서는 빨리 나아갔지만 사전학습 규모는 1T급에 머물렀다. K3는 사전학습을 3T급으로 키우면서 RL·추론 effort·장기 상호작용을 1M 문맥으로 키운다. 아키텍처는 정보 흐름을 세 방향으로 넓힌다.
- 길이(token mixing): Kimi Linear의 KDA(Kimi Delta Attention) 3층마다 Gated MLA 1층.
- 깊이(layer mixing): Attention Residuals — 각 층이 앞선 층들의 출력을 softmax attention으로 골라 읽는다.
- 폭(channel mixing): Stable LatentMoE — routed expert 896개 중 16개 활성, latent 공간에서 계산, RMSNorm·SiTU-GLU·Quantile Balancing으로 안정화.
이 셋과 데이터·학습 레시피를 합쳐 K2 대비 약 2.5배의 스케일링 효율을 얻었다고 보고한다(Figure 7). 이 레슨은 K2와 k1.5를 읽었다고 가정하고, 새로 들어온 부품을 하나씩 수식과 코드로 연다.
한눈에
| 항목 | 내용 |
|---|---|
| 연구소 | Moonshot AI (Kimi Team) |
| 공개 | 2026-07-27 (arXiv 2607.24653, v2 2026-08-07) |
| 크기 | 총 2.78T, 활성 104.2B (Table 1) |
| 아키텍처 | 93층 = KDA 69 + Gated MLA 24 (3:1, 마지막 층은 MLA), Block AttnRes(12층 block 8개), Stable LatentMoE (routed 896 중 16 + shared 2, latent 폭 3584), dense 층 1, MTP 1층 |
| 비전 | MoonViT-V2 (27층, 401M, patch 14, head 12), next-token prediction으로 처음부터 학습 |
| 문맥 | 1M (학습 8K → 64K, cooldown에서 256K → 1M), 위치 인코딩 없음(NoPE) |
| 사전학습 토큰 | 미공개 |
| 옵티마이저 | Per-Head Muon + K2의 weight clipping, cosine LR(1% warmup), weight decay 0.1 |
| 가중치 | 전부 공개 (Hugging Face moonshotai/Kimi-K3, 라이선스 표기 kimi-k3) |
| 링크 | arXiv · MoonEP |
무엇이 새로운가
- 하이브리드 선형 attention의 프런티어 규모 적용: KDA 3 : MLA 1, MLA는 NoPE + 채널별 출력 gate. KDA decay에 하한을 둬서 chunk 커널을 전부 Tensor Core 행렬곱으로 바꿨다.
- Attention Residuals: residual 스트림의 균일한 누적을 깊이 방향 attention으로 대체(block 단위).
- Stable LatentMoE: sparsity 56(896/16), routed expert는 절반 폭 latent에서. 활성 폭발을 막는 RMSNorm·SiTU-GLU, 천 개 가까운 expert의 균형을 맞추는 Quantile Balancing.
- 네이티브 비전: SigLIP 초기화를 버리고 vision encoder를 next-token prediction으로 처음부터 학습. 학습이 더 안정적이고 성능은 같았다.
- 사후학습: 3개 도메인 × 3개 reasoning effort = 전문가 9개를 RL로 만들고 multi-teacher on-policy distillation으로 하나로 합친다. harness를 모듈로 조립하는 white-box RL 환경, 지식 그래프 기반 과제 합성, 1M 토큰 agentic RL 인프라.
아키텍처
→ 더 깊이: Kimi 계보 — K2 → Kimi Linear → K3.
전체 배치
A layer is attention (KDA or Gated MLA) + a Stable LatentMoE FFN. The 4-layer block [KDA, KDA, KDA, MLA] repeats and one more MLA layer closes the backbone, so the last layer always does global attention (§2.1). 23 × 3 = 69 KDA and 23 + 1 = 24 MLA, matching Table 1. Only the 24 MLA layers have a KV cache that grows with length; the 69 KDA layers carry a fixed-size state . With the same MLA dimensions, the long-context KV cache is about 24/93 ≈ 26% of an all-MLA model — consistent with the “up to 75% KV-cache reduction” the Kimi Linear paper reports for the same 3:1 ratio.
KDA: a delta rule with per-channel gates
Linear attention accumulates key→value associations in a single matrix, , . As the Kimi Linear paper puts it, this is gradient ascent on and has no criterion for erasing anything. DeltaNet instead takes one step with learning rate on the reconstruction loss :
With and it erases the old value stored at key and overwrites it with the new one. Gated DeltaNet multiplies by a scalar forget gate (weight decay on fast weights), and KDA makes that gate a per-channel vector (K3 Eq. 1):
Each key channel can have its own memory lifetime. Kimi Linear interprets this per-channel decay as a “learnable positional encoding”, which is why RoPE can be dropped from the MLA layers (NoPE). The parameterisation (Eq. 2) is , , and a low-rank decay logit . The output is head-wise RMSNorm’d and multiplied by a full-rank sigmoid gate (Eq. 6; changed from Kimi Linear’s low-rank gate).
Chunkwise parallel form. For training and prefill, the inside of a chunk of length is computed with matmuls and only the chunk-to-chunk part is recurrent. With the in-chunk cumulative decay stacked into , unrolling the “pseudo-value” the delta rule actually writes, , gives a lower-triangular linear system (the UT transform) whose solution has the form . The output is (K3 Eq. 4)
The code below checks that an implementation derived directly from this formula matches the recurrence to machine precision.
Lower-bounded decay (K3’s change)
Eq. 4 divides keys by . is a product of values in (0,1), so can grow without bound. Kimi Linear computed relative decay in log space and split chunks into 16-token tiles: off-diagonal tiles as Tensor Core matmuls, diagonal tiles position-pair by position-pair. Those diagonal tiles were the main intra-chunk bottleneck. K3 changes the decay map itself (Eq. 5):
With fixed, retention is always and the cumulative log-decay over a 16-token tile lies in . is within BF16’s dynamic range (max about ), so diagonal tiles can be plain matmuls too.
→ Go deeper: Linear attention and SSMs — KDA next to Gated DeltaNet, Mamba and lightning attention.
층 하나는 attention(KDA 또는 Gated MLA) + Stable LatentMoE FFN이다. 4층 block [KDA, KDA, KDA, MLA]가 반복되고 백본 끝에 MLA 한 층이 더 붙어 마지막 층은 항상 전역 attention이다(§2.1). 23 × 3 = 69 KDA, 23 + 1 = 24 MLA로 Table 1과 맞는다. 길이에 비례해 자라는 KV cache는 MLA 24층에만 있고 KDA 69층은 고정 크기 상태 만 들고 다닌다. 같은 MLA 차원이라면 전 층 MLA 대비 긴 문맥 KV cache가 약 24/93 ≈ 26%다. Kimi Linear 논문이 같은 3:1 비율로 보고한 “KV cache 최대 75% 감소”와 맞는 숫자다.
KDA: 채널별 gate가 붙은 delta rule
선형 attention은 , 로 key→value 연관을 행렬 하나에 누적한다. Kimi Linear 논문의 정리대로 이것은 에 대한 경사 상승이라 지울 기준이 없다. DeltaNet은 대신 재구성 손실 에 학습률 로 한 걸음 간다.
, 이면 key 에 저장된 옛 값을 지우고 새 값으로 덮어쓴다. Gated DeltaNet은 여기에 스칼라 forget gate (fast weight의 weight decay)를 곱했고, KDA는 그 gate를 채널별 벡터 로 바꾼다(K3 식 1).
key 채널마다 기억 수명을 따로 정할 수 있다. Kimi Linear는 이 채널별 decay를 “학습 가능한 위치 인코딩”으로 해석하고, 그래서 MLA 층에서 RoPE를 빼도(NoPE) 된다고 본다. 파라미터화(식 2)는 , , , decay logit (저랭크)이다. 출력은 head별 RMSNorm 뒤 full-rank sigmoid gate를 곱한다(식 6; Kimi Linear의 저랭크 gate에서 바뀜).
chunk 병렬형. 학습과 prefill에서는 길이 의 chunk 안을 행렬곱으로, chunk 사이만 순환으로 계산한다. chunk 안의 누적 decay 를 쌓은 에 대해, delta rule이 실제로 쓰는 “pseudo-value” 를 풀어 쓰면 하삼각 연립방정식이 되고(UT transform), 그 해가 꼴이다. 출력은(K3 식 4)
다. 아래 코드는 이 식을 직접 유도한 구현이 순환형과 기계 정밀도로 일치하는지 확인한다.
하한이 있는 decay (K3의 변경)
식 4는 key를 로 나눈다. 는 (0,1) 값의 곱이라 는 한없이 커질 수 있다. Kimi Linear는 log 공간에서 상대 decay를 계산하고 chunk를 16토큰 tile로 다시 나눠, 대각선 밖 tile은 Tensor Core 행렬곱으로, 대각 tile은 위치 쌍별로 계산했다. 이 대각 tile이 chunk 안 계산의 주 병목이었다. K3는 decay 사상 자체를 바꾼다(식 5).
로 고정하면 보존율은 항상 이고, 16토큰 tile의 누적 log-decay는 안에 있다. 은 BF16의 동적 범위(최대 약 ) 안이므로 대각 tile도 그냥 행렬곱으로 계산할 수 있다.
→ 더 깊이: Linear attention과 SSM — KDA를 Gated DeltaNet·Mamba·lightning attention과 나란히 본다.
Gated MLA (NoPE)
The 24 global layers are MLA (the same KV-latent compression as K2) with two differences. There is no positional encoding (NoPE): position and recency are handled by the KDA layers, and MLA does pure content-based global interaction. So extending the context needs no RoPE-base retuning or YaRN (§2.1.2, §3.4). And a channel-wise full-rank output gate is added. To avoid flash attention’s biased rounding error, the attention output is kept in FP32 during training.
Attention Residuals: depth-wise attention
A standard residual, , keeps a single state: the unit-weight sum of all earlier layer outputs. The report calls this “a bottleneck reminiscent of RNNs over time”, and just as the Transformer replaced recurrence over time with attention, it replaces the depth direction with attention too (§2.2). With a learned pseudo-query per layer :
The query is an input-independent per-layer vector, and the RMSNorm on keys stops layers with large outputs from dominating the weights. Attending to everything (Full AttnRes) costs compute, which is affordable, but all layer outputs must be kept, so memory and pipeline communication are . Block AttnRes splits the layers into blocks, sums outputs inside a block into , and attends only to the block-level representations plus the current block’s partial sum (Eq. 10). The cost becomes , and with most of the gain remains. K3 uses 8 blocks of 12 layers (the last one partial; 9 sources counting the embedding). Switch the residual type in the figure above to compare the number of sources.
AttnRes’s effect is quantified not in the K3 report but in the AttnRes paper. Its abstract says that in the Kimi Linear 48B/3B architecture trained on 1.4T tokens, AttnRes reduces PreNorm dilution, evens out output magnitudes and gradients across depth, and improves every evaluated downstream task.
Stable LatentMoE: a stabilised latent MoE
Pushing K2’s sparsity scaling law further, routed experts grow to 896 with 16 active (sparsity 56). Done naively, every token’s -dimensional representation would be sent to 16 experts, doubling communication and expert-weight traffic. LatentMoE runs the routed path in a low-dimensional latent space (Eq. 11):
with and full-width shared experts. Pick the K3 config in the calculator below: the dispatch width is 16 × 3584 = 57,344, exactly the same as K2’s 8 × 7168. Twice the experts for the same traffic.
Gated MLA (위치 인코딩 없음, NoPE)
24개 전역 층은 MLA(K2와 같은 KV latent 압축)이지만 두 가지가 다르다. 위치 인코딩이 없다(NoPE). 위치·최근성은 KDA 층이 담당하고 MLA는 순수한 내용 기반 전역 상호작용만 한다. 덕분에 문맥을 늘릴 때 RoPE base 재조정이나 YaRN 같은 수정이 필요 없다(§2.1.2, §3.4). 그리고 채널별 full-rank 출력 gate 가 붙는다. flash attention의 편향된 반올림 오차를 피하려고 학습 중 attention 출력을 FP32로 유지한다.
Attention Residuals: 깊이 방향 attention
표준 residual 은 이전 모든 층의 출력을 가중치 1로 더한 상태 하나만 남긴다. 보고서는 이것을 “깊이 방향의 RNN 병목”이라 부르고, Transformer가 시간 방향 RNN을 attention으로 바꾼 것처럼 깊이 방향도 attention으로 바꾼다(§2.2). 층 마다 학습되는 pseudo-query 로
query가 입력과 무관한 층별 벡터이고, key의 RMSNorm은 출력 크기가 큰 층이 가중치를 독차지하지 않게 한다. 전부 attend하면(Full AttnRes) 연산은 로 감당할 만하지만 모든 층 출력을 들고 있어야 해서 메모리·pipeline 통신이 다. Block AttnRes는 층을 개 block으로 나눠 block 안 출력을 합 으로 줄이고, block 수준 표현 과 현재 block의 부분합 에만 attend한다(식 10). 비용이 가 되고, 이면 이득 대부분이 남는다. K3는 12층 block 8개(마지막은 부분 block, embedding 포함 9개 source)를 쓴다. 위 그림에서 residual 방식을 바꿔 가며 source 수를 비교해 보자.
AttnRes의 효과 수치는 K3 보고서가 아니라 AttnRes 논문에 있다. 초록은 Kimi Linear 48B/3B 구조에 넣어 1.4T 토큰 학습했을 때 PreNorm 희석이 줄고 깊이별 출력 크기·gradient 분포가 고르게 되며 평가한 모든 다운스트림 과제가 좋아졌다고 쓴다.
Stable LatentMoE: 안정화한 latent MoE
K2의 sparsity scaling law를 더 밀어 routed expert를 896개, 활성을 16개(sparsity 56)로 늘렸다. 그대로면 token마다 차원 표현을 16개 expert로 보내야 해서 통신과 expert 가중치 트래픽이 두 배가 된다. LatentMoE는 routed 경로를 저차원 latent에서 돌린다(식 11).
, shared expert 개는 전체 폭. 아래 계산기에서 K3 설정을 고르면 dispatch 폭이 16 × 3584 = 57,344로 K2의 8 × 7168과 정확히 같다. 같은 통신량으로 두 배의 expert를 켜는 것이다.
At this sparsity two problems get worse, the report says (§2.3):
- Activation blow-up. The routed path chains → gated expert FFN → , almost four consecutive matmuls — an ill-conditioned structure. At 2.8T scale, internal activations exploded. Remedies: (a) an RMSNorm after aggregation and before the up-projection (also reported to improve validation loss and downstream), (b) SiTU-GLU.
- Balancing nearly a thousand experts goes beyond the regime where existing loss-free bias updates behave. Remedy: Quantile Balancing (key method below).
SiTU-GLU (Eq. 12) puts a smooth cap on both factors of SwiGLU:
is nearly the identity near the origin, so SwiGLU’s local response is preserved, while the output is bounded by .
→ Go deeper: Anatomy of MoE — LatentMoE and load balancing (including Quantile Balancing) across models.
sparsity가 이 정도로 커지면 두 문제가 커진다고 보고서는 쓴다(§2.3).
- 활성 폭발. routed 경로는 → gated expert FFN → 로 행렬곱이 거의 네 번 이어지는 나쁜 조건의 구조다. 2.8T 규모에서 내부 활성이 폭발했다. 대책은 (a) 집계 후 up-projection 전에 RMSNorm(검증 loss와 다운스트림도 좋아졌다고 보고), (b) SiTU-GLU.
- 천 개 가까운 expert의 균형. 기존 loss-free bias 갱신의 안정 영역을 넘는다. 대책은 Quantile Balancing(아래 핵심 method).
SiTU-GLU(식 12)는 SwiGLU의 두 인수 모두에 부드러운 상한 를 씌운다.
은 원점 근처에서 거의 항등이라 SwiGLU의 국소 반응을 유지하고, 출력은 으로 묶인다.
→ 더 깊이: MoE 해부 — LatentMoE와 부하 균형(Quantile Balancing 포함)을 여러 모델에 걸쳐 본다.
Native vision and Per-Head Muon
K2.5 initialised its vision encoder from SigLIP, but K3’s MoonViT-V2 (27 layers, about 0.4B, RMSNorm, no biases) is trained from scratch with next-token prediction jointly with the language model (§2.4). The motivation is stability: the SigLIP-initialised MoonViT-3D had persistently higher gradient norms and frequent spikes in joint training while MoonViT-V2 stayed stable (Figure 6), and vision performance matched the SigLIP-initialised baseline. Images and videos share parameters (factorised spatial/temporal attention, temporal pooling), and a 2×2 pixel shuffle cuts visual tokens by 4× so inputs up to 3584×3584 fit in the 1M context.
The optimiser splits K2’s Muon per head (§2.5): the momentum of the Q·K·V projections is partitioned along the head dimension and each block is Newton–Schulz-orthogonalised separately. Orthogonalising the whole matrix lets heads with larger gradient scales dominate the shared update direction while small heads get under-normalised updates; per head, update magnitudes are equalised across heads, and NS on several tall blocks is cheaper than on one full matrix.
Data
The report discloses neither data volume nor mixture ratios. What it does disclose is the composition and pipeline (§3.1, §3.4).
| Component | Details |
|---|---|
| Four text domains | Web Text, Code, Mathematics, Knowledge. Rule heuristics + classifier quality scores + dedup; per-domain sampling rates set by small-model ablations |
| Rephrasing | K2’s recipe unchanged: knowledge and maths corpora rewritten with style/perspective-diverse prompts, chunk-wise autoregressive generation, fidelity checks against the source |
| Vision | K2.5’s taxonomy: captions, interleaved image–text, OCR, perception, video, visual coding. Coordinate supervision in both absolute and normalised [0,1] form |
| Programmatic multimodal | Code paired with its rendered output, heavily scaled up: SVG, 3D assets, web pages, games, CAD drawings |
| Long context | Remove near-duplicates, binary blobs, truncated files and machine logs (exact + fuzzy dedup, perceptual hashing of video frames); upsample genuinely long documents and videos; synthetic long-context tasks that permute and concatenate documents and sub-tasks so that they can only be solved by gathering information scattered across the 1M context |
Post-training data are mostly environments (§4.2); see the environment table in the training section below. SFT trajectories are synthesised by domain-expert models from earlier Kimi releases and pass multi-stage verification and human annotation. Everything is serialised with an XTML (eXtensible Token Markup Language) chat template, whose distinguishing feature is that tool arguments are written as typed blocks instead of escaped JSON strings (App. F).
Training
Pre-training
- Re-tuned scaling laws (§3.2): a new architecture changes the optimal batch, learning rate, tokens-per-parameter and model shape, so new scaling studies were run. On held-out OOD validation data, about 2.5× efficiency over K2 (Figure 7).
- Cosine > WSD: contrary to reports that WSD matches or beats cosine, the two schedules have very different optimal learning rates and batches; with an independent hyperparameter search for each, cosine consistently reaches a lower final loss. Hence cosine (1% linear warm-up). A good warning about comparing schedules under shared hyperparameters.
- Optimiser: Per-Head Muon + K2’s weight clipping (QK-Clip), weight decay 0.1, QB for MoE balance.
- Natively multimodal: text and visual tokens mixed in one next-token objective from the start.
- Context curriculum: four stages, 8K → 64K in pre-training and 256K → 1M in cooldown. NoPE means no positional-encoding changes.
Infrastructure (§5.2) combines PP (virtual stages) + EP + ZeRO-1 DP + Pipeline ZeRO-2 gradient sharding + KDA Context Parallelism. MoonEP places redundant experts online from each micro-batch’s router outputs so every rank processes exactly the same number of tokens, and proves that redundant experts per rank always admit a balanced plan (App. E). KDA Context Parallelism computes per segment only (cumulative transition , state started from zero ) and stitches segments with one fixed-size all-gather (Eq. 17; checked in the code below).
Post-training: SFT → nine per-effort RL experts → MOPD
SFT (§4.1.1) is the cold start for RL. From SFT onward QAT with MXFP4 weights and MXFP8 activations is on (only MoE expert weights in MXFP4; the rest in higher precision), and in RL rollout and training use the same quantisation, removing the train–inference mismatch (§4.1.4).
RL (§4.1.2) builds nine experts: three domains × three reasoning efforts.
| Domain | Sub-tasks |
|---|---|
| General tasks | General experience, vision, reasoning, faithfulness, search, knowledge work |
| General agents | Long-horizon assistant tasks, deep research, paragraph-level writing |
| Coding agents | SWE, coding experience, kernel optimisation, web development |
Policy optimisation follows the K2.5 algorithm. K2.5 Eq. (1) takes the k1.5 objective down to tokens and adds log-ratio masking:
is the total number of tokens in the batch, and Clip here is not a PPO-style clamp but a mask that zeroes the gradient of tokens whose log-ratio is outside the interval (regardless of the advantage’s sign). K3 extends partial rollout: while prompts × responses are generated, generation pauses once a fraction has finished and training proceeds; paused rollouts resume first in the next iteration together with their sandbox state. The report claims the per-token regularisation tolerates the extreme off-policyness of a trajectory spanning several iterations (pick the λ scheme in the k1.5 lesson’s rollout figure).
- Reasoning-effort RL: each problem gets an initial budget from the cold-start model, and the reward is overwritten with when total tokens . For agentic tasks counts cumulative output tokens including reasoning and tool-call arguments. A max expert is trained first with a large , then is annealed for the high and low experts.
- Agentic GRM: non-verifiable tasks use K2.5’s tournament-style group reward with binary comparisons, but the judge must follow a protocol: (1) read the output, (2) write a rubric, (3) score each candidate against it, (4) record the scores in a scorepad. Against verbosity hacking, an output longer than automatically loses the comparison.
MOPD (§4.1.3) samples a domain and effort and distils on-policy from the matching teacher . The token reward is the clipped teacher–student log-ratio (Eq. 15):
A token sampled by the student from its own distribution earns a positive reward if the teacher finds it more plausible and a negative one otherwise; in expectation this is a token-level estimate of the reverse KL . The student is conditioned on the effort (the teacher is not). This dense reward plugs straight into the RL framework, partial rollout included. Top- distribution distillation was tried too, with no advantage in convergence speed or final performance.
Deployment-aware training: the MTP layer is fine-tuned into an EAGLE-3-style draft (7-step unroll, fusing features from AttnRes blocks 1, 4 and the last, with the fusion matrix initialised to ). The loss is not KL but the acceptance rate of speculative sampling itself, (Eq. 16).
RL environments (§4.2)
| Environment | Key points |
|---|---|
| White-box harness environment | Tool interfaces, system prompts, context management, skills, memory and subagents as composable modules. Harnesses such as Kimi Code, Claude Code, Codex, OpenClaw and Hermes, and new combinations, are swapped per task group to prevent overfitting to one harness |
| Knowledge-graph task synthesis | Agents grow a hierarchical concept DAG through web exploration (stopping at atomic concepts); sampled nodes drive retrieval of public material and task synthesis |
| Verifiable agentic problems | Multi-step search; investment banking, data analysis and legal work with sandbox tools over tens to hundreds of steps; visual reasoning that crops and zooms images with Python |
| Kernel optimisation | CUDA, Triton, CuTe DSL, Gluon, ThunderKittens, TileLang. Over the error threshold: 0; matching the expert implementation: 0.5; approaching the roofline: towards 1. A hacking detector (CUDA graph replay, input caching, precision reduction…) keeps growing |
| Personal assistant | Mock Gmail, Notion, Slack and Canvas; dozens of interdependent events over several simulated “days”; one rollout can have thousands of tool calls and millions of context tokens |
| Autonomous Execution Tasks | Only initial state, goal, tools, budget and an independent verifier — no procedure. Public verifiers (diagnostic feedback) are separated from hidden ones (held-out scenarios), with limited submissions and penalties |
| Web development | Deterministic functional tests + structural/pixel similarity + model judges. Build failures, runtime errors or “faking instead of implementing” score 0 |
A closer look at the key methods
1. Implementing and verifying KDA
The code below checks (1) that the recurrence and (2) the chunkwise form derived above agree, (2b) that KDA Context Parallelism’s affine composition is exact, (3) the delta rule’s overwrite, and (4) that the decay floor prevents overflow.
import numpy as np
rng = np.random.default_rng(0)
Tlen, dk, dv, C = 64, 16, 8, 16 # sequence length, key/value width, chunk size
def l2n(x): return x / np.linalg.norm(x, axis=-1, keepdims=True)
q = l2n(rng.normal(size=(Tlen, dk))); k = l2n(rng.normal(size=(Tlen, dk)))
v = rng.normal(size=(Tlen, dv))
beta = 1 / (1 + np.exp(-rng.normal(size=Tlen))) # write strength β_t ∈ (0,1)
z = rng.normal(size=(Tlen, dk)) + 1.0 # per-channel decay logits
g_min = -5.0
g = g_min / (1 + np.exp(-z)) # K3: g = g_min·sigmoid(e^A z), A = 0
alpha = np.exp(g) # per-channel retention α_t ∈ (e^-5, 1)
# 1) Recurrent form (Eq. 1): S_t = (I − β k kᵀ) Diag(α_t) S_{t−1} + β k vᵀ, o_t = S_tᵀ q_t
def kda_recurrent(q, k, v, alpha, beta):
S = np.zeros((dk, dv)); out = []
for t in range(len(q)):
S = alpha[t][:, None] * S # per-channel forgetting
S = S - beta[t] * np.outer(k[t], k[t] @ S) + beta[t] * np.outer(k[t], v[t]) # delta rule
out.append(S.T @ q[t])
return np.array(out), S
# 2) Chunkwise parallel form (Eq. 4): matmuls inside a chunk, recurrence only across chunks
def kda_chunk(q, k, v, alpha, beta, C):
S = np.zeros((dk, dv)); out = []
for s in range(0, len(q), C):
Q, K, V, B = q[s:s+C], k[s:s+C], v[s:s+C], beta[s:s+C]
Gam = np.cumprod(alpha[s:s+C], axis=0) # γ^{1→r}, [C, dk]
Kt, Kh = K * Gam, K / Gam # k⊙γ_r, k/γ_r
A_str = np.tril(Kt @ Kh.T, -1) # strictly lower-triangular
Tm = np.linalg.inv(np.eye(len(Q)) + B[:, None] * A_str) # UT transform (triangular inverse)
U = Tm @ (B[:, None] * V); W = Tm @ (B[:, None] * Kt)
Vt = U - W @ S # pseudo-values Ṽ = U − W S
Aqk = np.tril((Q * Gam) @ Kh.T) # lower-triangular incl. diagonal
out.append((Q * Gam) @ S + Aqk @ Vt) # inter-chunk + intra-chunk
S = Gam[-1][:, None] * S + (K * (Gam[-1] / Gam)).T @ Vt # state passed to the next chunk
return np.vstack(out), S
o_r, S_r = kda_recurrent(q, k, v, alpha, beta)
o_c, S_c = kda_chunk(q, k, v, alpha, beta, C)
print(f"recurrent vs chunkwise: max output error {np.abs(o_r - o_c).max():.2e}, max state error {np.abs(S_r - S_c).max():.2e}")
# 2b) KDA Context Parallelism (Eq. 17): if each segment computes only (cumulative transition M, state S̃ from zero),
# S_out = S̃ + M · S_in composes exactly → one fixed-size all-gather splits a long context
def segment(ks, vs, al, be):
M = np.eye(dk); St = np.zeros((dk, dv))
for t in range(len(ks)):
Mt = (np.eye(dk) - be[t] * np.outer(ks[t], ks[t])) * al[t][None, :] # (I − βkkᵀ)Diag(α)
M, St = Mt @ M, Mt @ St + be[t] * np.outer(ks[t], vs[t])
return M, St
S = np.zeros((dk, dv))
for r in range(4): # 4 ranks, 16 tokens each
sl = slice(16 * r, 16 * (r + 1))
M, St = segment(k[sl], v[sl], alpha[sl], beta[sl])
S = St + M @ S
print(f"4-rank composed state vs recurrent final state: max error {np.abs(S - S_r).max():.2e}")
# 3) The delta rule "overwrites": writing a new value to the same key changes what is read back
S = np.zeros((dk, dv)); key = l2n(rng.normal(size=dk)); v1, v2 = rng.normal(size=dv), rng.normal(size=dv)
for val in (v1, v2):
S = S - np.outer(key, key @ S) + np.outer(key, val) # β = 1, α = 1
lin = np.outer(key, v1) + np.outer(key, v2) # linear attention: just adds
print(f"delta-rule read − v2: {np.abs(S.T @ key - v2).max():.1e} linear-attention read − v2: {np.abs(lin.T @ key - v2).max():.2f}")
# 4) Why the decay needs a floor: size of 1/Γ inside a chunk (float32 max ≈ 3.4e38 ≈ e^88.7)
zz = rng.normal(size=(C, dk)) * 2 + 6.0 # many channels that want to forget hard
for name, gg in [("Kimi Linear: −softplus(z)", -np.log1p(np.exp(zz))),
("K3: −5·sigmoid(z) ", g_min / (1 + np.exp(-zz)))]:
cum = np.cumsum(gg, axis=0) # log Γ, 16-token tile
with np.errstate(over='ignore'):
recip = np.exp(-cum.astype(np.float32)) # 1/Γ in float32
print(f"{name} min cumulative log-decay {cum.min():7.1f} → max 1/Γ = {recip.max():.2e} inf count {np.isinf(recip).sum()}")
print(f"K3 floor guarantee: 16 × g_min = {16 * g_min:.0f} > −88.7, so 1/Γ < e^80 = {np.exp(80):.1e} (whatever z is)")The one line at the heart of the chunkwise derivation: unrolling the pseudo-value inside a chunk gives the lower-triangular system . The code’s Tm is its inverse (the UT transform); real kernels use forward substitution instead of an inverse. The per-channel decay enters in two places, and , and if gets too small the second overflows. That is why K3 has a floor.
2. Quantile Balancing
Auxiliary-loss-free balancing (DeepSeek-V3) adds a per-expert bias to the router scores only for the top-k selection, never in the mixture weights (Eq. 13). The bias moves by a fixed step, . Small adapts slowly; large oscillates. With 896 experts that trade-off becomes unmanageable.
QB computes “the bias that hits the target load exactly” directly from one forward pass. With tokens, experts and top-, the target load is . Routing with top- gives the -th biased score as token ‘s cutoff . Expert enters token ‘s top- iff , so with cutoffs fixed, expert ‘s load is , monotonically decreasing in . For the load to be exactly , must be the -th largest margin , i.e. its -quantile (Eq. 14):
Appendix C shows this is one step of exact coordinate minimisation of the dual of the balanced-assignment LP s.t. , : the token-side multipliers and expert-side multipliers both solve as the same kind of quantile. The subgradient of that dual objective is “target load − actual load”, so the sign update is SignSGD on the same objective, while QB jumps straight to that coordinate’s minimiser. Hence no learning-rate-like hyperparameter. For causality the bias is applied from the next step, and it is frozen at inference.
네이티브 비전과 Per-Head Muon
K2.5는 vision encoder를 SigLIP으로 초기화했지만, K3의 MoonViT-V2(27층, 약 0.4B, RMSNorm, bias 없음)는 처음부터 next-token prediction으로 언어 모델과 함께 학습한다(§2.4). 동기는 안정성이다. SigLIP 초기화 MoonViT-3D는 결합 학습 중 gradient norm이 계속 높고 spike가 잦았지만 MoonViT-V2는 안정적이었고(Figure 6), 비전 평가 성능은 SigLIP 초기화 기준선과 같았다. 이미지·비디오는 같은 파라미터로 처리하고(공간·시간 attention 분해, 시간 pooling), 2×2 pixel shuffle로 시각 토큰을 4배 줄여 3584×3584 입력까지 1M 문맥에 담는다.
옵티마이저는 K2의 Muon을 head별로 쪼갠다(§2.5). Q·K·V 투영의 momentum을 head 차원으로 나눠 따로 Newton–Schulz 직교화한다. 행렬 전체를 직교화하면 gradient 스케일이 큰 head가 공유 갱신 방향을 지배하고 작은 head는 덜 정규화된 갱신을 받기 때문이다. head별로 하면 head 사이 갱신 크기가 같아지고, 키 큰 블록 여러 개의 NS가 전체 행렬 하나보다 싸다.
데이터
보고서는 데이터 양과 혼합 비율을 공개하지 않는다. 공개된 것은 구성과 파이프라인이다(§3.1, §3.4).
| 구성 | 내용 |
|---|---|
| 텍스트 4개 도메인 | Web Text, Code, Mathematics, Knowledge. 규칙 휴리스틱 + 분류기 품질 점수 + dedup, 도메인별 샘플링 비율은 작은 모델 ablation으로 결정 |
| rephrasing | K2 레시피 그대로: 지식·수학 말뭉치를 문체·관점 다양한 프롬프트로, chunk 단위 autoregressive 생성, 원문 대비 fidelity 검증 |
| 비전 | K2.5 분류 체계: caption, interleaved 이미지-텍스트, OCR, perception, 비디오, 시각 코딩. 좌표 감독을 절대 좌표와 [0,1] 정규화 좌표 둘 다로 |
| 프로그램형 멀티모달 | 코드와 그 렌더링 결과를 짝지은 데이터를 크게 늘림: SVG, 3D asset, 웹페이지, 게임, CAD 도면 |
| 장문 | near-duplicate·바이너리·잘린 파일·기계 로그 제거(정확·fuzzy dedup, 비디오는 프레임 perceptual hash), 진짜 긴 문서·비디오를 upsample, 1M 문맥 곳곳에 흩어진 정보를 모아야 풀리게 문서와 하위 과제를 섞고 이어 붙인 합성 장문 과제 |
사후학습 데이터는 대부분 환경이다(§4.2). 아래 학습 절의 환경 표를 보자. SFT는 이전 Kimi 시리즈의 도메인 전문가 모델로 궤적을 합성하고 다단계 검증과 사람 주석을 거친다. 모든 궤적은 XTML(eXtensible Token Markup Language) 기반 chat template로 직렬화한다. 도구 인자를 JSON 문자열로 escape하지 않고 타입이 있는 블록으로 쓰는 것이 특징이다(부록 F).
학습
사전학습
- 스케일링 법칙 재조정(§3.2): 구조가 바뀌면 최적 batch·학습률·tokens-per-parameter·모델 모양도 바뀌므로 새로 스케일링 실험을 했다. held-out OOD 검증 데이터에서 K2 대비 약 2.5배 효율(Figure 7).
- cosine > WSD: WSD가 cosine과 같거나 낫다는 기존 보고와 달리, 두 스케줄의 최적 학습률·batch가 서로 크게 달라서 각각 따로 하이퍼파라미터를 찾아 비교하면 cosine이 일관되게 더 낮은 최종 loss를 냈다. 그래서 cosine(1% 선형 warmup)을 쓴다. 공유 하이퍼파라미터로 스케줄을 비교하는 실험 설계에 대한 좋은 경고다.
- 옵티마이저: Per-Head Muon + K2의 weight clipping(QK-Clip), weight decay 0.1, MoE 균형은 QB.
- 네이티브 멀티모달: 처음부터 텍스트와 시각 토큰을 한 next-token 목적함수로 섞는다.
- 문맥 커리큘럼: 사전학습 8K → 64K, cooldown 256K → 1M의 4단계. NoPE라 위치 인코딩 수정이 없다.
인프라(§5.2)는 PP(virtual stage) + EP + ZeRO-1 DP + Pipeline ZeRO-2 gradient sharding + KDA Context Parallelism이다. MoonEP는 매 micro-batch의 router 출력으로 중복 expert를 온라인 배치해 모든 rank가 정확히 같은 수의 token을 처리하게 하고, rank당 중복 expert 개면 균형 배치가 항상 존재한다는 상계를 증명했다(부록 E). KDA Context Parallelism은 구간마다 (누적 전이 , 0에서 시작한 상태 )만 계산해 고정 크기 all-gather 하나로 이어 붙인다(식 17, 아래 코드에서 확인).
사후학습: SFT → effort별 RL 전문가 9개 → MOPD
SFT(§4.1.1)는 RL의 cold start다. SFT부터 MXFP4 가중치·MXFP8 활성의 QAT를 켜고(MoE expert 가중치만 MXFP4, 나머지는 고정밀), RL에서도 rollout과 학습이 같은 양자화를 써서 학습–추론 불일치를 없앤다(§4.1.4).
RL(§4.1.2)은 도메인 셋 × reasoning effort 셋으로 전문가 9개를 만든다.
| 도메인 | 하위 과제 |
|---|---|
| general tasks | 일반 경험, 비전, 추론, faithfulness, 검색, 지식 노동 |
| general agents | 장기 assistant 과제, deep research, 문단 단위 글쓰기 |
| coding agents | SWE, 코딩 경험, 커널 최적화, 웹 개발 |
정책 최적화는 K2.5 알고리즘을 따른다. K2.5 식 (1)은 k1.5의 목적함수를 토큰 단위로 내리고 로그비 마스킹을 더한 것이다.
은 배치 전체 토큰 수, Clip은 PPO식 clamp가 아니라 로그비가 구간 밖인 토큰의 gradient를 0으로 만드는 마스크다(advantage 부호와 무관). K3는 여기에 partial rollout을 확장한다. 프롬프트 개 × 응답 개를 돌리다가 그중 비율이 끝나면 생성을 멈추고 학습으로 넘어가며, 멈춘 rollout은 sandbox 상태와 함께 다음 iteration에 우선 재개된다. 한 궤적이 여러 iteration에 걸치는 극단적 off-policy를 토큰별 정규화가 견딘다는 것이 보고서의 주장이다(k1.5 레슨의 rollout 그림에서 λ 방식을 고를 수 있다).
- reasoning effort RL: 문제마다 cold-start 모델로 초기 예산 를 잡고, 총 토큰 이면 보상을 로 덮어쓴다. agent 과제의 는 추론과 tool-call 인자를 포함한 누적 출력 토큰이다. 큰 로 max 전문가를 먼저 학습하고 를 줄여 high·low 전문가를 만든다.
- agentic GRM: 검증 불가능한 과제는 K2.5의 tournament식 이진 비교 그룹 보상을 쓰되, judge가 (1) 결과물을 읽고 (2) rubric을 만들고 (3) 후보를 rubric으로 채점해 (4) scorepad에 기록하는 프로토콜을 강제한다. 장황함 해킹을 막으려고 출력이 보다 길면 비교에서 자동으로 진다.
MOPD(§4.1.3)는 도메인 와 effort 를 뽑고 해당 teacher 로 학생을 on-policy distillation한다. 토큰 보상은 teacher와 student의 로그비를 잘라 낸 값이다(식 15).
학생이 자기 분포에서 뽑은 토큰을 teacher가 더 그럴듯하게 보면 양, 덜 그럴듯하게 보면 음의 보상이다. 기대값은 reverse KL 의 토큰 단위 추정이다. 학생은 effort 를 입력으로 받는다(teacher는 받지 않는다). 이 dense 보상이 RL 프레임워크에 그대로 들어가 partial rollout 같은 최적화도 함께 쓴다. top- 분포 증류도 시도했지만 수렴 속도·최종 성능 모두 이점이 없었다.
배포 맞춤 학습: MTP 층을 EAGLE-3식 draft로 미세조정한다(7단계 unroll, AttnRes block 1·4·마지막의 특징을 융합, 융합 행렬을 로 초기화). 손실은 KL이 아니라 speculative sampling의 수락률 자체를 키우는 다(식 16).
RL 환경 (§4.2)
| 환경 | 핵심 |
|---|---|
| white-box harness 환경 | tool interface, system prompt, 문맥 관리, skill, memory, subagent를 모듈로 조립. Kimi Code, Claude Code, Codex, OpenClaw, Hermes 같은 harness와 새 조합을 과제 그룹마다 바꿔 끼워 특정 harness 과적합을 막는다 |
| 지식 그래프 과제 합성 | agent들이 웹 탐색으로 계층적 개념 DAG를 키우고(원자적 개념에서 멈춤), 노드를 뽑아 공개 자료를 검색해 과제를 합성 |
| 검증 가능한 agentic 문제 | 다단계 검색, 투자은행·데이터 분석·법률 실무를 sandbox 도구로 수십–수백 step, Python으로 이미지를 자르고 확대하는 시각 추론 |
| 커널 최적화 | CUDA, Triton, CuTe DSL, Gluon, ThunderKittens, TileLang. 오차 기준을 넘으면 0, 전문가 구현과 같으면 0.5, roofline에 가까울수록 1. CUDA graph replay·입력 캐싱·정밀도 낮추기 같은 해킹 탐지기를 계속 확장 |
| personal assistant | Gmail·Notion·Slack·Canvas 모사 앱, 여러 “날”에 걸친 수십 개의 상호의존 이벤트, rollout 하나에 tool call 수천 번·문맥 수백만 토큰 |
| Autonomous Execution Tasks | 초기 상태·목표·도구·예산·독립 verifier만 주고 절차는 주지 않음. 공개 verifier(진단 피드백)와 숨은 verifier(held-out 시나리오) 분리, 제출 횟수 제한과 벌점 |
| 웹 개발 | 결정적 기능 테스트 + 구조·픽셀 유사도 + 모델 judge. 빌드 실패·에러·“구현 대신 흉내”는 0점 |
핵심 method 깊게 보기
1. KDA를 직접 구현하고 검증하기
아래 코드는 (1) 순환형과 (2) 위에서 유도한 chunk 병렬형이 일치하는지, (2b) KDA Context Parallelism의 affine 합성이 정확한지, (3) delta rule의 덮어쓰기, (4) decay 하한이 overflow를 막는지를 확인한다.
import numpy as np
rng = np.random.default_rng(0)
Tlen, dk, dv, C = 64, 16, 8, 16 # 시퀀스 길이, key/value 폭, chunk 크기
def l2n(x): return x / np.linalg.norm(x, axis=-1, keepdims=True)
q = l2n(rng.normal(size=(Tlen, dk))); k = l2n(rng.normal(size=(Tlen, dk)))
v = rng.normal(size=(Tlen, dv))
beta = 1 / (1 + np.exp(-rng.normal(size=Tlen))) # 쓰기 강도 β_t ∈ (0,1)
z = rng.normal(size=(Tlen, dk)) + 1.0 # 채널별 decay logit
g_min = -5.0
g = g_min / (1 + np.exp(-z)) # K3: g = g_min·sigmoid(e^A z), A = 0
alpha = np.exp(g) # 채널별 보존율 α_t ∈ (e^-5, 1)
# 1) 순환형 (식 1): S_t = (I − β k kᵀ) Diag(α_t) S_{t−1} + β k vᵀ, o_t = S_tᵀ q_t
def kda_recurrent(q, k, v, alpha, beta):
S = np.zeros((dk, dv)); out = []
for t in range(len(q)):
S = alpha[t][:, None] * S # 채널별 망각
S = S - beta[t] * np.outer(k[t], k[t] @ S) + beta[t] * np.outer(k[t], v[t]) # delta rule
out.append(S.T @ q[t])
return np.array(out), S
# 2) chunk 병렬형 (식 4): chunk 안은 행렬곱, chunk 사이만 순환
def kda_chunk(q, k, v, alpha, beta, C):
S = np.zeros((dk, dv)); out = []
for s in range(0, len(q), C):
Q, K, V, B = q[s:s+C], k[s:s+C], v[s:s+C], beta[s:s+C]
Gam = np.cumprod(alpha[s:s+C], axis=0) # γ^{1→r}, [C, dk]
Kt, Kh = K * Gam, K / Gam # k⊙γ_r, k/γ_r
A_str = np.tril(Kt @ Kh.T, -1) # 엄격 하삼각
Tm = np.linalg.inv(np.eye(len(Q)) + B[:, None] * A_str) # UT transform (삼각 역행렬)
U = Tm @ (B[:, None] * V); W = Tm @ (B[:, None] * Kt)
Vt = U - W @ S # pseudo-value Ṽ = U − W S
Aqk = np.tril((Q * Gam) @ Kh.T) # 대각 포함 하삼각
out.append((Q * Gam) @ S + Aqk @ Vt) # inter-chunk + intra-chunk
S = Gam[-1][:, None] * S + (K * (Gam[-1] / Gam)).T @ Vt # 다음 chunk로 넘길 상태
return np.vstack(out), S
o_r, S_r = kda_recurrent(q, k, v, alpha, beta)
o_c, S_c = kda_chunk(q, k, v, alpha, beta, C)
print(f"순환형 vs chunk형: 출력 최대 오차 {np.abs(o_r - o_c).max():.2e}, 상태 최대 오차 {np.abs(S_r - S_c).max():.2e}")
# 2b) KDA Context Parallelism (식 17): 구간마다 (누적 전이 M, 0에서 시작한 상태 S̃)만 계산해 두면
# S_out = S̃ + M · S_in 으로 정확히 합성된다 → 고정 크기 all-gather 하나로 긴 문맥을 나눈다
def segment(ks, vs, al, be):
M = np.eye(dk); St = np.zeros((dk, dv))
for t in range(len(ks)):
Mt = (np.eye(dk) - be[t] * np.outer(ks[t], ks[t])) * al[t][None, :] # (I − βkkᵀ)Diag(α)
M, St = Mt @ M, Mt @ St + be[t] * np.outer(ks[t], vs[t])
return M, St
S = np.zeros((dk, dv))
for r in range(4): # 4개 rank가 16 토큰씩
sl = slice(16 * r, 16 * (r + 1))
M, St = segment(k[sl], v[sl], alpha[sl], beta[sl])
S = St + M @ S
print(f"4-rank 합성 상태 vs 순환형 최종 상태: 최대 오차 {np.abs(S - S_r).max():.2e}")
# 3) delta rule은 "덮어쓰기"를 한다: 같은 key에 새 값을 쓰면 읽기 값이 새 값으로 바뀐다
S = np.zeros((dk, dv)); key = l2n(rng.normal(size=dk)); v1, v2 = rng.normal(size=dv), rng.normal(size=dv)
for val in (v1, v2):
S = S - np.outer(key, key @ S) + np.outer(key, val) # β = 1, α = 1
lin = np.outer(key, v1) + np.outer(key, v2) # 선형 attention: 그냥 더함
print(f"delta rule 읽기 − v2: {np.abs(S.T @ key - v2).max():.1e} 선형 attention 읽기 − v2: {np.abs(lin.T @ key - v2).max():.2f}")
# 4) 왜 decay의 하한이 필요한가: chunk 안 1/Γ 의 크기 (float32 최대 ≈ 3.4e38 ≈ e^88.7)
zz = rng.normal(size=(C, dk)) * 2 + 6.0 # 강하게 잊으려는 채널이 많은 경우
for name, gg in [("Kimi Linear: −softplus(z)", -np.log1p(np.exp(zz))),
("K3: −5·sigmoid(z) ", g_min / (1 + np.exp(-zz)))]:
cum = np.cumsum(gg, axis=0) # log Γ, 16-token tile
with np.errstate(over='ignore'):
recip = np.exp(-cum.astype(np.float32)) # 1/Γ in float32
print(f"{name} tile 누적 log-decay 최소 {cum.min():7.1f} → max 1/Γ = {recip.max():.2e} inf 개수 {np.isinf(recip).sum()}")
print(f"K3 하한의 보장: 16 × g_min = {16 * g_min:.0f} > −88.7 이므로 1/Γ < e^80 = {np.exp(80):.1e} (z와 무관)")chunk형 유도의 핵심 한 줄: pseudo-value 를 펼치면 chunk 안에서 라는 하삼각 연립방정식이 된다. 코드의 Tm이 그 역행렬(UT transform)이고, 실제 커널은 역행렬 대신 전진 대입을 쓴다. 채널별 decay가 와 두 곳에 나뉘어 들어가므로, 가 너무 작아지면 둘째 항이 넘친다. 이것이 K3 하한의 존재 이유다.
2. Quantile Balancing (분위수 균형)
auxiliary-loss-free balancing(DeepSeek-V3)은 router 점수 에 expert별 bias 를 더해 top-k 선택에만 쓰고, mixture 가중치 에는 쓰지 않는다(식 13). bias는 고정 크기 로 갱신한다. 가 작으면 적응이 느리고 크면 진동한다. expert가 896개면 이 trade-off가 감당이 안 된다.
QB는 “목표 load를 정확히 맞추는 bias”를 한 번의 forward로 직접 계산한다. batch의 token 개, expert 개, top-이면 목표 load는 . routing을 top-로 해서 번째 biased 점수를 token의 cutoff 로 얻는다. expert 가 token 의 top-에 들어가려면 여야 하므로, cutoff를 고정하면 expert 의 load는 이고 에 대해 단조 감소한다. load가 정확히 가 되려면 가 margin 의 번째로 큰 값, 즉 -분위수여야 한다(식 14).
부록 C는 이것이 균형 할당 LP s.t. , 의 쌍대 문제를 좌표별로 정확히 최소화하는 한 단계임을 보인다. token 쪽 승수 와 expert 쪽 승수 가 둘 다 같은 분위수 꼴로 풀린다. 그 쌍대 목적함수의 subgradient는 “목표 load − 실제 load”여서, sign 갱신은 같은 목적함수의 SignSGD이고 QB는 그 좌표의 최소점으로 한 번에 점프하는 것이다. 그래서 학습률 같은 hyperparameter가 없다. 인과성을 위해 bias는 다음 step부터 적용하고, 추론 때는 얼린다.
At scale there are millions of margins scattered across ranks and gradient-accumulation steps. K3 has each rank build, per expert, a histogram (1,000 bins) of the “required bias” , sums them with one all-reduce, and reads the quantile off it (App. D). Counts add, so this is the quantile of the whole batch regardless of sharding, accurate to within one bin width.
import numpy as np
rng = np.random.default_rng(0)
m, n, k = 2048, 64, 4 # tokens per batch, routed experts, active experts per token
q = m * k // n # target load (tokens per expert)
popular = rng.normal(size=n) * 1.2 # per-expert "popularity" → a biased router
def batch(step):
# Fresh tokens every step. Popularity drifts slowly, so the distribution is non-stationary.
drift = 0.6 * np.sin(step / 15 + np.arange(n))
logits = rng.normal(size=(m, n)) + popular + drift
return 1 / (1 + np.exp(-logits)) # sigmoid router score s ∈ (0,1)
def route(s, b):
return np.argpartition(-(s + b), k, axis=1)[:, :k] # top-k. The bias is used for selection, never for weights
def loads(idx):
return np.bincount(idx.ravel().astype(np.intp), minlength=n)
def qb_update(s, b):
"""K3 Eq. (14): the (k+1)-th biased score is token cutoff α_i;
expert j's new bias = −(the (1−k/n)-quantile of margins s_ij − α_i), mean removed."""
alpha = -np.partition(-(s + b), k, axis=1)[:, k] # (k+1)-th largest biased score
margins = s - alpha[:, None] # [m, n]
# (q+1)-th largest margin → exactly q stay above it
thr = -np.partition(-margins, q, axis=0)[q]
b_new = -thr
return b_new - b_new.mean()
def run(method, steps=50, gamma=1e-3):
b = np.zeros(n); maxvio = []
for t in range(steps):
s = batch(t)
L = loads(route(s, b)) # this batch is routed with the previous step's bias
maxvio.append(L.max() / q - 1)
if method == "sign": # DeepSeek-V3-style fixed-step sign update
b = b + gamma * np.sign(L.mean() - L)
elif method == "qb":
b = qb_update(s, b) # applied from the next step (causality)
return np.array(maxvio)
res = {"no bias": run("none"), "sign γ=1e-3": run("sign", gamma=1e-3),
"sign γ=1e-2": run("sign", gamma=1e-2), "Quantile Balancing": run("qb")}
print("max violation = max load / target load − 1 (0 = perfect balance)")
print(f"{'method':20s} {'step 0':>7} {'step 5':>7} {'step 20':>7} {'mean last 20':>14}")
for name, mv in res.items():
print(f"{name:20s} {mv[0]:7.2f} {mv[5]:7.2f} {mv[20]:7.2f} {mv[-20:].mean():14.3f}")
# Re-routing the same batch with QB's bias: does every load reach q?
s = batch(0); b = np.zeros(n)
print()
for it in range(1, 9): # alternate α↔β minimisation on one batch (App. C)
b = qb_update(s, b)
L = loads(route(s, b))
if it in (1, 2, 4, 8):
print(f"same batch, {it} alternations: load range [{L.min()}, {L.max()}] (target {q})")
# Histogram estimate (App. D): summing bin counts instead of gathering every margin still hits the quantile within a bin
alpha = -np.partition(-s, k, axis=1)[:, k]
r = alpha[:, None] - s # "required bias" r_ij = α_i − s_ij
j = 0; B = 1000
lo, hi = r[:, j].min(), r[:, j].max()
cnt, edges = np.histogram(r[:, j], bins=B, range=(lo, hi))
c = np.cumsum(cnt); bi = int(np.searchsorted(c, q)) # first bin whose cumulative count reaches q
prev = c[bi - 1] if bi > 0 else 0
est = edges[bi] + np.clip((q - prev) / max(cnt[bi], 1), 0, 1) * (edges[1] - edges[0])
exact = np.sort(r[:, j])[q - 1]
print(f"bias target for expert 0: exact {exact:.5f} histogram {est:.5f} (bin width {edges[1]-edges[0]:.5f})")How to read the output. (1) Without a bias the most popular expert gets almost 8× its target. (2) The sign update with is still unbalanced after 50 steps; needs about 20 steps. (3) QB is below 0.5 violation within 5 steps and tracks the drift. The remaining 0.3–0.4 is sampling noise from applying a bias fitted on the previous batch to a new one. (4) Alternating cutoffs and biases on the same batch keeps narrowing the load range around the target 128 — what Appendix C’s alternating solver does. In training, the bias is updated once per step.
import torch
import torch.nn.functional as F
def kda_step(S, q, k, v, beta, z, A, g_min=-5.0):
"""One recurrent K3 KDA step (one head). S: [dk, dv], q,k: [dk] (L2-normalised), v: [dv],
beta: scalar tensor (sigmoid output), z: [dk] decay logits, A: per-head log-scale (scalar)."""
g = g_min * torch.sigmoid(A.exp() * z) # Eq. 5: log-decay bounded in (g_min, 0)
S = g.exp()[:, None] * S # Diag(α) S
S = S - beta * torch.outer(k, k @ S) + beta * torch.outer(k, v) # delta rule
return S, S.T @ q
@torch.no_grad()
def quantile_balance(scores, bias, k):
"""scores: [m, n] sigmoid router scores, bias: [n]. Returns the bias for the next step (Eq. 14).
At scale, use per-rank histograms + one all-reduce instead of torch.kthvalue (App. D)."""
m, n = scores.shape
q = m * k // n
cut = torch.topk(scores + bias, k + 1, dim=1).values[:, -1] # (k+1)-th biased score α_i
margins = scores - cut[:, None] # [m, n]
thr = torch.kthvalue(margins, m - q, dim=0).values # (q+1)-th largest margin
b = -thr
return b - b.mean()
def route(scores, bias, k):
idx = torch.topk(scores + bias, k, dim=1).indices # bias only for selection
w = torch.gather(scores, 1, idx)
return idx, w / w.sum(-1, keepdim=True) # weights from unbiased scoresWhat is the key difference between Quantile Balancing and the sign update of auxiliary-loss-free balancing?
By Appendix C, the subgradient with respect to the expert-side dual variable is “target load − actual load”, and the sign update is SignSGD that keeps only its sign. QB jumps to the exact minimiser with cutoffs fixed, . There is no step size , and even with nearly a thousand experts it reaches equilibrium within a few steps. The bias is still used only for selection, never in the weights.
Results
All K3 numbers use reasoning effort max, temperature 1.0, top-p 0.95 for single-turn tasks / 1.0 for agentic tasks (§6.1.3). Baselines are all at max effort (GPT-5.5 at xhigh); Claude Fable 5 results include fallbacks and GPT-5.6 Sol results include cyberguards.
규모가 커지면 margin이 수백만 개이고 rank와 gradient accumulation에 흩어져 있다. K3는 expert마다 “필요 bias” 의 히스토그램(bin 1000개)을 각 rank가 쌓고 all-reduce 한 번으로 합쳐 분위수를 읽는다(부록 D). 개수는 더할 수 있으니 sharding과 무관하게 전체 batch의 분위수가 되고, 오차는 bin 폭 이내다.
import numpy as np
rng = np.random.default_rng(0)
m, n, k = 2048, 64, 4 # 배치 토큰 수, routed expert 수, 토큰당 활성 expert
q = m * k // n # 목표 load (expert당 토큰 수)
popular = rng.normal(size=n) * 1.2 # expert마다 다른 "인기도" → 편향된 router
def batch(step):
# 매 step 새 토큰. 인기도가 천천히 움직여 분포가 비정상(non-stationary)이다.
drift = 0.6 * np.sin(step / 15 + np.arange(n))
logits = rng.normal(size=(m, n)) + popular + drift
return 1 / (1 + np.exp(-logits)) # sigmoid router score s ∈ (0,1)
def route(s, b):
return np.argpartition(-(s + b), k, axis=1)[:, :k] # top-k. bias는 선택에만 쓰고 가중치에는 안 쓴다
def loads(idx):
return np.bincount(idx.ravel().astype(np.intp), minlength=n)
def qb_update(s, b):
"""K3 식 (14): top-(k+1)번째 biased score가 token cutoff α_i,
expert j의 새 bias = −(margin s_ij − α_i 의 (1−k/n) 분위수), 평균 제거."""
alpha = -np.partition(-(s + b), k, axis=1)[:, k] # (k+1)번째로 큰 biased score
margins = s - alpha[:, None] # [m, n]
# (q+1)번째로 큰 margin → 정확히 q개가 위에 남는다
thr = -np.partition(-margins, q, axis=0)[q]
b_new = -thr
return b_new - b_new.mean()
def run(method, steps=50, gamma=1e-3):
b = np.zeros(n); maxvio = []
for t in range(steps):
s = batch(t)
L = loads(route(s, b)) # 이번 batch는 이전 step의 bias로 routing
maxvio.append(L.max() / q - 1)
if method == "sign": # DeepSeek-V3식 고정 크기 sign 갱신
b = b + gamma * np.sign(L.mean() - L)
elif method == "qb":
b = qb_update(s, b) # 다음 step부터 적용 (인과성)
return np.array(maxvio)
res = {"bias 없음": run("none"), "sign γ=1e-3": run("sign", gamma=1e-3),
"sign γ=1e-2": run("sign", gamma=1e-2), "Quantile Balancing": run("qb")}
print("max violation = 최대 load / 목표 load − 1 (0이면 완벽한 균형)")
print(f"{'방법':20s} {'step 0':>7} {'step 5':>7} {'step 20':>7} {'마지막 20 평균':>14}")
for name, mv in res.items():
print(f"{name:20s} {mv[0]:7.2f} {mv[5]:7.2f} {mv[20]:7.2f} {mv[-20:].mean():14.3f}")
# 같은 batch에서 QB가 만드는 bias로 다시 routing하면 load가 정확히 q가 되는가?
s = batch(0); b = np.zeros(n)
print()
for it in range(1, 9): # 같은 batch에서 α↔β 교대 최소화 (부록 C)
b = qb_update(s, b)
L = loads(route(s, b))
if it in (1, 2, 4, 8):
print(f"같은 batch 교대 {it}회: load 범위 [{L.min()}, {L.max()}] (목표 {q})")
# 히스토그램 추정(부록 D): margin 전체를 모으지 않고 bin 개수만 합쳐도 분위수를 bin 폭 안에서 맞춘다
alpha = -np.partition(-s, k, axis=1)[:, k]
r = alpha[:, None] - s # "필요한 bias" r_ij = α_i − s_ij
j = 0; B = 1000
lo, hi = r[:, j].min(), r[:, j].max()
cnt, edges = np.histogram(r[:, j], bins=B, range=(lo, hi))
c = np.cumsum(cnt); bi = int(np.searchsorted(c, q)) # 누적 개수가 q에 닿는 첫 bin
prev = c[bi - 1] if bi > 0 else 0
est = edges[bi] + np.clip((q - prev) / max(cnt[bi], 1), 0, 1) * (edges[1] - edges[0])
exact = np.sort(r[:, j])[q - 1]
print(f"expert 0 의 bias 목표: 정확 {exact:.5f} 히스토그램 {est:.5f} (bin 폭 {edges[1]-edges[0]:.5f})")출력을 읽는 법. (1) bias가 없으면 인기 있는 expert에 목표의 8배 가까운 token이 몰린다. (2) sign 갱신은 에서 50 step이 지나도 균형에 못 가고, 는 20 step쯤 걸린다. (3) QB는 5 step 만에 violation 0.5 아래로 내려가고 drift를 따라간다. 남는 0.3–0.4는 직전 batch로 정한 bias를 새 batch에 쓰는 데서 오는 표본 잡음이다. (4) 같은 batch에서 cutoff와 bias를 번갈아 풀면 load 범위가 목표 128 주변으로 계속 좁아진다. 부록 C의 교대 solver가 하는 일이다. 학습에서는 step마다 한 번만 갱신한다.
import torch
import torch.nn.functional as F
def kda_step(S, q, k, v, beta, z, A, g_min=-5.0):
"""K3 KDA 순환 한 step (head 하나). S: [dk, dv], q,k: [dk] (L2 정규화됨), v: [dv],
beta: 스칼라 텐서 (sigmoid 출력), z: [dk] decay logit, A: head별 log-scale (스칼라)."""
g = g_min * torch.sigmoid(A.exp() * z) # 식 5: (g_min, 0)으로 묶인 log-decay
S = g.exp()[:, None] * S # Diag(α) S
S = S - beta * torch.outer(k, k @ S) + beta * torch.outer(k, v) # delta rule
return S, S.T @ q
@torch.no_grad()
def quantile_balance(scores, bias, k):
"""scores: [m, n] sigmoid router 점수, bias: [n]. 다음 step에 쓸 bias를 반환 (식 14).
대규모에서는 torch.kthvalue 대신 rank별 히스토그램 + all-reduce (부록 D)."""
m, n = scores.shape
q = m * k // n
cut = torch.topk(scores + bias, k + 1, dim=1).values[:, -1] # (k+1)번째 biased 점수 α_i
margins = scores - cut[:, None] # [m, n]
thr = torch.kthvalue(margins, m - q, dim=0).values # (q+1)번째로 큰 margin
b = -thr
return b - b.mean()
def route(scores, bias, k):
idx = torch.topk(scores + bias, k, dim=1).indices # 선택에만 bias
w = torch.gather(scores, 1, idx)
return idx, w / w.sum(-1, keepdim=True) # 가중치는 bias 없는 점수로Quantile Balancing이 auxiliary-loss-free의 sign 갱신과 다른 핵심은?
부록 C에 따르면 expert 쪽 쌍대 변수에 대한 subgradient는 “목표 load − 실제 load”이고, sign 갱신은 그 부호만 쓰는 SignSGD다. QB는 cutoff 를 고정했을 때의 정확한 최소점 로 점프한다. 학습률 가 없고, expert가 천 개 가까워도 몇 step 만에 평형에 간다. bias는 여전히 선택에만 쓰이고 가중치에는 들어가지 않는다.
실험 결과
모든 K3 수치는 reasoning effort max, temperature 1.0, 단일 과제 top-p 0.95 / agent 과제 top-p 1.0이다(§6.1.3). 비교 대상은 모두 max effort(GPT-5.5만 xhigh)이고, Claude Fable 5는 fallback, GPT-5.6 Sol은 cyberguard가 포함된 결과다.
Third-party evaluations (Table 5, as of 2026-07-23)
| Metric | Kimi K3 | Claude Fable 5 | GPT-5.6 Sol | Claude Opus 4.8 | GPT-5.5 | GLM-5.2 |
|---|---|---|---|---|---|---|
| AA Intelligence Index v4.1 | 57.1 (#4/580) | 59.9 | 58.9 | 55.7 | 55.0 | 51.1 |
| Vals Index | 74.7 (#2/39) | 75.1 | 73.1 | 70.4 | 68.0 | 65.0 |
| WebDev Arena (Elo) | 1,678 (#1/99) | 1,634 | 1,630 | 1,565 | 1,507 | 1,592 |
| Text Arena (Elo) | 1,486 (#8/200) | 1,507 | 1,485 | 1,484 | 1,482 | 1,469 |
What to read from it:
- Strengths: long-horizon agents and coding (ProgramBench, SWE-Marathon, BrowseComp, AutomationBench, MCPMark-Verified 94.5) — first or a close second. These overlap exactly with the post-training environments (kernel optimisation, autonomous execution, mock apps).
- Weaknesses: research-level reasoning (CritPt 23.4, HLE-Full) and hard computer use (OSWorld 2.0, SaaS-Bench) trail Fable 5 and GPT-5.6 Sol. The report itself names research-level reasoning as the direction to improve.
- Cost (§6.4): BrowseComp 91.2% at $2.03 per task, half the cost of GPT-5.6 Sol (90.4%). On Kimi Code Bench 2.0, 4.0 points below Fable 5 at 38% of its cost. These numbers reflect a deployment design of 104B active parameters plus KDA, MXFP4 and an EAGLE-3 draft.
Evidence for the architecture choices. The K3 report itself contains no ablation table for KDA, AttnRes, QB or SiTU-GLU individually. The evidence is scattered across three places.
| Choice | Evidence |
|---|---|
| Overall effect | About 2.5× scaling efficiency over K2 (K3 Figure 7; no per-component breakdown) |
| 3:1 hybrid | Kimi Linear Table 1: KDA 3:1 best at train/val PPL 9.23/5.65; 0:1 (pure MLA) 9.45/5.77, 1:1 9.29/5.66, 7:1 9.23/5.70, 15:1 9.34/5.82 |
| Sigmoid output gate, short conv | Kimi Linear Table 1: no gate 9.25/5.67, swish gate 9.43/5.81, no conv 9.29/5.70 |
| KDA efficiency | Kimi Linear §5.6: at 1M context, 2.9× faster prefill and 6× faster decoding than MLA |
| AttnRes | AttnRes paper (2603.15031): consistent gains across model sizes; all downstream tasks improve at Kimi Linear 48B/3B on 1.4T tokens (abstract) |
| RMSNorm before up-projection | “Consistently improves validation loss and downstream benchmarks” (K3 §2.3.1, no numbers) |
| MoonViT-V2 | Lower gradient norms with fewer spikes; vision on par with the SigLIP-initialised baseline (K3 Figure 6) |
| Cosine vs WSD | With separate hyperparameter searches, cosine consistently reaches a lower final loss (K3 §3.2, no numbers) |
| RL scaling | More RL FLOPs raise tool-call steps and many evaluation scores together (K3 Figure 8) |
Reading critically
- The data are blank. Pre-training token count, mixture, share of synthetic data, number of RL tasks, RL compute per expert, MOPD’s and the effort budgets are all missing. “2.5× scaling efficiency” bundles data, architecture and recipe, so the contribution of each part is unknown.
- Component ablations live in other papers. KDA and the hybrid ratio were validated at 48B/3B (Kimi Linear), as was AttnRes. Whether the same ordering holds at 2.8T and sparsity 56 is not shown. QB’s effect rests on the appendix’s qualitative “no measurable residual imbalance”.
- Evaluation conditions vary. Fable 5 includes fallbacks (35% of SWE-Marathon tasks), GPT-5.6 Sol includes cyberguards, SWE-Marathon uses an H20-recalibrated branch, PostTrainBench uses H20 instead of H100, BrowseComp uses context compaction at 300K (90.4% with the full 1M context and no compaction), some numbers are cited from Artificial Analysis, Vals or official leaderboards, and some costs come from public charts. A one-cell difference in the table can be smaller than harness and setting differences.
- In-house benchmarks. Kimi Code Bench 2.0 and the internal evaluations (Tables 3–4) cannot be checked externally.
- K2.5’s notation. The log-ratio interval () in K2.5 Eq. (1), which K3 follows, would literally mask on-policy tokens (log-ratio 0). The intent is probably (see the k1.5 lesson).
- Contamination and harness overfitting. Training environments imitate real harnesses such as Claude Code and Codex, and evaluation uses the same harnesses. That is designed for generalisation, but it also means the evaluation harness is inside the training distribution.
What is the most direct reason K3 changed KDA's decay to g = g_min·sigmoid(e^A z) with g_min = −5?
The chunkwise form divides keys by , a product of values in (0,1) that can get arbitrarily small. Kimi Linear avoided overflow by computing diagonal tiles position-pair by position-pair in log space, which was the bottleneck. With a 16-token cumulative stays at or above , so is within BF16 range () and every tile can be a plain matmul. The price is that no channel can forget faster than per step.
Summary
- K3 is a 2.78T/104.2B natively multimodal MoE that widens information flow along length (69 KDA + 24 Gated MLA, 3:1), depth (Block AttnRes, 8 blocks × 12 layers) and width (LatentMoE, 16 of 896, latent 3584), reporting about 2.5× the scaling efficiency of K2.
- KDA is a delta rule with per-channel decay. Its chunkwise form solves for pseudo-values with the UT transform and uses matmuls; K3 floors the decay () so even diagonal tiles run on Tensor Cores. MLA is NoPE, so extending to 1M needs no positional-encoding changes.
- Stable LatentMoE activates twice K2’s experts at the same dispatch width, tames activation blow-up with RMSNorm and SiTU-GLU (), and balances nearly a thousand experts with Quantile Balancing (dual coordinate minimisation = a margin quantile).
- Post-training runs SFT (MXFP4 QAT) → nine RL experts over 3 domains × 3 efforts (K2.5 algorithm, −1 for exceeding the budget, protocol-bound GRM) → MOPD (a clipped teacher/student log-ratio token reward).
- Harness-assembling white-box environments, knowledge-graph task synthesis, mock-app, autonomous-execution and kernel environments and million-token RL infrastructure show up as strength on long-horizon agent and coding benchmarks; research-level reasoning and hard computer use still trail the top proprietary models.
- Data scale and per-component ablations are undisclosed, so each part’s contribution can only be inferred from the smaller-scale results of the Kimi Linear and AttnRes papers.
제3자 평가 (Table 5, 2026-07-23 기준)
| 지표 | Kimi K3 | Claude Fable 5 | GPT-5.6 Sol | Claude Opus 4.8 | GPT-5.5 | GLM-5.2 |
|---|---|---|---|---|---|---|
| AA Intelligence Index v4.1 | 57.1 (#4/580) | 59.9 | 58.9 | 55.7 | 55.0 | 51.1 |
| Vals Index | 74.7 (#2/39) | 75.1 | 73.1 | 70.4 | 68.0 | 65.0 |
| WebDev Arena (Elo) | 1,678 (#1/99) | 1,634 | 1,630 | 1,565 | 1,507 | 1,592 |
| Text Arena (Elo) | 1,486 (#8/200) | 1,507 | 1,485 | 1,484 | 1,482 | 1,469 |
읽을 거리.
- 강한 곳: 장기 agent·코딩(ProgramBench, SWE-Marathon, BrowseComp, AutomationBench, MCPMark-Verified 94.5)에서 1위이거나 근소한 2위. 사후학습 환경 설계(커널 최적화, 자율 실행, 모사 앱)와 정확히 겹치는 영역이다.
- 약한 곳: 연구 수준 추론(CritPt 23.4, HLE-Full)과 어려운 computer-use(OSWorld 2.0, SaaS-Bench)는 Fable 5·GPT-5.6 Sol에 뒤진다. 보고서 스스로 연구 수준 추론을 개선 과제로 꼽는다.
- 비용(§6.4): BrowseComp 91.2%를 과제당 2.03달러로, GPT-5.6 Sol(90.4%)의 절반 비용에 냈다. Kimi Code Bench 2.0에서는 Fable 5보다 4.0점 낮은 점수를 38% 비용에 냈다. 104B 활성에 KDA·MXFP4·EAGLE-3 draft를 더한 배포 설계가 반영된 숫자다.
아키텍처 선택을 정당화하는 증거. K3 보고서 자체에는 KDA·AttnRes·QB·SiTU-GLU 각각의 ablation 표가 없다. 근거는 세 곳에 흩어져 있다.
| 선택 | 근거 |
|---|---|
| 전체 효과 | K2 대비 스케일링 효율 약 2.5배 (K3 Figure 7, 구성 요소별 분해 없음) |
| 3:1 하이브리드 | Kimi Linear Table 1: KDA 3:1이 train/val PPL 9.23/5.65로 최선. 0:1(순수 MLA) 9.45/5.77, 1:1 9.29/5.66, 7:1 9.23/5.70, 15:1 9.34/5.82 |
| sigmoid 출력 gate·short conv | Kimi Linear Table 1: gate 없음 9.25/5.67, swish gate 9.43/5.81, conv 없음 9.29/5.70 |
| KDA 효율 | Kimi Linear §5.6: 1M 문맥에서 MLA 대비 prefill 2.9배, decoding 6배 빠름 |
| AttnRes | AttnRes 논문(2603.15031): 모델 크기 전반에서 일관된 개선, Kimi Linear 48B/3B·1.4T 토큰에서 모든 다운스트림 향상 (초록) |
| latent 앞 RMSNorm | “검증 loss와 다운스트림을 일관되게 개선” (K3 §2.3.1, 수치 없음) |
| MoonViT-V2 | gradient norm이 더 낮고 spike가 적음, 비전 성능은 SigLIP 초기화와 동등 (K3 Figure 6) |
| cosine vs WSD | 각자 따로 하이퍼파라미터 탐색 시 cosine이 일관되게 낮은 최종 loss (K3 §3.2, 수치 없음) |
| RL 스케일링 | RL FLOPs를 늘리면 tool-call step 수와 여러 평가 점수가 함께 오름 (K3 Figure 8) |
비판적으로 읽기
- 데이터가 비어 있다. 사전학습 토큰 수, 혼합 비율, 합성 데이터 비중, RL 과제 수, 전문가 9개의 RL compute, MOPD의 , effort 예산 값이 모두 없다. “2.5배 스케일링 효율”도 데이터·구조·레시피를 합친 숫자라 어느 부품이 얼마나 기여했는지 알 수 없다.
- 구성 요소 ablation은 다른 논문에 있다. KDA·하이브리드 비율은 48B/3B 규모(Kimi Linear), AttnRes도 같은 규모에서 검증되었다. 2.8T·sparsity 56에서도 같은 순서가 유지되는지는 보여 주지 않는다. QB의 효과는 부록의 “측정 가능한 잔여 불균형 없음”이라는 정성적 문장뿐이다.
- 평가 조건이 제각각이다. Fable 5는 fallback 포함(SWE-Marathon에서 과제의 35%), GPT-5.6 Sol은 cyberguard 포함, SWE-Marathon은 H20에 맞춰 재보정한 분기, PostTrainBench는 H100 대신 H20, BrowseComp는 300K에서 문맥 압축(압축 없이 1M 문맥으로는 90.4%), 일부는 Artificial Analysis·Vals·공식 leaderboard에서 인용, 비용 일부는 공개 차트에서 인용. 표의 한 칸 차이는 harness·설정 차이보다 작을 수 있다.
- 사내 벤치마크. Kimi Code Bench 2.0과 사내 평가(Table 3–4)는 외부에서 검증할 수 없다.
- K2.5 알고리즘 표기. K3가 따르는 K2.5 식 (1)의 로그비 구간 ()는 글자 그대로면 on-policy 토큰(로그비 0)을 마스킹한다. 실제 의도는 로 보인다(k1.5 레슨 참고).
- 오염과 harness 과적합. 학습 환경이 Claude Code·Codex 같은 실제 harness를 흉내 내고 평가도 같은 harness로 한다. 일반화를 위한 설계이지만, 평가 harness가 학습 분포 안에 있다는 뜻이기도 하다.
K3가 KDA의 decay를 g = g_min·sigmoid(e^A z), g_min = −5로 바꾼 가장 직접적인 이유는?
chunk 병렬형은 key를 로 나누는데 가 (0,1) 값의 곱이라 끝없이 작아질 수 있다. Kimi Linear는 대각 tile을 log 공간에서 위치 쌍별로 계산해 이를 피했고 그것이 병목이었다. 이면 16토큰 누적은 이상, 으로 BF16 범위() 안이므로 모든 tile을 그냥 행렬곱으로 계산할 수 있다. 대가는 한 step에 보다 빨리 잊을 수 없다는 것이다.
정리
- K3는 2.78T/104.2B 네이티브 멀티모달 MoE로, 길이(KDA 69 + Gated MLA 24, 3:1), 깊이(Block AttnRes, 12층 × 8 block), 폭(LatentMoE 896 중 16, latent 3584) 세 방향의 정보 흐름을 넓혀 K2 대비 약 2.5배 스케일링 효율을 보고한다.
- KDA는 채널별 decay가 붙은 delta rule이다. chunk 병렬형은 UT transform으로 pseudo-value를 풀어 행렬곱으로 계산하고, K3는 decay에 하한()을 둬서 대각 tile까지 Tensor Core로 돌린다. MLA는 NoPE라 1M 확장에 위치 인코딩 수정이 없다.
- Stable LatentMoE는 K2와 같은 dispatch 폭으로 두 배의 expert를 켜고, RMSNorm·SiTU-GLU()로 활성 폭발을, Quantile Balancing(쌍대 좌표 최소화 = margin 분위수)으로 천 개 가까운 expert의 균형을 잡는다.
- 사후학습은 SFT(MXFP4 QAT) → 도메인 3 × effort 3의 RL 전문가 9개(K2.5 알고리즘, 예산 초과 −1, 프로토콜 강제 GRM) → MOPD(잘린 teacher/student 로그비 토큰 보상)로 이어진다.
- harness를 조립하는 white-box 환경, 지식 그래프 과제 합성, 모사 앱·자율 실행·커널 환경과 1M 토큰 RL 인프라가 장기 agent·코딩 벤치마크의 강세로 나타난다. 연구 수준 추론과 어려운 computer-use는 최상위 독점 모델에 뒤진다.
- 데이터 규모와 구성 요소별 ablation이 공개되지 않아, 각 부품의 기여는 Kimi Linear·AttnRes 논문의 작은 규모 결과로 추정할 수밖에 없다.
더 읽을거리Further reading
- Kimi Team, Kimi K3: Open Frontier Intelligence (2026) — 이 레슨이 리뷰하는 보고서(v2, 2026-08-07). 수치는 모두 이 보고서의 표·본문에서 가져왔다.The report reviewed here (v2, 2026-08-07). All numbers come from its tables and text.
- Kimi Team, Kimi Linear: An Expressive, Efficient Attention Architecture (2025) — KDA와 3:1 KDA–MLA 하이브리드, NoPE MLA를 처음 제안하고 공정 비교한 논문. K3 아키텍처의 직접 전신.Introduced KDA, the 3:1 KDA–MLA hybrid and NoPE MLA, with fair comparisons; the direct predecessor of the K3 architecture.
- Kimi Team, Attention Residuals (2026) — residual 연결을 깊이 방향 softmax attention으로 바꾼 AttnRes와 Block AttnRes.AttnRes and Block AttnRes, which replace the residual connection with depth-wise softmax attention.
- Kimi Team, Kimi K2.5: Visual Agentic Intelligence (2026) — K3가 따르는 RL 정책 최적화(토큰 log-ratio 마스킹), 예산 제어, GRM, Agent Swarm.The RL policy optimisation (token log-ratio masking), budget control, GRM and Agent Swarm that K3 follows.
- Yang, Kautz, Hatamizadeh, Gated Delta Networks: Improving Mamba2 with Delta Rule (2024) — KDA가 확장한 Gated DeltaNet. 스칼라 forget gate를 채널별 gate로 바꾼 것이 KDA다.Gated DeltaNet, which KDA extends; KDA turns its scalar forget gate into a per-channel gate.
- Yang et al., Parallelizing Linear Transformers with the Delta Rule over Sequence Length (2024) — delta rule의 WY/UT 표현과 chunk 병렬 알고리즘.The WY/UT representation of the delta rule and its chunkwise parallel algorithm.
- Elango et al., LatentMoE: Toward Optimal Accuracy per FLOP and Parameter in Mixture of Experts (2026) — routed expert를 저차원 latent 공간에서 돌리는 LatentMoE. K3가 RMSNorm을 더해 쓴다.LatentMoE, which runs routed experts in a low-dimensional latent space; K3 uses it with an added RMSNorm.
- Wang et al., Auxiliary-Loss-Free Load Balancing Strategy for Mixture-of-Experts (2024) — bias로 top-k 선택만 조정하는 loss-free balancing. QB가 대체한 sign 갱신의 원형.Loss-free balancing that adjusts only top-k selection with a bias; the origin of the sign update that QB replaces.