Kimi K2.7-Code
Last edited
Fact-checked
Sources
24 citations
Revision
v2 · 2,564 words
Fact-checks are independent of edits: a reviewer re-verifies the article against its sources and stamps the date. How we verify
Kimi K2.7-Code is an open-weight, coding-focused agentic model released by Moonshot AI on 2026-06-12. It is a mixture-of-experts model with roughly 1 trillion total parameters and 32 billion activated per token, a 256K-token context window, and weights published to Hugging Face under Moonshot's Modified MIT License [1][2]. Unlike the general-purpose Kimi K2.6 it was built on, K2.7-Code is tuned narrowly for long-horizon software engineering: reading unfamiliar repositories, planning multi-file changes, invoking tools, and recovering from failures across many turns. Its headline claim at launch was efficiency rather than raw capability, with Moonshot reporting roughly 30% fewer thinking tokens than K2.6 at higher accuracy on the company's own evaluations [1][3].
The release matters less for its benchmark scores, all of which were vendor-run at launch, than for where it ended up. On 2026-07-01 GitHub made K2.7-Code the first open-weight model selectable in the GitHub Copilot model picker [4]. It was the last model Moonshot shipped before Kimi K3 arrived on 2026-07-16 [5].
Architecture and specifications
K2.7-Code keeps the K2-series backbone: multi-head latent attention, SwiGLU feed-forward blocks, and a sparse expert routing scheme that activates a small fraction of the network per token. It also retains the MoonViT vision encoder that Moonshot introduced with Kimi K2.5, so the model accepts images and video alongside text, though the model card calls video an experimental feature supported only through Moonshot's official API [1].
| Specification | Value |
|---|---|
| Architecture | Mixture-of-experts, multi-head latent attention |
| Total parameters | 1T |
| Activated parameters per token | 32B |
| Layers | 61 (including 1 dense layer) |
| Attention hidden dimension | 7,168 |
| Attention heads | 64 |
| Experts | 384, with 8 routed plus 1 shared per token |
| Vocabulary | 160K |
| Context length | 262,144 tokens (256K) |
| Vision encoder | MoonViT, 400M parameters |
| Weight format | Native INT4 for MoE weights (quantization-aware training), BF16 elsewhere |
| License | Modified MIT License |
The native INT4 scheme is the same one Moonshot used for Kimi K2 Thinking: the expert weights are trained to be quantized rather than compressed after the fact, which keeps the download and the serving footprint far below what a BF16 trillion-parameter checkpoint would need [1][6].
Two behavioral constraints set K2.7-Code apart from most of its peers. Thinking mode is compulsory. The model card forces both thinking and preserve_thinking to true, and Moonshot's parameter reference says thinking is on by default, that only {"type": "enabled", "keep": "all"} is accepted, and that any other configuration returns an error [1][23]. Sampling is pinned by the same reference: temperature fixed at 1.0 with other values returning an error, top_p fixed at 0.95, n fixed at 1, and both presence_penalty and frequency_penalty fixed at 0 [23]. Teams that want low-variance or deterministic output have no knob to turn, which is a real limitation for classification-style or templated generation work.
Moonshot describes the post-training data as diversified software engineering tasks across more than ten mainstream programming languages, drawn from internal engineering work, production incidents, and open-source projects, weighted toward backend services, infrastructure, performance engineering, systems programming, security, frontend, and machine learning and data engineering [1].
Place in the Kimi lineage
K2.7-Code is a branch off the main line rather than a step along it. It was fine-tuned from K2.6 and shipped between K2.6 and K3, and it is the only member of the series with a task-specific suffix in its name.
| Model | Released | Notes |
|---|---|---|
| Kimi K1.5 | 2025-01-20 | Reasoning model, matched OpenAI o1 on math, code, and multimodal reasoning [7] |
| Kimi K2 | July 2025 | 1T total / 32B active MoE, open-sourced under a modified MIT license [7] |
| K2-Instruct-0905 | 2025-09-05 | Context extended from 128K to 256K [24] |
| Kimi K2 Thinking | November 2025 | Reasoning variant, introduced the native INT4 approach [7] |
| Kimi K2.5 | January 2026 | Multimodal, instant and thinking modes [7] |
| Kimi K2.6 | April 2026 | General-purpose multimodal, text, image, and video input [7] |
| Kimi K2.7-Code | 2026-06-12 | Coding-specialist fine-tune of K2.6 [1] |
| Kimi K3 | 2026-07-16 | 2.8T parameters, 896 experts, 1M-token context [5][7] |
K3 supersedes K2.7-Code on general capability and is more than twice its size, but it is also priced at $3 per million input tokens against K2.7-Code's $0.95, so the older coding model remained the cheap workhorse option through July 2026 [5][8].
Token efficiency
The 30% figure is the claim Moonshot led with, and it is a different kind of claim from a benchmark score. Reasoning models bill for the tokens they generate while thinking, so on agentic workloads that run for hundreds of turns, thinking-token count is close to a direct proxy for cost. Moonshot says K2.7-Code cuts thinking-token usage by roughly 30% on average against K2.6 while scoring higher on the same evaluations [1][3].
The measurement is Moonshot's own and the company has not published the task distribution behind the average, so the number should be read as a vendor summary rather than a reproducible result. Mitch Ashley of the Futurum Group told DevOps.com that "token efficiency is a transitory challenge in agentic coding", on the reasoning that competitors absorb gains of this kind into baseline tool capability within a release cycle or two [6].
Benchmarks
Every headline number Moonshot published for K2.7-Code is a score the company ran itself. The model card compares K2.7-Code against K2.6, GPT-5.5, and Claude Opus 4.8 across six evaluations [1][3].
| Benchmark | K2.6 | K2.7-Code | GPT-5.5 | Claude Opus 4.8 | Source of benchmark |
|---|---|---|---|---|---|
| Kimi Code Bench v2 | 50.9 | 62.0 | 69.0 | 67.4 | Moonshot internal |
| Program Bench | 48.3 | 53.6 | 69.1 | 63.8 | Not publicly documented |
| MLS Bench Lite | 26.7 | 35.1 | 35.5 | 42.8 | Not publicly documented |
| Kimi Claw 24/7 Bench | 42.9 | 46.9 | 52.8 | 50.4 | Moonshot internal |
| MCP Atlas | 69.4 | 76.0 | 79.4 | 81.3 | Third-party [9] |
| MCP Mark Verified | 72.8 | 81.1 | 92.9 | 76.4 | Third-party [10] |
The relative gains Moonshot advertised follow from that table: +21.8% on Kimi Code Bench v2, +11.0% on Program Bench, and +31.5% on MLS Bench Lite against K2.6 [3][6]. Two of the six evaluations do have public provenance. MCP-Atlas is a 1,000-task tool-use benchmark built on 36 production Model Context Protocol servers and 220 tools, posted to arXiv on 2026-01-31 [9]. MCPMark is a 127-task MCP stress test in which every task starts from a curated initial state and is checked by a programmatic verification script [10]. Moonshot ran both itself, so the scores are self-reported even where the benchmark is not.
The comparison is also harness-dependent, and Moonshot said so: K2.7-Code and K2.6 were evaluated through the Kimi Code CLI with thinking enabled at temperature 1.0, top-p 0.95, and a 262,144-token context, while GPT-5.5 ran in Codex at xhigh effort and Opus 4.8 in Claude Code at xhigh [3][22]. Scaffolding differences of that size make cross-vendor rows hard to read as capability measurements.
At release there were no third-party results for K2.7-Code on SWE-bench Verified, SWE-bench Pro, Terminal-Bench, LiveCodeBench, GPQA Diamond, or any other neutral suite that runs all models under identical conditions [6][11]. That has partly changed. Artificial Analysis now publishes an independent composite for the model, scoring it 42 on its Intelligence Index v4.1 and ranking it 7th of 97 comparable open-weights models, against a median of 25 for the field [8]. That index is built from nine evaluations, including Terminal-Bench v2.1, SciCode, GPQA Diamond, Humanity's Last Exam, and AA-Omniscience [8]. Artificial Analysis has not published K2.7-Code's per-benchmark component scores, and as of 2026-07-27 no independent SWE-bench Verified or LiveCodeBench figure had appeared.
Pricing and availability
Moonshot serves the model through its own OpenAI- and Anthropic-compatible API, with automatic context caching [1][12].
| Kimi API tier | Cache-hit input | Cache-miss input | Output |
|---|---|---|---|
| Standard | $0.19 / M | $0.95 / M | $4.00 / M |
| High-speed | $0.38 / M | $1.90 / M | $8.00 / M |
Subscription access runs through Kimi Code, Moonshot's CLI agent, on plans named after musical tempo markings. Moonshot lists Moderato, Allegretto, Allegro, and Vivace at $15, $31, $79, and $159 per month on annual billing [3]; DevOps.com reported the entry tier at $19 per month without stating a billing period [6].
Third-party hosting arrived quickly. CoreWeave put K2.7-Code on its serverless inference platform on 2026-06-18, running NVFP4 quantization and DFlash speculative decoding on NVIDIA Blackwell hardware [13]. Cloudflare Workers AI exposes it as @cf/moonshotai/kimi-k2.7-code at Moonshot's list prices [14], Ollama offers a hosted kimi-k2.7-code:cloud endpoint [15], and OpenRouter routes requests across several competing hosts [21]. Microsoft added the model to the Foundry catalogue in public preview on 2026-07-01 [17].
Serving performance varies enormously by provider. Artificial Analysis measured output speeds spanning nearly an order of magnitude across hosts. The figures below are its median over the preceding 72 hours as read on 2026-07-27, so they move from week to week and should be treated as a snapshot rather than a fixed specification [16].
| Provider | Output speed (tokens/s) | Latency to first token |
|---|---|---|
| Crusoe (NVFP4) | 444.1 | 5.64 s |
| Makora | 283.4 | 8.37 s |
| CoreWeave | 281.4 | 9.07 s |
| Together AI | 119.4 | 19.21 s |
| Moonshot (Kimi API) | 48.0 | 2.80 s |
Self-hosting is supported through vLLM, SGLang, and KTransformers, and requires transformers >=4.57.1, <5.0.0 [1]. The hardware bar is high. Unsloth's community GGUF conversions range from about 339 GB on disk for a 2-bit dynamic quant to 595 GB for an effectively lossless 8-bit build, with recommended combined RAM plus VRAM of roughly 325 to 350 GB at the low end and about 605 GB for the 8-bit build [18].
GitHub Copilot
The most consequential distribution event came on 2026-07-01, when GitHub began rolling K2.7-Code out to Copilot Pro, Pro+, and Max subscribers and described it as "the first open-weight model offered as a selectable option in the Copilot model picker" [4]. GitHub hosts the weights itself on Microsoft Azure rather than proxying Moonshot's API, and bills at provider list pricing under usage-based billing [4]. Coverage was extended to Copilot Business and Enterprise on 2026-07-07, though the model is off by default there and an administrator has to enable the policy before anyone in the organization can select it [19].
The Hacker News thread on the announcement drew 417 points and 185 comments, and the reaction was split [20]. Supporters pointed at the price, with one commenter putting the same task at $0.006 on K2.7-Code against $0.016 on GPT-5.4 mini, and at having the raw reasoning trace available rather than a summary [20]. Detractors reported that the model "would run in circles" on tasks Claude finished in one pass, and several commenters said flatly that they did not trust the published benchmarks [20]. Much of the thread was about Copilot's June pricing restructure rather than about Moonshot.
Reception and criticism
The benchmark question dominated the reception. VentureBeat's coverage centred on practitioners saying the numbers did not reproduce on their own workloads; the developer Sugumaran Balasubramaniyan responded publicly that every model improves by double digits on its own test suite, noted that K2.6 had scored 24% on the third-party DeepSWE evaluation, tied with GPT-5.4-mini, and asked whether Moonshot would submit K2.7-Code to the same test [11]. In VentureBeat's own GPU kernel testing, K2.7-Code wrote genuine Triton kernels on five of six problems where K2.6 had fallen back to library wrappers, but two of those kernels failed on bugs the model introduced itself [11].
Assessments of the efficiency claim were warmer, on the reasoning that thinking-token reduction shows up directly on an invoice and is harder to game than a score. The forced-thinking design cuts both ways: it suits multi-step engineering work, but it means simple queries also pay for a reasoning trace, and the locked sampling parameters remove control that competing APIs expose.
The broader read on K2.7-Code is that it strengthened the case for open weights in production coding tools more than it changed the capability frontier. Moonshot's own table puts it behind GPT-5.5 on all six evaluations and behind Claude Opus 4.8 on five of six, its one win over Opus 4.8 coming on MCPMark Verified. What it offers instead is price and portability: a fraction of frontier API rates, and downloadable weights rather than an API-only endpoint. That combination, more than any single score, is what made it the first open-weight entry in a Copilot picker that had until then carried only closed frontier models [4]. It arrived alongside a broader wave of open-weight Chinese releases from Moonshot's peers, DeepSeek among them, though Copilot had not admitted any of those to the picker [4]. Five weeks later Moonshot released K3, which restored the general-purpose flagship line at a much higher price point and left K2.7-Code as the cost-sensitive coding option in the Kimi family.
References
- "moonshotai/Kimi-K2.7-Code." Hugging Face, 2026-06-12. https://huggingface.co/moonshotai/Kimi-K2.7-Code ↩
- "Modified MIT License." Kimi-K2.7-Code repository, Hugging Face, 2026. https://huggingface.co/moonshotai/Kimi-K2.7-Code/raw/main/LICENSE ↩
- "Kimi K2.7 Code: Open-Source Agentic Coding Model." Moonshot AI, 2026. https://www.kimi.com/resources/kimi-k2-7-code ↩
- "Kimi K2.7 Code is generally available in GitHub Copilot." GitHub Changelog, 2026-07-01. https://github.blog/changelog/2026-07-01-kimi-k2-7-is-now-available-in-github-copilot/ ↩
- "Kimi K3, and what we can still learn from the pelican benchmark." Simon Willison's Weblog, 2026-07-16. https://simonwillison.net/2026/Jul/16/kimi-k3/ ↩
- "Moonshot AI's Kimi K2.7-Code Targets Token Efficiency in Agentic Coding." DevOps.com, 2026-06. https://devops.com/moonshot-ais-kimi-k2-7-code-targets-token-efficiency-in-agentic-coding/ ↩
- "Kimi (chatbot)." Wikipedia, accessed 2026-07-25. https://en.wikipedia.org/wiki/Kimi_(chatbot) ↩
- "Kimi K2.7 Code: Intelligence, Performance & Price Analysis." Artificial Analysis, accessed 2026-07-25. https://artificialanalysis.ai/models/kimi-k2-7-code ↩
- "MCP-Atlas: A Large-Scale Benchmark for Tool-Use Competency with Real MCP Servers." arXiv:2602.00933, submitted 2026-01-31. https://arxiv.org/abs/2602.00933 ↩
- "MCPMark: A Benchmark for Stress-Testing Realistic and Comprehensive MCP Use." arXiv:2509.24002, 2025-09. https://arxiv.org/pdf/2509.24002 ↩
- "Kimi K2.7-Code cuts thinking tokens 30%, but practitioners say the benchmarks don't check out." VentureBeat, 2026-06. https://venturebeat.com/technology/kimi-k2-7-code-cuts-thinking-tokens-30-practitioners-say-benchmarks-dont-check-out ↩
- "Kimi K2.7 Code pricing." Kimi Open Platform documentation, accessed 2026-07-25. https://platform.kimi.ai/docs/pricing/chat-k27-code ↩
- "Kimi K2.7 Code Now Available on Serverless Inference with Leading Benchmark Price Performance." CoreWeave, 2026-06-18. https://www.coreweave.com/blog/kimi-k2-7-code-now-available-on-serverless-inference-with-leading-benchmark-price-performance ↩
- "kimi-k2.7-code (Moonshot AI)." Cloudflare Workers AI documentation, accessed 2026-07-25. https://developers.cloudflare.com/workers-ai/models/kimi-k2.7-code/ ↩
- "kimi-k2.7-code." Ollama model library, accessed 2026-07-25. https://ollama.com/library/kimi-k2.7-code ↩
- "Kimi K2.7 Code: API Providers, Pricing & Benchmarks." Artificial Analysis provider comparison, accessed 2026-07-27. https://artificialanalysis.ai/models/kimi-k2-7-code/providers ↩
- "Introducing Kimi K2.7 Code in Microsoft Foundry." Microsoft Community Hub, 2026-07-01. https://techcommunity.microsoft.com/blog/azure-ai-foundry-blog/introducing-kimi-k2-7-code-in-microsoft-foundry/4532286 ↩
- "Kimi K2.7 Code: How to Run Locally." Unsloth Documentation, accessed 2026-07-25. https://unsloth.ai/docs/models/kimi-k2.7-code ↩
- "Kimi K2.7 now available for Copilot Business and Enterprise." GitHub Changelog, 2026-07-07. https://github.blog/changelog/2026-07-07-kimi-k2-7-now-available-for-copilot-business-and-enterprise/ ↩
- "Kimi K2.7 Code is generally available in GitHub Copilot." Hacker News discussion, 2026-07. https://news.ycombinator.com/item?id=48756602 ↩
- "Kimi K2.7 Code." OpenRouter model page, accessed 2026-07-25. https://openrouter.ai/moonshotai/kimi-k2.7-code ↩
- "Moonshot AI Releases Kimi K2.7-Code: a Coding Model Reporting +21.8% on Kimi Code Bench v2 Over K2.6." MarkTechPost, 2026-06-12. https://www.marktechpost.com/2026/06/12/moonshot-ai-releases-kimi-k2-7-code-a-coding-model-reporting-21-8-on-kimi-code-bench-v2-over-k2-6/ ↩
- "Model Parameter Reference." Kimi API Platform documentation, accessed 2026-07-27. https://platform.kimi.ai/docs/api/models-overview ↩
- "moonshotai/Kimi-K2-Instruct-0905." Hugging Face, 2025-09-05. https://huggingface.co/moonshotai/Kimi-K2-Instruct-0905 ↩
Improve this article
Add missing citations, update stale details, or suggest a clearer explanation. Every suggestion is reviewed for sourcing before it goes live.
1 revision by 1 contributors · full history