Kimi K2.6: Advancing Open-Source Coding

model kimi-k2-6
agentcodingagent-swarmMoEquantization

Kimi K2.6: Advancing Open-Source Coding #

Moonshot AI (Kimi Team) | 2026-04 | https://www.kimi.com/blog/kimi-k2-6 HF Model: https://huggingface.co/moonshotai/Kimi-K2.6 Category: llm | Tags: agent, coding, agent-swarm, MoE, MLA, quantization Read: 2026-04-21

TL;DR #

Kimi K2.6 是 K2.5 的 post-training + 量化 + orchestration 发布,不是新底模。config.json 与 K2.5 的关键维度逐字相同(61L · d=7168 · MLA · 384E top-8 + 1 shared · YaRN 64× → 262K context),主要变化全部在:(1) 默认 INT4 compressed-tensors 出版(仅量化 routed MoE experts,attention + shared + head 保留 FP16);(2) 长程 agentic coding RL(单次 4000+ 工具调用 · 12-13 小时自主执行 · 改 4000+ LoC),是迄今开源模型最极端的长程 coding 证据;(3) Agent Swarm 横向扩到 300 sub-agent × 4000 步(K2.5 是 100 × 1500);(4) 新开 Claw Groups 异构 agent 编排范式。Benchmark 最大跳跃在 agentic 工具调用:Toolathlon 27.8→50.0(+80%)、MCPMark 29.5→55.9(+89%)、Terminal-Bench 2.0 50.8→66.7(+31%),在 coding + 长程 agent 类 benchmark 基本与 Claude Opus 4.6 / GPT-5.4 持平,纯 reasoning(HLE-Full / AIME / HMMT)仍略逊 Gemini 3.1 Pro / GPT-5.4。

核心三问 (Q1/Q2/Q3) #

Q1: 试图解决什么核心痛点? 开源 agentic 模型在持续小时级的 coding / 工具调用场景下掉链子——模型会在几十次 tool call 之后丢掉目标、做出回退式修改、或把简单任务做成 quick-hack。Kimi K2.5 已经证明架构可用,但长程稳定性工具调用成功率跨 session 编排仍是短板。

Q2: 怎么解? 保持 K2 / K2.5 的 1T 级 MoE + MLA 主干不动(config.json 完全相同),把所有工程投入放在 (a) 长程 coding 的 agentic RL(blog 报告 4-13 小时连续 rollout、1000-4000 次 tool call、14 轮内部迭代);(b) Agent Swarm 3× 扩容(100→300 sub-agent, 1500→4000 coordinated steps);(c) Claw Groups 异构 agent 编排(K2.6 当协调器,子 agent 可跑任何模型、部署在 laptop / 手机 / 云);(d) 默认 compressed-tensors INT4 量化发布,让 1.04T MoE 主模型单 8×H200 节点可服务。

Q3: 最终效果? 在 agentic / coding benchmark 上跳跃最显著:Toolathlon 27.8 → 50.0(+80%), MCPMark 29.5 → 55.9(+89%), Terminal-Bench 2.0 50.8 → 66.7(+31%), SWE-Bench Pro 50.7 → 58.6(+16%), BrowseComp (swarm) 78.4 → 86.3。长程 case study:Zig 语言 + Mac 环境,12 小时 4000+ 工具调用把 Qwen3.5-0.8B 推理从 15 tok/s 提到 193 tok/s(~13×,比 LM Studio 快 20%);exchange-core(8 年老 OSS 撮合引擎)13 小时 1000+ 工具调用修改 4000+ LoC,medium throughput +185% / peak throughput +133%。

Core Contribution #

Kimi K2.6 以 Kimi K2.5 的 1T MoE + MLA + MoonViT 多模态主干 整模复用为前提,通过 长程 agentic coding RL 把单次工具调用/代码编辑会话从"分钟级"推到"4-13 小时、4000+ 次工具调用"级别;同时把 Agent Swarm 扩到 300 sub-agent × 4000 steps 并打开 Claw Groups 异构 agent 编排层;默认以 INT4 compressed-tensors 发布,单节点可服务 1.04T 主模型。

Summary #

Kimi K2.6 的发布哲学延续 K2.5 的"主干别动、创新放在训练和 orchestration"路线——并把它做到极致。HuggingFace config.json 显示,K2.6 的所有架构维度与 K2.5 字字相同DeepseekV3ForCausalLM 作为文本主干(61 层,d_model=7168,MLA with q_lora=1536 / kv_lora=512 / qk_nope_head_dim=128 / qk_rope_head_dim=64 / v_head_dim=128,64 heads),384 routed experts top-8 + 1 shared expert(expert hidden=2048 SwiGLU),首层 dense(first_k_dense_replace=1),sigmoid + noaux_tc 路由,routed_scaling_factor=2.827,YaRN factor=64 扩到 262,144 context;视觉侧仍是 MoonViT-3D(27 层,d=1152,patch=14,sd2_tpool 2×2 空间 merge,vocab=163,840)。唯一的 config 新增项是 quantization_config——INT4 symmetric group_size=32 的 compressed-tensors pack-quantized 权重,仅作用在 routed MoE experts(lm_headself_attn.shared_experts.mlp.(gate|up|down)_proj 全部在 ignore 名单里保持 FP16)。

真正的"新内容"完全在 post-training 和 orchestration 层:(1) 长程 agentic coding RL —— blog 两个 flagship case 证明模型能连续 4-13 小时、1000-4000+ 次工具调用、14 轮迭代下持续改善一个真实 OSS 代码库的性能(Zig 推理 15→193 tok/s,exchange-core +185% MT/s);(2) Agent Swarm 规模 3× —— 从 K2.5 的 100 sub-agent × 1500 步扩到 K2.6 的 300 sub-agent × 4000 步,且产物形态从"搜索/报告"扩展到"documents + websites + slides + spreadsheets 同轨输出";(3) Skills —— 把高质量 PDF / slides / sheets 吸收为"结构 + 风格 DNA"可复用模板(McKinsey 式 PPT、astro-paper 可视化风格等);(4) Claw Groups 研究预览 —— 异构 agent 编排层,K2.6 做协调器,子 agent 可跑任何模型、部署在 laptop / 手机 / 云,人和 agent 以"真正合作者"身份同台协作。

效果上,在 agentic + coding benchmark 基本追平 Claude Opus 4.6 / GPT-5.4(SWE-Bench Pro 58.6 领先、Terminal-Bench 2.0 66.7 仅次 Gemini 3.1 Pro 68.5、DeepSearchQA f1 92.5 大幅领先闭源对手);在纯 reasoning(HLE-Full 34.7 vs Gemini 44.4 / GPT 39.8,AIME 2026 96.4 vs GPT 99.2)上仍略逊顶尖闭源。视觉侧小幅提升但仍非重点(MMMU-Pro 78.5→79.4,BabyVision 36.5→39.8)。

Key Findings #

Limitations #

Infrastructure Impact #

Key Figures #

Figure 1: K2.5 vs K2.6 benchmark deltas

Figure 2: K2.6 vs closed-source frontier

Figure 3: Agent Swarm scaling K2.5 → K2.6

Figure 4: Long-horizon coding case studies

Figure 5: INT4 quantization layout


Deep Analysis (llm) #

模型架构 #

架构 1 · Top-level Multimodal Pipeline #

KimiK25ForConditionalGeneration = MoonViT3dPretrainedModel + K2VLMultiModalProjector + DeepseekV3ForCausalLM (验证来源: sglang kimi_k25.py:678-793)

