Run Kimi K2.7 Code Locally: VRAM & GPU Requirements
Kimi K2.7 Code is Moonshot AI's June 2026 coding model trained on K2.6, with nearly the same architecture and size. It uses about 30% fewer thinking tokens. When local hardware runs at only a few dozen tokens/s, that cuts wait times by roughly 30%. It only supports thinking mode, so go back to K2.6 if you need instant answers.
Kimi K2.7 Code details
- Min VRAM at 4-bit (8K context)586 GB
- 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?
The table below assumes all experts stay in VRAM with no RAM offloading. If you are short on VRAM, you can offload experts to RAM; see the complete builds below.
| 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. Kimi K2.7 Code is K2.6 with more training and the same 1T parameters, so 2-bit takes about 340 GB, far beyond any GPU or 128GB machine. The 512GB Mac Studio M3 Ultra is the only standalone machine that holds it, and dropping to 1-bit saves only about 35 GB. Because it always outputs a long reasoning chain before writing code, generation speed directly sets your wait time. Faster setups require multiple GPUs or a big-memory server, where 4-bit and lossless 8-bit need the same hardware, so pick 8-bit.
The table below assumes all experts stay in VRAM with no RAM offloading. If you are short on VRAM, you can offload experts to RAM; see the complete builds below.
| Device | Price | Speed t/s | Max context |
|---|---|---|---|
| Mac Studio M3 Ultra 512GBWhole system · 512 GB | $18,79714 listings | 44.5 | 256K |
Only common GPUs and systems are listed, from cheapest to most expensive.
How many GPUs do you need to run Kimi K2.7 Code?
For Kimi K2.7 Code on multiple GPUs, the practical coding setup is four 96GB RTX PRO 6000 cards at 2-bit, running at about 74 tokens/s with roughly 30% less thinking wait than K2.6. Eight 48GB RTX A6000s hold 2-bit at about half the speed, while 4-bit needs eight RTX PRO 6000s at about 52 tokens/s. Official vLLM validation covers only eight H200s. For text-only coding, launch without the vision part to free VRAM for context.
| Device | Cards | Total price | Total VRAM | Speed t/s | Total power |
|---|---|---|---|---|---|
| 4 units | $31,300 | 512 GB | 16.1 | 960 W | |
| 8 cards | $39,400 | 384 GB | 39.9 | 2,400 W | |
| Instinct MI21064 GB per card | 8 cards | $40,312 | 512 GB | 70.2 | 2,400 W |
| 4 cards | $76,000 | 384 GB | 74.5 | 2,400 W | |
| 8 cards | $79,000 | 576 GB | 61.2 | 2,400 W | |
| 8 cards | $159,192 | 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 | $37,594 | 1,024 GB | 27.6 | 960 W |
| 8 cards | $152,000 | 768 GB | 52.3 | 4,800 W | |
| 8 cards | $159,192 | 640 GB | 55.4 | 2,400 W |
| Device | Cards | Total price | Total VRAM | Speed t/s | Total power |
|---|---|---|---|---|---|
| Mac Studio M3 Ultra 512GB512 GB per unit | 2 units | $37,594 | 1,024 GB | 27.2 | 960 W |
| 8 cards | $152,000 | 768 GB | 51.6 | 4,800 W | |
| 8 cards | $159,192 | 640 GB | 54.7 | 2,400 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?
With RAM offload, Kimi K2.7 Code matches K2.6's hardware and speeds: a 12-channel DDR5 server with one RTX PRO 6000 runs at about 46 tokens/s at 2-bit, or about 27 tokens/s 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 modelsTesla V100 32GB + Dual Xeon E5 8-GPU server
Budget- PSU
- Built-in 4 × 1,600 W
- Included
GeForce RTX 5090 + Dual EPYC DDR5
Flagship4 × RTX PRO 6000 + Dual EPYC DDR5
Giant modelsTesla V100 32GB + Dual Xeon E5 8-GPU server
Budget- PSU
- Built-in 4 × 1,600 W
- Included
GeForce 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 | |
| 2,800B | 104B | 1,508.7 GBest. |