How to Deploy Kimi K2.7 Code Locally
Kimi K2.7 Code is a coding-specialized model that Moonshot AI released in June 2026, trained further on top of K2.6. Its architecture and size are nearly identical to K2.6. Moonshot says it uses about 30% fewer thinking tokens than K2.6; when local generation runs at only a few dozen tokens/s, that also means roughly 30% less waiting. The trade-off is that it only has thinking mode; for instant answers, you have to go back to K2.6.
Kimi K2.7 Code details
- Min VRAM at 4-bit586 GB · 8K
- Parameters1,000B
- Active params32B
- Max context256K
- Architecture
- MoE
- Experts offloaded
- 10 GB VRAM + 578 GB RAM
- License
- Modified MIT
- Launch date
- Jun 12, 2026
- Vendor
- Moonshot AI
- Hugging Face repo
- moonshotai/Kimi-K2.7-Code
- GGUF repo
- unsloth/Kimi-K2.7-Code-GGUF
- NVFP4 repo (Blackwell)
- nvidia/Kimi-K2.7-Code-NVFP4
- MLX repo (Apple)
- mlx-community/Kimi-K2.7-Code-4bit
- Layers
- 61
- Hidden size
- 7,168
- KV heads
- 64
- Head dim
- 192
How much VRAM does Kimi K2.7 Code need for local deployment?
| Quantization | WeightsGB | 8K contextGB | 32K contextGB | 128K contextGB | 256K context (max)GB |
|---|---|---|---|---|---|
| 1-bit | 303.9GGUF | 305.5 | 307.3 | 314.2 | 323.4 |
| 2-bit | 339.5GGUF | 341.1 | 342.9 | 349.8 | 359 |
| 3-bit | 463.9GGUF | 465.5 | 467.3 | 474.2 | 483.4 |
| 4-bit | 583.7GGUF | 585.3 | 587.1 | 594 | 603.2 |
| 5-bit | — | — | — | — | — |
| 8-bit | 594.5GGUF | 596.1 | 597.9 | 604.8 | 614 |
| BF16/FP16 | 2,100est. | 2,101.6 | 2,103.4 | 2,110.3 | 2,119.5 |
Full calculation rules are on the Methodology page.
Can a single GPU run Kimi K2.7 Code?
No. It's K2.6 with more training, the same 1T parameters, and 2-bit is about 340 GB, far beyond any GPU or 128GB machine; the 512GB Mac Studio M3 Ultra is the only single machine that holds it. Don't count on 1-bit to buy headroom, since it's only about 35 GB smaller. This is a coding model that always thinks before it writes, so every task opens with a long stretch of reasoning, and your hardware's generation speed decides how long you wait. If you want it faster, that means multiple GPUs or a big-memory server, and at that point 4-bit and 8-bit need the same hardware, so go with lossless 8-bit.
| Device | Price | Speed t/s | Max context |
|---|---|---|---|
| Mac Studio M3 Ultra 512GBWhole system · 512 GB | $22,80013 listings | 44.5 | 256K |
Only common GPUs and systems are listed, one set for models under 50B and another for larger ones, sorted by price from low to high.
How many GPUs do you need to run Kimi K2.7 Code?
For coding, the practical setup is four 96GB RTX PRO 6000 cards at 2-bit, at about 74 tokens/s. It thinks about 30% less than K2.6, so the same task means roughly 30% less waiting. Eight 48GB RTX A6000s also hold 2-bit, at about half the speed, and 4-bit needs eight RTX PRO 6000s, at about 52 tokens/s. vLLM has officially validated it only on eight H200s. If you're only writing code and don't need image input, you can launch it without the vision part and give that VRAM to context.
| Device | Cards | Total price | Total VRAM | Speed t/s | Total power |
|---|---|---|---|---|---|
| 4 units | $33,596 | 512 GB | 16.1 | 960 W | |
| 8 cards | $39,192 | 384 GB | 39.9 | 2,400 W | |
| Instinct MI21064 GB per card | 8 cards | $39,952 | 512 GB | 70.2 | 2,400 W |
| 8 cards | $85,776 | 576 GB | 61.2 | 2,400 W | |
| 4 cards | $90,000 | 384 GB | 74.5 | 2,400 W | |
| 8 cards | $151,992 | 640 GB | 78.2 | 2,400 W | |
| 8 cards | No price | 384 GB | 49.5 | 3,600 W |
| Device | Cards | Total price | Total VRAM | Speed t/s | Total power |
|---|---|---|---|---|---|
| Mac Studio M3 Ultra 512GB512 GB per unit | 2 units | $45,600 | 1,024 GB | 27.6 | 960 W |
| 8 cards | $151,992 | 640 GB | 55.4 | 2,400 W | |
| 8 cards | $180,000 | 768 GB | 52.3 | 4,800 W |
| Device | Cards | Total price | Total VRAM | Speed t/s | Total power |
|---|---|---|---|---|---|
| Mac Studio M3 Ultra 512GB512 GB per unit | 2 units | $45,600 | 1,024 GB | 27.2 | 960 W |
| 8 cards | $151,992 | 640 GB | 54.7 | 2,400 W | |
| 8 cards | $180,000 | 768 GB | 51.6 | 4,800 W |
Mac Studios link up over Thunderbolt 5 and run with MLX or exo; vLLM doesn't support them. Full calculation rules are on the Methodology page.
What PC or server build do you need to run Kimi K2.7 Code locally?
Expert-offloading setups and speeds are also the same as for K2.6: a 12-channel DDR5 server with one RTX PRO 6000 does about 46 tokens/s at 2-bit and about 27 at 4-bit (with every slot filled for 768GB of RAM). At these speeds, 30% fewer thinking tokens is a real gain: at 4-bit, 10,000 thinking tokens take about 6 minutes, so cutting 30% saves roughly 2 minutes.
GeForce RTX 3090 + Dual EPYC DDR4
Best valueGeForce RTX 5090 + Dual EPYC DDR5
Flagship2 × RTX PRO 6000 + Dual EPYC DDR5
Giant models4 × Tesla V100 32GB + Dual Xeon E5 DDR4
BudgetGeForce RTX 5090 + Dual EPYC DDR5
Flagship4 × RTX PRO 6000 + Dual EPYC DDR5
Giant models4 × Tesla V100 32GB + Dual Xeon E5 DDR4
BudgetGeForce RTX 5090 + Dual EPYC DDR5
Flagship4 × RTX PRO 6000 + Dual EPYC DDR5
Giant modelsDetailed calculation rules are on the Methodology page.
As an eBay Partner, VRAMGlass may be compensated if you buy through the eBay links on this page. The price you pay stays the same.
What to know before running Kimi K2.7 Code locally
Thinking mode only
It doesn't support instant mode, and
preserve_thinkingis forced on and can't be turned off: in multi-turn conversations, the client has to send back the thinking content returned in each turn (in vLLM, this field may be called reasoning rather thanreasoning_content). Moonshot recommendstemperature1.0 andtop_p0.95.Quantization
Unsloth offers more quants than for K2.6, with several levels between 1-bit and 4-bit; 3-bit is about 464 GB. The recommended pick is 2-bit (UD-Q2_K_XL); the 8-bit UD-Q8_K_XL keeps the 4-bit experts as-is and is the lossless version. For context, Unsloth recommends a default of 98,304, with a maximum of 262,144.
vLLM flags
The vLLM recipe requires 0.19.1 or later. For tool calling and thinking parsing, add
--tool-call-parser kimi_k2and--reasoning-parser kimi_k2respectively. For the vision part,--mm-encoder-tp-mode dataruns a separate copy on each card, avoiding communication between GPUs.Hooking it up to coding agents
Moonshot says it works best with its own Kimi Code CLI. When connecting it to other agent frameworks, first make sure the framework passes thinking content back unchanged; otherwise you lose the benefit of “preserved thinking.”
Launch commands
llama.cpp
- NVIDIA
- AMD
- Mac
- CPU
llama-server -hf unsloth/Kimi-K2.7-Code-GGUF:UD-Q4_K_XL -c 8192Short on VRAM? Add --cpu-moe to keep the routed experts in system RAM (about 578 GB needed).
llama-server -hf unsloth/Kimi-K2.7-Code-GGUF:UD-Q4_K_XL -c 8192 \ -ngl 99 --cpu-moe
vLLM
- Linux
- NVIDIA
Follow the deployment guide to prepare the required runtime and hardware.
vllm serve moonshotai/Kimi-K2.7-Code \ --trust-remote-code \ --tensor-parallel-size 8 \ --tool-call-parser kimi_k2 \ --enable-auto-tool-choice \ --reasoning-parser kimi_k2 \ --speculative-config '{"model":"lightseekorg/kimi-k2.7-coder-eagle3.1-mla","method":"eagle3","num_speculative_tokens":3}' \ --mm-encoder-tp-mode data
MLX
- Apple Silicon
On a Mac, pip install mlx-lm first; this command downloads the MLX weights from Hugging Face and starts an OpenAI-compatible server.
mlx_lm.server --model mlx-community/Kimi-K2.7-Code-4bitOllama
- Windows
- macOS
- Linux
Ollama only has a cloud version, kimi-k2.7-code:cloud, which runs on Ollama's servers rather than on your machine.
File names follow that week's model-library snapshot; the definitions are in the methodology. Methodology
Other models in the Kimi family
| Model | Total params | Active params | 4-bit size |
|---|---|---|---|
| 49.1B | 3B | 30.1 GB | |
| 1,000B | 32B | 621.3 GB | |
| 1,000B | 32B | 621.2 GB | |
| 1,000B | 32B | 583.7 GB | |
| 2,800B | 104B | 1,508.7 GB |