flowchart TB classDef input fill:#e0f2fe,stroke:#0284c7,color:#082f49 classDef vision fill:#fef3c7,stroke:#ca8a04,color:#713f12 classDef text fill:#eef2ff,stroke:#4338ca,color:#1e1b4b classDef fuse fill:#f5f3ff,stroke:#7c3aed,color:#2e1065 classDef lm fill:#dcfce7,stroke:#16a34a,color:#052e16 classDef out fill:#fce7f3,stroke:#db2777,color:#500724 pix["pixel_values + grid_thws
[N_patches, 3, 14, 14]
NaViT packed, T=1 image, T=4 video"]:::input ids["input_ids
[B, S_text]"]:::input subgraph VIS["vision_tower = MoonViT3dPretrainedModel (vllm kimi_k25_vit.py:548)"] direction TB pe["patch_embed
Conv2d(3, 1152, k=14, s=14)
+ pos_emb 64×64×4 divided_fixed"]:::vision enc["encoder
27× MoonViTEncoderLayer
d=1152, 16 heads × 72 head_dim
FFN=4304, GELU_tanh, attn_bias=True"]:::vision merge["tpool_patch_merger sd2_tpool
[T,H,W,1152] → [T,H/2,W/2,4608]
+ temporal pool over T"]:::vision pe --> enc --> merge end mmp["mm_projector = K2VLMultiModalProjector
(sglang kimi_k25.py:572)
pre_norm 1152 / Linear 4608→4608 / GELU / Linear 4608→7168"]:::vision emb["embed_tokens
Embedding(163840 → 7168)"]:::text fuse["general_mm_embed_routine
scatter image embeds into text stream
at <pipe;kimi_k25_video_placeholder&pipe;> (id=163605)"]:::fuse subgraph LM["language_model = DeepseekV3ForCausalLM (sglang kimi_k25.py:711)"] direction TB l0["Layer 0 (dense):
MLA + DeepseekV2MLP(7168→18432→7168, SwiGLU)"]:::lm lN["Layers 1-60 (sparse MoE):
MLA + DeepseekV2MoE
384 routed top-8 + 1 shared expert"]:::lm norm["final RMSNorm(7168)"]:::lm head["lm_head Linear(7168 → 163840)"]:::lm l0 --> lN --> norm --> head end logits["logits [B, S, 163840]
next-token / tool-call / text"]:::out pix --> pe merge --> mmp ids --> emb mmp --> fuse emb --> fuse fuse -->|"[B, S, 7168]"| l0 head --> logits

易错点 cheatsheet:


架构 2 · Decoder Layer (MLA + MoE) 内部展开 #

DeepseekV2DecoderLayer (sglang deepseek_v2.py:1596); layer 0 走 dense, layer 1-60 走 MoE (first_k_dense_replace=1)。

flowchart TB classDef input fill:#e0f2fe,stroke:#0284c7 classDef norm fill:#f1f5f9,stroke:#475569 classDef q fill:#dbeafe,stroke:#1e3a8a classDef kv fill:#dcfce7,stroke:#16a34a classDef rope fill:#ffe4e6,stroke:#e11d48 classDef attn fill:#f5f3ff,stroke:#7c3aed classDef moe_routed fill:#fee2e2,stroke:#dc2626,color:#7f1d1d,stroke-width:2px classDef moe_shared fill:#dcfce7,stroke:#16a34a,stroke-width:2px classDef gate fill:#fef3c7,stroke:#ca8a04 classDef res fill:#ecfccb,stroke:#65a30d x["x ∈ ℝ [B, S, 7168]"]:::input ln1["input_layernorm
RMSNorm(7168, eps=1e-5)"]:::norm subgraph MLA["self_attn = DeepseekV2AttentionMLA (deepseek_v2.py:1130)"] direction TB subgraph QPATH["Q path"] direction TB qa["q_a_proj
Linear(7168 → 1536)
q_lora_rank"]:::q qan["q_a_layernorm RMSNorm(1536)"]:::q qb["q_b_proj
Linear(1536 → 12288)
ColumnParallel, = 64 × (128+64)"]:::q qs["split + reshape →
Q_nope [64, 128] + Q_rope [64, 64]"]:::q qr["RoPE(Q_rope)
rotary_dim=64, θ=50000
YaRN factor=64"]:::rope qa --> qan --> qb --> qs --> qr end subgraph KVPATH["KV path"] direction TB kva["kv_a_proj_with_mqa
Replicated Linear(7168 → 576)
= kv_lora(512) + qk_rope(64)"]:::kv kvs["split: c_kv [..,512] + k_pe [..,64]"]:::kv kvan["kv_a_layernorm RMSNorm(512)"]:::kv kvb["kv_b_proj
Linear(512 → 16384)
ColumnParallel, = 64 × (128+128)"]:::kv kvout["K_nope[64,128] + V[64,128] + K_rope[1,64 shared]
KV cache = c_kv + k_pe = 576 fp/token"]:::kv kva --> kvs --> kvan --> kvb --> kvout end attn_core["Attention core
softmax(Q · K^T / √192) · V
qk_head_dim=192, v_head_dim=128, heads=64"]:::attn op["o_proj
RowParallel Linear(8192 → 7168)"]:::q qr --> attn_core kvout --> attn_core attn_core --> op end res1["x + attn(x)"]:::res ln2["post_attention_layernorm
RMSNorm(7168, eps=1e-5)"]:::norm subgraph MOE["mlp (layer 1-60) = DeepseekV2MoE (deepseek_v2.py:354)"] direction LR gate_m["MoEGate (deepseek_v2.py:268)
F.linear(x, W[384, 7168])
+ sigmoid + noaux_tc top-8
+ e_score_correction_bias
🟢 FP16 kept"]:::gate routed["384 routed experts (top-8 active)
each = DeepseekV2MLP(7168→2048→7168, SwiGLU)
routed_scaling_factor = 2.827
🔴 INT4 compressed-tensors
(group_size=32, symmetric, pack-quantized)"]:::moe_routed shared["1 shared expert (always active)
DeepseekV2MLP(7168→2048→7168, SwiGLU)
🟢 FP16 kept
(matches ignore regex)"]:::moe_shared combine["combine
topk · routed(x) + α · shared(x)"]:::attn gate_m --> routed --> combine shared --> combine end dense0["(ONLY layer 0) mlp = DeepseekV2MLP
Linear(7168→18432) / SwiGLU / Linear(18432→7168)
🟢 FP16 kept"]:::moe_shared res2["x + MoE(x) or x + MLP(x) at layer 0"]:::res x --> ln1 --> qa ln1 --> kva op --> res1 --> ln2 ln2 --> gate_m ln2 --> shared ln2 -.-> dense0 combine --> res2 dense0 -.-> res2

关键常量 (来自 HF config.json, 与 mermaid 图的值一致):

config 字段出现位置
hidden_size7168x.shape[-1] 处处
q_lora_rank / kv_lora_rank1536 / 512q_a_proj / kv_a_proj_with_mqa 输出
qk_nope_head_dim / qk_rope_head_dim / v_head_dim128 / 64 / 128每 head 维度 split
num_attention_heads64MLA 不做 GQA
n_routed_experts / num_experts_per_tok384 / 8MoE
moe_intermediate_size2048每 expert FFN 中间维
routed_scaling_factor2.827combine 乘性放大
first_k_dense_replace1layer 0 走 dense

易错点:


架构 3 · MoonViT-3D Vision Tower #

flowchart LR classDef input fill:#ffe4e6,stroke:#e11d48 classDef vit fill:#fef3c7,stroke:#ca8a04 classDef merge fill:#fde68a,stroke:#ca8a04 classDef proj fill:#dcfce7,stroke:#16a34a classDef out fill:#eef2ff,stroke:#4338ca vin["pixel_values + grid_thws
(T, H, W) packed
T=1 image, T=4 video"]:::input subgraph PE["Patch Embedding (vllm kimi_k25_vit.py:183)"] direction TB conv["Conv2d(3, 1152, k=14, s=14, bias=True)"]:::vit pos["Learnable2DInterp PosEmb divided_fixed
64×64 spatial × 4 time bins"]:::vit conv --> pos end subgraph ENC["MoonViT3dEncoder · 27× layer (vllm kimi_k25_vit.py:463)"] direction TB att["Attention: qkv_proj 1152→3456 / 2D RoPE / spatial_temporal / o_proj 1152→1152
16 heads × 72 head_dim, attn_bias=True"]:::vit mlp["MLP2: Linear 1152→4304 / gelu_pytorch_tanh / Linear 4304→1152"]:::vit att -->|residual| mlp end subgraph MERGE["tpool_patch_merger sd2_tpool (kimi_k25_vit.py:523)"] direction TB s2["spatial 2×2 merge
[T, H, W, 1152] → [T, H/2, W/2, 4608]"]:::merge tp["temporal pool over T
(video: 4 frames → 1 token)"]:::merge s2 --> tp end subgraph PROJ["K2VLMultiModalProjector (sglang kimi_k25.py:572)"] direction TB pn["pre_norm LayerNorm(1152, eps=1e-5)
⚠ applied BEFORE reshape"]:::proj reshape["view(-1, 4608)"]:::proj l1["Linear(4608 → 4608, bias=True)"]:::proj act["GELU"]:::proj l2["Linear(4608 → 7168)
= text_hidden_size"]:::proj pn --> reshape --> l1 --> act --> l2 end vout["image/video embeds
[N_tok, 7168]
→ fused into text stream"]:::out vin --> conv pos --> att mlp --> s2 tp --> pn l2 --> vout

易错点 (容易看 paper 看错的地方):


架构 4 · INT4 Quantization Layout #

K2.6 config.json 唯一比 K2.5 新增的字段: quantization_config

flowchart LR classDef fp16 fill:#dcfce7,stroke:#16a34a,color:#052e16 classDef int4 fill:#fee2e2,stroke:#dc2626,color:#7f1d1d,stroke-width:3px classDef ignore fill:#dbeafe,stroke:#2563eb subgraph CFG["quantization_config (HF config.json 新增)"] direction TB qmethod["quant_method: compressed-tensors
format: pack-quantized
status: compressed"]:::ignore qgroup["group_0.targets: [Linear]
num_bits=4, type=int, symmetric=true,
strategy=group, group_size=32"]:::int4 qignore["ignore:
• lm_head
• re:.*self_attn.*
• re:.*shared_experts.*
• re:.*mlp\\.(gate&pipe;up&pipe;gate_up&pipe;down)_proj.*"]:::fp16 qkv["kv_cache_scheme: null
→ KV cache 保 FP16"]:::fp16 end subgraph INT4_Z["🔴 真正 INT4 的参数 (~92% 参数)"] direction TB routed["model.layers.[1-60].mlp.experts.[0-383].(gate&pipe;up&pipe;down)_proj
60 × 384 × 3 = 69,120 个 Linear
FP16 原始 ≈ 925 GB
INT4 压缩后 ≈ 245 GB
(3.77× shrink)"]:::int4 end subgraph FP16_Z["🟢 FP16 保留 (~53 GB)"] direction TB fp_attn["self_attn (MLA 所有投影)
61L × (q_a + q_b + kv_a + kv_b + o)
≈ 44 GB"]:::fp16 fp_shared["shared_experts
60L × 1 × 3 投影 ≈ 2.5 GB"]:::fp16 fp_dense["Layer 0 dense mlp
3 × (7168×18432)/2 ≈ 0.8 GB"]:::fp16 fp_head["lm_head + embed_tokens
2 × (7168 × 163840) ≈ 4.7 GB"]:::fp16 fp_vision["MoonViT-3D + mm_projector
≈ 1 GB (not Linear targets)"]:::fp16 fp_misc["MoEGate + RMSNorm + biases ≈ 0.5 GB"]:::fp16 end total["Total deployed ≈ 298 GB
单 8×H200 (1128 GB HBM) 舒适
262K KV cache / seq ≈ 290 MB (MLA latent)"]:::ignore qgroup --> routed qignore --> fp_attn qignore --> fp_shared qignore --> fp_dense qignore --> fp_head qkv --> fp_vision routed --> total fp_attn --> total fp_shared --> total

量化策略推理:


📁 Release delta 全景 (Overview / Agent Swarm / Claw Groups / 长程 RL loop)

{{drawio:kimi-k2-6_arch.drawio#page=0&height=700}}

1. Architecture (code-verified walkthrough) #

1a. Top-level wiring (对应上方「架构 1」) #

关键代码锚点 (走读时在你本地编辑器打开):

代码锚点做什么
sglang/kimi_k25.py:678class KimiK25ForConditionalGeneration — 三件套顶层构造器
sglang/kimi_k25.py:700-717构造 vision_tower / mm_projector / language_model 三件套的位置
sglang/kimi_k25.py:728get_image_feature — 图像路径入口
sglang/kimi_k25.py:774forwardgeneral_mm_embed_routine 合流

关键易错点:

  1. 模型类名在 K2.6 仍是 KimiK25ForConditionalGeneration — HF auto_map 未变, 代码路径 100% 复用 K2.5
  2. <|kimi_k25_video_placeholder|> token id = 163605 (HF config.json) — 图像 embed 合流的锚点 token
  3. 区分 "图像路径" 与 "视频路径": 二者走同一 vision_tower + mm_projector, 只是 grid_thws 的 T 维不同 (image T=1, video T=4)
  4. 1b. Text decoder layer (MLA + MoE) (对应上方「架构 2」) #

    关键代码锚点:

    代码锚点做什么
    sglang/deepseek_v2.py:1596class DeepseekV2DecoderLayer — 单层构造, 判 MoE vs dense
    sglang/deepseek_v2.py:1732-1736_is_layer_sparse = layer_id >= first_k_dense_replace(1) — layer 0 走 dense, layer 1-60 走 MoE
    sglang/deepseek_v2.py:1130class DeepseekV2AttentionMLA — MLA 的 q_a/q_b/kv_a/kv_b/o 投影构造
    sglang/deepseek_v2.py:1191-1239q_a_proj + q_a_layernorm + q_b_proj 的构造逻辑 (有 fused_qkv_a_proj_with_mqa 融合路径)
    sglang/deepseek_v2.py:1219-1290kv_a_proj_with_mqa + kv_a_layernorm + kv_b_proj 构造
    sglang/deepseek_v2.py:1556-1582prepare_qkv_latent + rebuild_cp_kv_cache — KV cache 的 576 float 布局位置
    sglang/deepseek_v2.py:354class DeepseekV2MoE — gate + routed + shared + combine
    sglang/deepseek_v2.py:268class MoEGate — sigmoid + noaux_tc top-8 路由
    sglang/deepseek_v2.py:189class DeepseekV2MLP — routed expert / shared expert / layer 0 dense FFN 都是这个类

    关键常量 (来自 config.json):

    config 字段架构图位置
    hidden_size7168所有 x.shape[-1] 标注
    q_lora_rank / kv_lora_rank1536 / 512q_a_proj / kv_a_proj_with_mqa 的输出维
    qk_nope_head_dim / qk_rope_head_dim / v_head_dim128 / 64 / 128Q/K/V split 之后的每 head 维度
    num_attention_heads64heads 数 (MLA 不做 GQA)
    n_routed_experts / num_experts_per_tok384 / 8MoE page 的 routed experts 盒子
    moe_intermediate_size2048每个 expert 的 FFN 中间维
    routed_scaling_factor2.827combine 阶段的乘性放大
    first_k_dense_replace1决定 layer 0 走 DeepseekV2MLP 而非 MoE

    易错点:

    1. MLA heads 数 = 64, 不是 GQA — config 的 num_key_value_heads=64 看似 "同 MHA", 实际是 MLA 用 latent 压缩代替 GQA, 两种机制不同
    2. K_rope 跨所有 64 heads 共享kv_a_proj_with_mqa 输出里的 64-dim k_pe 段是单份, 不是 64 份 per-head
    3. KV cache 只存 576 float/token = kv_lora_rank(512) + qk_rope_head_dim(64); K_nopeV 通过 kv_b_proj 运行时展开, 不进 cache
    4. INT4 quant 边界的正则陷阱: re:.mlp\.(gate|up|gate_up|down)_proj. 匹配的是 DeepseekV2MLP 内部的属性名 gate_proj / up_proj / down_proj. 因为 layer 0 dense 和 shared expert 都是 DeepseekV2MLP 实例, 它们的 proj 同时命中 ignore pattern → FP16 保留。真正走 INT4 的是 mlp.experts.N.* (FusedMoE 的 routed experts)。详见上方「架构 4」
    5. 1c. Vision tower (MoonViT-3D) (对应上方「架构 3」) #

      关键代码锚点:

      代码锚点做什么
      vllm/kimi_k25_vit.py:183class MoonVision3dPatchEmbedConv2d(3,1152,k=14,s=14) + pos emb
      vllm/kimi_k25_vit.py:126class Learnable2DInterpPosEmbDivided_fixed — 64×64×4 divided_fixed grid
      vllm/kimi_k25_vit.py:340class MoonViTEncoderLayer — 单层 encoder (attention + MLP2)
      vllm/kimi_k25_vit.py:463class MoonViT3dEncoder — 27 层堆叠, video_attn_type="spatial_temporal"
      vllm/kimi_k25_vit.py:523tpool_patch_mergersd2_tpool 合并: spatial 2×2 merge + temporal pool
      sglang/kimi_k25.py:572class K2VLMultiModalProjector — 4608 → 4608 GELU → 7168 (= text_hidden_size)

      关键常量:

      config 字段
      vt_num_hidden_layers27
      vt_hidden_size1152 (= 16 heads × 72 head_dim)
      vt_intermediate_size4304
      patch_size14
      merge_kernel_size[2, 2]
      merge_typesd2_tpool
      init_pos_emb_height/width/time64 / 64 / 4
      mm_hidden_size / text_hidden_size1152 / 7168

      易错点 (容易看 paper 看错的地方):

      1. head_dim = 72 是 "非 2 幂" — 继承自 SigLIP-SO-400M, 不是 Kimi 独创
      2. pre_norm 在 reshape 之前K2VLMultiModalProjector.forward 先对 [N_patches, 1152] 做 LayerNorm, 再 view(-1, 4608) merge。"先 merge 再 norm" 是天真实现, K2.x 不是这样
      3. linear_2 输出是 7168, 不是 1152 — sglang 的 K2VLMultiModalProjectortext_hidden_size (7168). 注意 vLLM 的同名类用 mm_hidden_size (1152) 是旧路径, K2.5/K2.6 走 sglang 路径
      4. temporal pool 对 T=4 取均值, 不是拼接 — 视频 4 帧打包后经 sd2_tpool 只保留 1 帧的 H×W×4608 等效
      5. 1d. INT4 Quantization Layout #

        详见 §1b 最后一段 + §3 Quantization & Compression。Page 4 把 quantization_config.ignore 正则精确 mapping 到 forward 图里的具体 nn.Module, 用红框标 INT4 区, 绿框标 FP16 保留区, 附每个区的 GB 估算。

        1e. Paper × Implementation Cross-reference #

        因为 K2.6 和 K2.5 架构完全一样,本节重点是"证明等价"和"指出 config 的唯一增量"。

        来源URL / 路径K2.5K2.6结论
        HF confighttps://huggingface.co/moonshotai/Kimi-K2.6/raw/main/config.json✅ 本次参考K2.6 唯一新增 quantization_config 字段
        HF config (K2.5 比对)moonshotai/Kimi-K2.5/config.json
        HF modelingauto_map → modeling_kimi_k25.KimiK25ForConditionalGeneration✅ 同✅ 同类名仍是 KimiK25 — 说明架构 完全复用 K2.5 代码路径
        Text backbonetext_config.architectures = ["DeepseekV3ForCausalLM"]
        SGLang 实现sglang/python/sglang/srt/models/kimi_k25.py (895 LOC)应可直接加载 K2.6 权重(处理 compressed-tensors 分支即可)
        vLLM 实现vllm/vllm/model_executor/models/kimi_k25.py (440 LOC)
        vLLM ViTvllm/vllm/model_executor/models/kimi_k25_vit.py
        前代论文Kimi K2.5 arXiv:2602.02276✅ 详见 notes复用K2.6 blog 未发论文

        精确对照 K2.6 config.json 关键字段(与 K2.5 config.json 逐字比对):

        字段K2.5K2.6一致?
        num_hidden_layers6161
        hidden_size71687168
        intermediate_size (dense)1843218432
        moe_intermediate_size20482048
        num_attention_heads6464
        num_key_value_heads6464
        q_lora_rank15361536
        kv_lora_rank512512
        qk_nope_head_dim / qk_rope_head_dim / v_head_dim128 / 64 / 128128 / 64 / 128
        n_routed_experts384384
        num_experts_per_tok88
        n_shared_experts11
        first_k_dense_replace11
        routed_scaling_factor2.8272.827
        scoring_func / topk_methodsigmoid / noaux_tcsigmoid / noaux_tc
        vocab_size163840163840
        max_position_embeddings262144262144
        rope_theta5000050000
        rope_scaling.factor6464
        vision_config.vt_num_hidden_layers2727
        vision_config.vt_hidden_size11521152
        vision_config.patch_size1414
        vision_config.merge_kernel_size[2,2][2,2]
        vision_config.merge_typesd2_tpoolsd2_tpool
        quantization_config❌ (BF16)新增 INT4 pack-quantized❌ 唯一差异
        结论:从 HF 配置文件判断,K2.6 不是新模型,而是 K2.5 的权重更新 + 默认量化发布。架构诊断深度分析 → 直接沿用 K2.5 notes 的 §1a / §1c 的 MLA / MoE / MoonViT 展开,本笔记不再重复。

        1f. Quantization Layout (唯一的架构级新增) #

        K2.6 的 quantization_config 结构:

        
        "quantization_config": {
         "quant_method": "compressed-tensors",
         "format": "pack-quantized",
         "quantization_status": "compressed",
         "config_groups": {
         "group_0": {
         "targets": ["Linear"],
         "weights": {
         "num_bits": 4, "type": "int", "symmetric": true,
         "strategy": "group", "group_size": 32,
         "observer": "minmax"
         }
         }
         },
         "ignore": [
         "lm_head",
         "re:.*self_attn.*",
         "re:.*shared_experts.*",
         "re:.*mlp\\.(gate|up|gate_up|down)_proj.*"
         ]
        }
        

        解读(必须细读 ignore 正则)

        • .self_attn.所有 MLA 投影(q_a/q_b、kv_a/kv_b、o_proj)保持 FP16;
        • .shared_experts. → 1 个 shared expert 的 gate/up/down 保持 FP16;
        • .mlp\.(gate|up|gate_up|down)_proj.注意这个正则通常匹配 dense 层的 MLP 投影 —— 也就是第 0 层(首 dense 层)的 FFN 保持 FP16;
        • lm_head → 输出头保持 FP16;
        • 剩下被量化的是:routed MoE experts(383 层 × 384 experts × 3 个 FFN 投影矩阵),这些是参数量的绝对主体(~960/1050 GB FP16 → ~240/260 GB INT4)。

        量化策略推理:

        • group_size=32 是 AWQ / GPTQ 惯用的细粒度 group-wise 量化设置,精度损失通常 <0.5 MMLU;
        • symmetric INT4 避免 zero-point 存储开销,只存 scale (FP16 per-group);
        • routed experts only 的策略反映了一个 empirical fact:MLA / shared expert / lm_head 的量化对精度更敏感(activation magnitude 更大、梯度更集中),routed experts 由于路由 sparsity 使每个权重看到的训练信号更分散、更能承受低比特;
        • 该策略与 DeepSeek-V3 / Qwen3-MoE 社区的部署配方一致,是 MoE INT4 的"standard practice"。

        1g. 计算规模推算 #

        1.04T total / 32B active 的分布(推算自 config.json):

        参数块每 token 激活FP16 总大小 (GB)K2.6 quant
        Routed MoE experts (384 × 60 层 × 3 × (7168×2048) / 2 hidden)8×60×3×(7168×2048)/2 ≈ 27 B active~930INT4 g=32 → ~235 GB
        Shared expert (60 × 3 × 7168×2048 / 2)60×3×(7168×2048)/2 ≈ 1.3 B active~2.5FP16 保留
        Dense MLP 第 0 层 (3 × 7168×18432 / 2)0.2 B~0.8FP16 保留
        MLA (61 × (q_a + q_b + kv_a + kv_b + o))~2.5 B~5FP16 保留
        Embedding + lm_head (2 × 7168 × 163840)~4.7FP16 保留
        MoonViT-3D (27 × full stack)~0.5FP16 保留
        Total~32 B active~1043~258 GB INT4 总权重
        ~258 GB 意味着 单节点 8×H200 (141 GB HBM × 8 = 1128 GB) 有充足空间同时承载 262K context 下几百到几千 token 的 KV cache——这正是 K2.6 默认 INT4 发布的部署语境。MLA 的 KV cache 576 float/token 在 262K 下约 1.2 GB/seq,余量足以支持多并发。

        2. Scale & Training — 如何训出来的 #

        2a. 规模清单(同 K2.5) #

        维度数值
        总参数~1.04 T (MoE)
        激活参数~32 B
        主干层数 × d_model61 × 7168
        Expert × top-k384 routed top-8 + 1 shared
        Vision 塔27 × 1152, 16 heads
        Context262,144 (YaRN factor=64, orig 4096)
        Vocab163,840
        默认部署精度INT4 (MoE routed only) + FP16 (others)
        Blog 推荐推理超参temperature=1.0, top-p=1.0

        2b. 训练数据 [blog 未披露,沿用 K2.5 推断] #

        Blog 对预训练数据完全未披露。由于架构与 K2.5 同,可合理假设 K2.6 复用 K2.5 的 15T text + 1T ViT + 15T joint 预训流水线,主要重做 post-training(尤其 agentic RL 和 coding SFT)。

        • Pretraining: [未披露,推测复用 K2.5 基础 checkpoint]
        • SFT: [未披露] — 但 blog 强调长程 coding 案例证据,推测专门构造了长程 coding SFT trace
        • RL: [未披露] — 推测延续 K2.5 token-level log-ratio clip + KL penalty + MuonClip + Toggle,但 reward horizon 显著扩大到 4-13 小时 tool-use rollout

        2c. Training Compute [未披露] #

        • GPU 型号 / 节点 / 互联:[blog 未披露]
        • 总 GPU-hours:[blog 未披露]
        • MFU / HFU:[blog 未披露]
        • Wall-clock time:[blog 未披露] — 但从 K2.5 (2026-02) 到 K2.6 (2026-04) 仅 ~2 个月,说明增量训练窗口相对较短,佐证"post-training 主导"的判断。

        2d. Training Recipe(重建,大部分靠 K2.5 推断) #

        StageK2.5 (已披露)K2.6 (推断/blog)
        Text Pretrain15T tokens复用 K2.5 checkpoint(推测)
        ViT Stage~1T复用
        Joint Pretrain~15T, vision:text=10:90复用
        Mid-train (long ctx)500B → 200B, 32K → 262K复用
        Zero-vision SFTtext-only + IPython可能微调
        Joint Multimodal SFT合成 + 人工可能微调
        Joint Multimodal RL按 ability 组织显著重做——长程 coding / 工具调用 reward
        Agent Swarm RL (PARL)100 × 1500 ceiling300 × 4000 ceiling, 新增 Skills
        Quantization未默认量化INT4 compressed-tensors 出厂

        2e. 训练技术(主要推断) #

        类别K2.5 已用K2.6 blog 信号
        OptimizerMuonClip[推测沿用]
        RL objectivetoken-level log-ratio clip + KL penalty[推测沿用,但 rollout horizon 显著扩大]
        Rewardrule + vision-specific + GRM + LLM-judge[推测扩充 tool-call success + perf regression 等长程 signal]
        Token efficiencyToggle (budget/full alternation)[推测延续]
        Long-contextYaRN factor=64
        Quantization[无]compressed-tensors INT4 g=32 symmetric
        Agent trainingPARL (orchestrator RL, frozen sub-agents)PARL + 3× swarm 扩容 + Skills 概念

        2f. 核心训练壁垒 #

        真正难复现的一件事长程 agentic rollout 的 reward shaping 和稳定性。blog 报告的案例(12-13 小时、4000+ tool calls)远超当前 RL 基础设施的典型 rollout 长度(分钟到小时)。这需要:

        1. Trajectory-level reward 能在几千步 tool-use 后仍保持 gradient signal 不爆炸 / 不 vanishing(PARL 的 annealed 多项 reward 提供了基础)
        2. Tool-call success 的稀疏 reward 下如何避免模型学到"早早收手"(过早提交的短视策略)——blog 强调 "less likely to make coding errors or use hacks"(factory.ai 引述),这通常需要显式的 "patience bonus" 或 hierarchical critic
        3. 基础设施:单条 rollout 4-13 小时意味着 单 episode 占用 GPU 数小时,RL 训练 batch size 难以推高——必须通过 off-policy reuse、replay buffer、或大规模并行 rollout cluster 平摊
        4. Reward model 的长程跨度:普通 LLM-as-judge 不可能读完 4000 次 tool call 的完整 trace,需要分层 judge / milestone reward
        5. 这个工程壁垒可能是开源社区短期无法复现 K2.6 长程 coding 能力的核心原因。

          3. Quantization & Compression(本次发布的唯一架构级动作) #

          3a. Compressed-tensors INT4 #

          完整配置见 §1b。关键观察:

          • Pack-quantized format:每 8 个 INT4 weight pack 到一个 INT32 word,存储 + dequant 都有 fast SIMD 路径(vLLM / llm-compressor / compressed-tensors 库原生支持)
          • group_size=32 比 AWQ 默认 128 更细,精度更高但 dequant 开销也更大(每 32 个权重一组 scale factor)
          • Symmetric int + minmax observer:最简配置,适合 post-training quantization;不需要校准集的复杂 AWQ / GPTQ 流程
          • Ignore 正则的精妙:不仅不量化 attention(标准操作),连 shared expert 都保留 FP16 —— shared expert 是每 token 必经之路,小幅量化误差会放大,保留 FP16 是明智权衡
          • 推理时 workflow:INT4 pack → 动态 dequant 到 FP16 → GEMM → 激活也是 FP16。不是 W4A4,是 W4A16 weight-only quantization——活化值不量化避免精度悬崖

          3b. 量化对 KV cache 的影响 #

          没有影响kv_cache_scheme: null 明确未量化 KV cache,这与 MLA 的设计契合——MLA latent 每 token 仅 576 float(512 + 64 RoPE),FP16 就 1.15 KB/token,262K ≈ 290 MB/seq,已经足够小,不需要 KV 量化。

          3c. 推理成本估计(部署视角) #

          部署场景硬件权重KV cache (262K, 1 seq)Note
          Single seq4× H100 80GB (NVL4)~258 GB INT4~290 MB (MLA FP16)勉强(320 GB total,需 TP+EP)
          Single node8× H100 80GB~258 GB64× 290MB = 18 GB舒适
          Single node8× H200 141GB~258 GB100× 290MB = 29 GB可跑 100+ seq 并发
          2 node16× H100 / 16× H200~258 GB几乎无限大规模推理

          对比 K2.5 BF16 需要 ~2.1 TB 权重,必须 16× H100 以上节点;K2.6 INT4 把门槛拉到单 8 卡节点,这是开源 1T MoE 部署门槛的重要拐点。

          4. Performance — 跨 benchmark 全景 #

          4a. 主 benchmark 表(全部引自 blog) #

          BenchmarkK2.6K2.5ΔGPT-5.4Claude 4.6Gemini 3.1 Pro
          Agentic
          HLE-Full w/tools54.050.2+3.852.153.051.4
          BrowseComp83.274.9+8.382.783.785.9
          BrowseComp (agent swarm)86.378.4+7.9
          DeepSearchQA f192.589.0+3.578.691.381.9
          DeepSearchQA accuracy83.077.1+5.963.780.660.2
          Toolathlon50.027.8+22.2 (+80%)54.647.248.8
          MCPMark55.929.5+26.4 (+89%)62.5\*56.7\*55.9\*
          APEX-Agents27.911.5+16.4 (+143%)33.333.032.0
          OSWorld-Verified73.163.3+9.875.072.7
          Coding
          Terminal-Bench 2.066.750.8+15.965.4\*65.468.5
          SWE-Bench Pro58.650.7+7.957.753.454.2
          SWE-Bench Multilingual76.773.0+3.777.876.9\*
          SWE-Bench Verified80.276.8+3.480.880.6
          LiveCodeBench v689.685.0+4.688.891.7
          SciCode52.248.7+3.556.651.958.9
          Reasoning
          HLE-Full34.730.1+4.639.840.044.4
          AIME 202696.495.8+0.699.296.798.3
          HMMT 202692.787.1+5.697.796.294.7
          GPQA-Diamond90.587.6+2.992.891.394.3
          Vision
          MMMU-Pro79.478.5+0.981.273.983.0\*
          BabyVision39.836.5+3.349.714.851.6
          V* w/python96.986.9+10.098.4\*86.4\*96.9\*

          \* = blog re-evaluated under same conditions (标注原文脚注 1)

          4b. 关键观察 #

          1. Agentic tool use 是最大跳跃:Toolathlon (+80%)、MCPMark (+89%)、APEX-Agents (+143%) —— 远超 coding / reasoning 的单位数增幅。这强烈支持"K2.6 的 RL 重点就在长程工具调用"的判断。
          2. SWE-Bench Pro 58.6 全场最高 —— 开源模型在真实大型代码库类 benchmark 正式登顶(SWE-Bench Pro 比 Verified 更难,涉及多文件重构和跨模块依赖)。
          3. DeepSearchQA 92.5 大幅领先闭源(GPT 78.6 / Gemini 81.9,仅 Claude 91.3 接近)—— Kimi 在搜索+阅读类任务的优势进一步拉大。
          4. AIME / HMMT / GPQA 纯数学/科学推理仍差 3-8 分(vs GPT/Gemini)—— 数学 long-chain reasoning 是 K2 系列长期短板,本次未重点优化。
          5. MMMU-Pro +0.9 极小幅提升 —— 视觉能力与 K2.5 几乎一致,符合"架构不动、训练重点在 agentic"的判断。
          6. BrowseComp 单机 83.2 vs swarm 86.3:swarm 带来 +3.1 绝对分,swarm 对 K2.5 带来 +3.5(75→78.4),swarm 的增益基本恒定——swarm 扩 3× 主要用于更复杂的多产物任务(见 §5c),不是为了刷 BrowseComp。
          7. 5. Key Innovations (本次发布) #

            5a. 长程 Agentic Coding RL #

            问题:短程 RL 训练出来的模型在分钟级任务很好,但 3 小时以上会退化——上下文漂移、目标遗忘、回滚到错误假设、过早提交的 hack solution。

            K2.6 的做法(推断自 blog 案例 + K2.5 论文):

            1. 选真实 OSS 仓库 + OOD 编程语言(Zig、老旧 Java、Rust)作为 rollout 环境
            2. Rollout 限额放到 4-13 小时 / 1000-4000+ tool calls / 10-15 iterations
            3. Reward 不依赖单次对错,而是最终性能指标(throughput、latency、test pass rate)+ 过程质量(是否用 flame graph 分析、是否正确识别瓶颈)
            4. 沿用 K2.5 的 token-level log-ratio clip + KL penalty + MuonClip + Toggle
            5. measured impact:

              • Zig 12h case: 15 → 193 tok/s (~13× gain, 20% > LM Studio)
              • exchange-core 13h case: +185% medium / +133% peak throughput
              • SWE-Bench Pro +7.9, Terminal-Bench 2.0 +15.9

              通用性仅适用于有明确外部 reward 的场景(代码性能、测试通过率),不能直接迁移到自由对话 / 创意写作。

              5b. Claw Groups — 异构 Agent 编排 #

              问题:K2.5 的 Agent Swarm 假设所有 sub-agent 跑同一个 K2.5 frozen 权重;实际用户的 agent 生态是异构的(不同厂商模型、不同设备、不同工具栈)。

              K2.6 的做法

              • K2.6 退居协调者(coordinator),不再假设 sub-agent 同模型
              • 子 agent 自带 skill profile / tool inventory / memory context
              • Coordinator 做:task-skill matching、failure detection、task reassign / regen、deliverable lifecycle
              • 和 agent 作为 peer,不只是 user↔agent 二元关系
              • Blog 明确提及 Kimi 内部营销团队已 dogfood:Demo Maker + Benchmark Maker + Social Media Agent + Video Maker 协作

              机制(blog 描述,未量化)

              • Orchestrator 感知 sub-agent skill profile → 匹配 task
              • 发现 stall / failure → 自动 reassign 或 regenerate subtask
              • 全生命周期管理:initiation → validation → completion

              通用性:挑战 LangGraph / AutoGen 等现有框架的"homogeneous agent + explicit graph"假设;如果 coordinator 可靠性足够高,可能成为开源 multi-agent 新范式。

              5c. Skills — 结构化 DNA 可复用 #

              问题:当前 LLM 处理高质量文档(McKinsey PPT、astro paper)只能"一次性阅读",每次从零理解;想复用"这种风格"很难。

              K2.6 的做法:吸收高质量 PDF / slides / sheets 的结构 + 风格 DNA作为 skill,之后 agent 可调用这个 skill 让新 task 产出同样风格/质量的产物。Blog 举例:

              • 100 个半导体资产 × 5 个量化策略,以 McKinsey PPT skill 输出 executive presentation
              • 高质量 astro paper 吸收后,生成 40 页 7000 词的研究论文 + 20,000+ 条数据集 + 14 张 astronomy-grade 图表

              机制:blog 未披露,推测是template extraction + few-shot conditioning:从示例文档抽结构 (sections, slide layouts, data table schemas) + 风格 (tone, figure style, color palette) 存到可检索的 skill repo,task-time 由 K2.6 读入并 condition 生成。

              通用性:需要高质量 input;容易被现有方案(RAG + 风格 prompting)近似,但把它作为一等公民 agent 能力暴露给终端用户是产品级创新。

              5d. INT4 默认发布 #

              已在 §3 详述。核心价值:把 1T MoE 部署门槛从 "16+ GPU 节点" 拉到 "单 8 卡节点",对开源生态可部署性是质的变化。

              6. Infrastructure Impact #

              LayerImpact
              Algorithm长程 agentic RL(几千步 tool-use rollout)把 trajectory horizon 拉到前所未见水平;Claw Groups coordinator 训练是新的多 agent RL 子方向;Skills 把模板提取/复用提到一等公民
              Kernel无新 kernel 需求(复用 DeepSeek-V3 MLA + MoE 路径);compressed-tensors INT4 dequant + GEMM 融合在 vLLM/SGLang 已成熟
              Framework调度器需支持 4-13 小时长程 session 的 prefix-cache 跨会话复用;coordinator 需新的 task queue / failure detection / heterogeneous agent routing 抽象;长程 agentic RL 训练栈需支持超长 rollout 的 off-policy reuse
              LLM证明"架构 freeze + 训练/部署大改"对 1T MoE 仍奏效;INT4 routed-only 量化是 MoE 部署的 reference point
              Agent开源侧长程 coding / swarm 扩容 / 异构编排三合一发布,raising the bar for LangGraph/AutoGen/CrewAI 等现有框架;Toolathlon +80% / MCPMark +89% 的跳跃会把整个开源 agent 生态向 K2.6 的评测配置迁移
              CodeKimi Code(CLI)、OpenClaw(24/7 代理)、Claw Groups(异构编排层)同步落地形成完整 agentic coding 栈;第三方集成(Vercel AI Gateway、Ollama、baseten、fireworks、blackbox.ai、factory.ai、codebuddy.ai、qoder.com、opencode.ai、hermes-agent、kilo.ai)说明生态反应速度快

              7. Deployment Considerations #

              • 最低硬件服务于合理质量:INT4 下 ~258 GB 权重,单 8× H200 (141GB)单 8× H100 (80GB) 紧凑 都能跑,推荐前者留 headroom for long-context KV cache
              • 推荐并行策略:TP=8 (单节点) 足够;跨节点 TP+EP 适合高并发(64+ seq)
              • 开源协议:modified-MIT(与 K2.5 一致)
              • Fine-tuning 友好度LoRA 可行(attention 和 shared expert 保留 FP16,量化的 routed experts 理论上也可 PEFT,但 INT4 + LoRA 合并需要 dequant 流程);全量微调需要先从 INT4 反量化到 BF16 再训
              • API/CLI:Kimi.com / Kimi App / API / Kimi Code 四端可用
              • 推荐推理超参:temperature=1.0, top-p=1.0, context=262,144(blog 脚注 1)
              • 第三方部署:Kimi Vendor Verifier (KVV) 已上线,推荐通过它验证不同 provider 的 inference accuracy

              8. Position in Landscape #

              • 开源模型 vs 闭源前沿:coding + agentic 类基准基本追平或超越 Claude Opus 4.6 / GPT-5.4;纯 reasoning 仍落后 3-8 分
              • 开源生态:与 Qwen3 / DeepSeek-V3.x / GLM-5.x 同期;K2.6 的 agent 编排层(Claw Groups)是开源侧首次做异构 agent 生态的系统性尝试
              • 本次发布的里程碑
              • 开源 1T MoE 单节点部署的 reference point(INT4 routed-only 是模板)
              • 开源 agent 小时级长程 rollout 的第一批可验证证据(Zig 12h / exchange-core 13h / on-call 5 days)
              • 开源 agent swarm 300 × 4000 步规模的第一批实际部署
              • 前瞻:K3 系列应该会是架构级 redesign(目前 K2 系列架构已迭代 3 次——K2、K2.5、K2.6——全部复用同一 backbone,说明瓶颈正从架构转向 RL / 编排)

              Logic Flow Reconstruction #

              时代定位 #

              2026 年 Q2,开源 1T MoE 生态已过"架构 low-hanging fruit"阶段——MLA、MoE、YaRN 都是社区共识。竞争重心从"模型够不够好"转移到"模型能不能做长活":

              • 前代开源模型(Llama / Qwen / DeepSeek / 早期 K2)在几十次 tool call 后就开始退化;
              • 闭源旗舰(GPT-5.x / Claude Opus 4.x)已展示 4+ 小时 autonomous coding(Claude Computer Use / Deep Research),开源社区没有对应物;
              • K2.6 选择在 agentic 工具调用 + 长程编程 这条轴上做极限,是瞄准开源生态最大短板的战术选择。

              背景 (Context) #

              现有开源 agent 框架(LangGraph, AutoGen, CrewAI)在长程任务上有三类问题:

              1. 上下文爆炸:context-window 增长到几十万 token 时模型开始忘早期决策;
              2. 工具调用失败率累积:单次 95% 成功率 → 1000 次调用后 ≈5% 完成率;
              3. 无异构编排能力:假设所有 agent 同模型同配置,生态无法接纳第三方 agent。
              4. 约束推导 (为何不可 X?) #

                替代方案为何 K2.6 不采用约束证据
                换架构(新 MoE / SSM / 线性注意力)2 个月迭代窗口太短;K2 栈已被 vLLM/SGLang 深度集成config.json 逐字未变
                更大底模(2T、3T)1T MoE 已在 8×H100 单节点紧张,再大必须强制多节点 → 部署生态收窄INT4 发布恰好把门槛压到单节点
                纯 SFT 做长程长程工具调用的 reward 无法在 SFT 阶段人工标注(1 条轨迹 = 几万 token),必须依赖 过程奖励 + 最终奖励的 RLblog 强调"less likely to hack"—— SFT 无法显式惩罚 hack
                同构 swarm(K2.5 路线)生态接纳度低,只能做 Kimi 自己的子 agent;限制第三方 agent 接入Claw Groups 的异构需求
                W4A4 全量化MLA + shared expert 对量化误差敏感,全量化会掉 MMLU/GPQA 2-5 分ignore 名单排除 self_attn 和 shared_experts

                破局 (Insight) #

                用一句话抓住关键:当底模架构达到"够用"的饱和点,下一步的杠杆是把 RL rollout horizon 从分钟级推到小时级——本质是让模型在训练阶段就"体验过"数千步 tool use 的长时依赖,把长程规划能力"刻进"权重里。

                类比:就像一个刚会写 CRUD 的初级工程师(K2.5)vs. 一个能独立重构遗留系统的中级工程师(K2.6)——二者的差别不在算法知识,而在耐心 + 系统性 + 对失败的鲁棒性,这些都是通过大量真实项目的反馈循环磨出来的,而不是更多理论书。

                作者证明 #

                博客性质决定 作者证明 只有 empirical form(不是 technical report),因此:

                • No formal SJM — blog 不给 scaling law、不给 loss 方程、不给收敛定理
                • Empirical-only 作者证明 via (a) case studies + (b) benchmark table
                • 两个 flagship case:Zig 12h (15→193 tok/s) + exchange-core 13h (+185%/+133%) 提供能力上界的存在性证明——至少模型在特定 OOD 场景下可以持续工作 13 小时并产出 meaningful 性能提升;
                • Benchmark 表:30+ 个 benchmark 上的 K2.6 / K2.5 / GPT-5.4 / Claude 4.6 / Gemini 3.1 Pro 对比,支持"agentic + coding 领先、reasoning 略逊"的定性判断
                • 11 家第三方评测(baseten / blackbox.ai / codebuddy / factory.ai / fireworks / Hermes / kilo / Ollama / opencode / qoder / Vercel)提供生态级交叉验证——虽然缺少独立 third-party audit

                可攻击面

                • Case study 只 2 个,样本量小,可能挑选偏差
                • 11 家合作伙伴都是 launch partner,有商业动机
                • Blog 没披露失败率 / 中断率——12h 的 case 是 "happy path",不知道平均 rollout 有多少会崩
                • Benchmark 脚注里 HLE-Full w/tools 用的是 "discard all but latest" context management,这是配得上高分的评测配置而非统一标准;不同 provider 可能不同配置

                从 作者证明 到 reported numbers 的一阶映射

                • 无 closed-form 可以把 "agentic RL 4000 step rollout" 映射到 Toolathlon 50.0 ——blog 本就是"we did X and measured Y"的演示性质,不是"从模型一阶推导出 Y"
                • 唯一的一阶映射:INT4 量化 → ~258 GB → 单 8 卡节点可行(§3c)——这是纯工程推算,不需要论文支持

                核心技术壁垒 #

                最难复现的一件事(见 §2f):长程 agentic RL 的 trajectory-level reward shaping + rollout 基础设施。具体三个难点:

                1. Rollout cost:单条轨迹占用 GPU 4-13 小时,要做 batch size > 几百的 RL 需要几百到几千张 GPU 专门跑 rollout(不含 policy update),这已经是大型训练集群的量级;
                2. Reward model 跨步:标准 LLM-as-judge 无法评价 4000 步 tool-use trace,需要分层 judge(milestone reward + final reward)或 external oracle(测试通过率、性能数字等可执行信号);
                3. Stability:token-level log-ratio clip 在短 rollout 上证明 work,但在 4000+ step 长轨迹上很可能出现 gradient spike / loss explosion——blog 未披露稳定性技巧,这是核心 know-how。
                4. 论证链重构 (Argument Chain Reconstruction) #

                  StepPremise (cite)ConclusionEvidence
                  1K2.5 架构已能支持 1T MoE + MLA + 262K context(K2.5 paper Table 1, config.json)继续在底模上改性价比不高,饱和点已近K2.6 config.json 与 K2.5 逐字相同
                  2开源 agent 在几十次 tool call 后退化(benchmark 数据 K2.5 Toolathlon 27.8 / MCPMark 29.5)长程 agentic 稳定性是最大短板Toolathlon / MCPMark 分数水平
                  3长程 RL rollout(4000+ step, 4-13h)能在训练时"刻入"长程规划这是攻克 step 2 的钥匙Zig/exchange-core 两个 13h case 的存在性证明
                  4+ Agent Swarm 3× 扩容 + Claw Groups 异构编排,把单 agent 突破放大到 multi-agent 系统形成从模型能力编排能力生态接纳的完整栈300 sub-agent / Skills / 11 合作伙伴
                  5+ INT4 默认发布把部署门槛从多节点拉到单节点让上述能力普惠开源社区compressed-tensors config + ~258 GB 推算
                  FinalK2.6 在"底模冻结 + RL/编排/量化三轴并行"策略下,是开源 agent 生态在 2026 Q2 的最佳可部署选项benchmark 表 + 案例 + 第三方评价

                  Load-bearing steps: 1, 3, 5(若其中任一 false,整个论点失效)。

                  Decorative steps: 4(Claw Groups 即使未发布,K2.6 本身仍有价值,但 step 5 不行,因为 1T 模型不普惠部署就没有开源价值)。

                  质疑假设 (Challenge Assumptions, chain-anchored) #

                  • [攻击 step 1]: "饱和点已近" 是真的吗?架构仍有空间(e.g. 从 MLA 切到 Kimi Linear、从 Dense MoE 切到 fine-grained MoE);K2.6 的选择可能是工程资源约束下的局部最优而非全局最优。但 K3 推测确实会改架构,说明 Moonshot 内部也意识到这一点。笔者承认不完全确定——可能"架构不改"是因为市场窗口压力,而非真相信饱和
                  • [攻击 step 3]: 2 个 case study(Zig + exchange-core)样本量太小,不足以证明"所有长程 coding 都能稳定做到 13 小时"。存在性证明 $\neq$ 分布稳定性证明。如果让模型 1000 个类似任务上 repeat,可能只有 20-30% 能 13 小时 unbroken。
                  • [攻击 step 3, ecosystem reality check]: OpenAI Operator、Anthropic Claude Code、Google Jules 等闭源 agent 在 2025-2026 都已展示小时级 autonomous coding,长程 rollout RL 并非 K2.6 独有;开源要 catch up 即可,不一定有 paradigm-shift 级价值。
                  • [攻击 step 5]: INT4 routed-only 会降低长程 coding 稳定性吗?blog 没给出 BF16 vs INT4 的长程 ablation。如果 INT4 在 4000 step rollout 上累积误差显著,"普惠"承诺就要打折扣。

                  设计绑定批判 (Design Binding, chain-anchored) #

                  • [绑定 step 1]: 完全绑 K2.5 backbone —— 如果架构级缺陷(e.g. MLA 在极长上下文下有已知缺陷)暴露,K2.6 也跑不掉。Term gate: "backbone" 这里是 DeepSeek-V3 家族 MLA + MoE, 近 2 年(2024-2026)Kimi 系列已三次证明这个 backbone 稳,Plausibility gate: 短期内不会有颠覆性替代(Kimi Linear 2510.26692 等只是变体),绑定是安全 bet
                  • [绑定 step 3]: 绑 trajectory-level RL + 外部可验证 reward —— 这要求任务有可执行 oracle(测试、性能数字)。在没有 oracle 的领域(创意写作、开放性咨询),K2.6 的长程能力不能直接迁移Term gate: "oracle" = 客观可执行 reward, Plausibility gate: coding / 数据分析 / 执行自动化有 oracle, 这些正是开源最需要的垂类, 所以绑定可接受
                  • [绑定 step 5]: 绑 MoE sparse → routed experts 占 ~92% 参数 这一结构假设, 让 INT4-routed-only 能 cover 大头权重。如果未来模型走 fine-grained MoE(如 8 expert × 8× more params)或 Dense-MoE 混合, 这个量化模板就要重设计。Term gate: "MoE sparsity" = routed >> shared+attention 的参数占比, Plausibility gate: 主流 MoE 模型(DeepSeek, Kimi, Qwen3-MoE)都符合这一结构, 安全 bet
                  • [绑定 step 2]: 绑 Claw Groups 异构 agent 模式流行 —— 如果市场仍偏好单厂商垂直 agent 栈(Anthropic 自家 Computer Use、Google 自家 Jules),Claw Groups 的生态路径会压缩。medium-beta 预测,1-2 年后再看。

                  生态影响追踪 (Ecosystem Influence) #

                  • 第三方集成密度:11 家伙伴(含 Vercel AI Gateway、Ollama、Fireworks、baseten、factory.ai 等)在 launch day 已上线,反应速度是开源模型中罕见
                  • 开源 agent 框架(LangGraph / AutoGen / CrewAI)可能被迫增加 Claw Groups 兼容性抽象
                  • Kimi Vendor Verifier (KVV) 反向约束第三方部署质量——这是开源生态"可信推理"的新基础设施
                  • 会推动 Terminal-Bench 2.0 / MCPMark / Toolathlon / APEX-Agents 成为更主流的 agent 评测标准

                  Implementation References (paper × code cross-check) #

                  来源路径用途
                  HF confighttps://huggingface.co/moonshotai/Kimi-K2.6/raw/main/config.jsonK2.6 架构 + 量化 ground truth
                  HF config (K2.5 对照)https://huggingface.co/moonshotai/Kimi-K2.5/raw/main/config.json证明 K2.6 架构未变
                  HF modelingmodeling_kimi_k25.KimiK25ForConditionalGeneration (trust_remote_code)类名仍是 K25,说明 K2.6 完全复用 K2.5 代码
                  SGLangsglang/python/sglang/srt/models/kimi_k25.py (895 LOC)端到端 multimodal 推理路径
                  vLLMvllm/vllm/model_executor/models/kimi_k25.py (440 LOC) + kimi_k25_vit.py多模态 processor + ViT
                  Bloghttps://www.kimi.com/blog/kimi-k2-6发布信息、benchmark、case study、合作伙伴引言
                  K2.5 论文arXiv:2602.02276notes/2602.02276.md继承架构、训练细节、PARL 公式
                  K2 论文arXiv:2507.20534最早的 K2 主干设计
                  外部参考Kimi Linear arXiv:2510.26692K2 系列的 linear attention 变体方向

                  Paper × code 对照核验

                  • config.json.text_config.architectures = ["DeepseekV3ForCausalLM"] → 文本主干 100% DeepSeek-V3 风格
                  • auto_map.AutoModel = "modeling_kimi_k25.KimiK25ForConditionalGeneration"模型类名 K25 未变 → K2.6 不需要新 modeling 代码, 只需加载权重 + 处理 compressed-tensors 量化
                  • vision_config.merge_type = "sd2_tpool" + patch_size=14 + merge_kernel_size=[2,2] → MoonViT-3D 完全同 K2.5(SigLIP-SO-400M 派生 + 2×2 spatial merge + temporal pool)
                  • rope_scaling.type = "yarn" + factor=64 + original_max_position_embeddings=4096 → YaRN 64× 扩到 262,144,与 K2.5 一致
                  • quantization_config.quant_method = "compressed-tensors" + format = "pack-quantized" → 唯一的部署层新增

                  Open Questions #

                  1. 长程 RL 训练基础设施到底长什么样?每 rollout 4-13 小时,如何 batch、如何 off-policy、单 episode 能不能 replay 重用?
                  2. INT4 vs BF16 在长程 coding 上的对比:blog 没给 ablation,quant 会不会累积误差导致 4000 step rollout 稳定性下降?
                  3. Claw Groups coordinator 如何训练?PARL 式的 orchestrator RL 够吗?异构 sub-agent 的 skill profile 如何表示?
                  4. Skills 内部机制:是 template + few-shot prompting?还是真的把 structural DNA 作为可检索 embedding?
                  5. Toolathlon / MCPMark 的 +80% / +89% 跳跃是否可归因于训练集泄露?RL 阶段的任务分布如何隔离?
                  6. K3 会是什么样? K2 系列三次迭代都复用同一 backbone,K3 是否会切换到 Kimi Linear / 全局 attention 变体?
                  7. RL 长程 trajectory level 的 credit assignment 具体怎么做?MuonClip 在 4000 step rollout 上需要哪些 stability tweaks?
                  8. SWE-Bench Pro 58.6 全场最高:真实大型代码库能力从哪来?训练集是否包含类似规模的 OSS patch history?