Skip to content
Navigation Menu
Appearance settings
You signed in with another tab or window. Reload to refresh your session.
You signed out in another tab or window. Reload to refresh your session.
You switched accounts on another tab or window. Reload to refresh your session.
Dismiss alert
{{ message }}
Repository navigation
NotificationsYou must be signed in to change notification settings
Fork912 (912)
Star11.1k (11.1k)You must be signed in to star a repository
Kimi K2 is the large language model series developed by Moonshot AI team
Custom properties
Report repository
BranchesTags
Open more actions menu
Latest commit
Folders and files
Last commit message
Last commit date
tech_report.pdf
View all files
Repository files navigation
📰 Tech Blog | 📄 Full Report
1. Model Introduction
Kimi K2 is a state-of-the-art mixture-of-experts (MoE) language model with 32 billion activated parameters and 1 trillion total parameters. Trained with the Muon optimizer, Kimi K2 achieves exceptional performance across frontier knowledge, reasoning, and coding tasks while being meticulously optimized for agentic capabilities.
Key Features
Large-Scale Training: Pre-trained a 1T parameter MoE model on 15.5T tokens with zero training instability.
MuonClip Optimizer: We apply the Muon optimizer to an unprecedented scale, and develop novel optimization techniques to resolve instabilities while scaling up.
Agentic Intelligence: Specifically designed for tool use, reasoning, and autonomous problem-solving.
Model Variants
Kimi-K2-Base: The foundation model, a strong start for researchers and builders who want full control for fine-tuning and custom solutions.
Kimi-K2-Instruct: The post-trained model, best for drop-in, general-purpose chat and agentic experiences. It is a reflex-grade model without long thinking.
2. Model Summary
Architecture
Mixture-of-Experts (MoE)
Total Parameters
Activated Parameters
Number of Layers (Dense layer included)
Number of Dense Layers
Attention Hidden Dimension
MoE Hidden Dimension (per Expert)
Number of Attention Heads
Number of Experts
Selected Experts per Token
Number of Shared Experts
Vocabulary Size
Context Length
Attention Mechanism
Activation Function
3. Evaluation Results
Instruction model evaluation results
Kimi K2 Instruct
DeepSeek-V3-0324
Qwen3-235B-A22B (non-thinking)
Claude Sonnet 4 (w/o extended thinking)
Claude Opus 4 (w/o extended thinking)
Gemini 2.5 Flash Preview (05-20)
Coding Tasks
LiveCodeBench v6(Aug 24 - May 25)
SWE-bench Verified (Agentless Coding)
Single Patch w/o Test (Acc)
SWE-bench Verified (Agentic Coding)
Single Attempt (Acc)
Multiple Attempts (Acc)
SWE-bench Multilingual (Agentic Coding)
TerminalBench
Inhouse Framework (Acc)
Terminus (Acc)
Aider-Polyglot
Tool Use Tasks
Tau2 airline
Tau2 telecom
Math & STEM Tasks
GPQA-Diamond
Humanity's Last Exam(Text Only)
General Tasks
Prompt Strict
Multi-Challenge
• Bold denotes global SOTA, and underlined denotes open-source SOTA.
• Data points marked with * are directly from the model's tech report or blog.
• All metrics, except for SWE-bench Verified (Agentless), are evaluated with an 8k output token length. SWE-bench Verified (Agentless) is limited to a 16k output token length.
• Kimi K2 achieves 65.8% pass@1 on the SWE-bench Verified tests with bash/editor tools (single-attempt patches, no test-time compute). It also achieves a 47.3% pass@1 on the SWE-bench Multilingual tests under the same conditions. Additionally, we report results on SWE-bench Verified tests (71.6%) that leverage parallel test-time compute by sampling multiple sequences and selecting the single best via an internal scoring model.
• To ensure the stability of the evaluation, we employed avg@k on the AIME, HMMT, CNMO, PolyMath-en, GPQA-Diamond, EvalPlus, Tau2.
• Some data points have been omitted due to prohibitively expensive evaluation costs.
Base model evaluation results
Kimi K2 Base
Deepseek-V3-Base
Llama 4 Maverick
MMLU-redux-2.0
LiveCodeBench v6
Mathematics Tasks
Chinese Tasks
• We only evaluate open-source pretrained models in this work. We report results for Qwen2.5-72B because the base checkpoint for Qwen3-235B-A22B was not open-sourced at the time of our study.
• All models are evaluated using the same evaluation protocol.
4. Deployment
You can access Kimi K2's API on https://platform.moonshot.ai , we provide an OpenAI/Anthropic-compatible API for you.
The Anthropic-compatible API maps temperature by real_temperature = request_temperature * 0.6 for better compatiblity with existing applications.
Our model checkpoints are stored in block-fp8 format, you can find it on Huggingface.
Currently, it is recommended to run Kimi-K2 on the following inference engines:
KTransformers
TensorRT-LLM
Deployment examples for vLLM and SGLang can be found in the Model Deployment Guide.
5. Model Usage
Chat Completion
Once the local inference service is set up, you can interact with it through the chat endpoint:
def simple_chat(client: OpenAI, model_name: str):
messages = [
{"role": "system", "content": "You are Kimi, an AI assistant created by Moonshot AI."},
{"role": "user", "content": [{"type": "text", "text": "Please give a brief self-introduction."}]},
response = client.chat.completions.create(
model=model_name,
messages=messages,
stream=False,
temperature=0.6,
max_tokens=256
print(response.choices[0].message.content)
The recommended temperature for Kimi-K2-Instruct is temperature = 0.6.
If no special instructions are required, the system prompt is a good default.
Tool Calling
Kimi-K2-Instruct has strong tool-calling capabilities.
To enable them, you need to pass the list of available tools in each request, then the model will autonomously decide when and how to invoke them.
The following example demonstrates calling a weather tool end-to-end:
# Your tool implementation
def get_weather(city: str) -> dict:
return {"weather": "Sunny"}
# Tool schema definition
"type": "function",
"function": {
"name": "get_weather",
"description": "Retrieve current weather information. Call this when the user asks about the weather.",
"parameters": {
"type": "object",
"required": ["city"],
"properties": {
"type": "string",
"description": "Name of the city"
# Map tool names to their implementations
tool_map = {
"get_weather": get_weather
def tool_call_with_client(client: OpenAI, model_name: str):
{"role": "user", "content": "What's the weather like in Beijing today? Use the tool to check."}
finish_reason = None
while finish_reason is None or finish_reason == "tool_calls":
completion = client.chat.completions.create(
tools=tools, # tool list defined above
tool_choice="auto"
choice = completion.choices[0]
finish_reason = choice.finish_reason
if finish_reason == "tool_calls":
messages.append(choice.message)
for tool_call in choice.message.tool_calls:
tool_call_name = tool_call.function.name
tool_call_arguments = json.loads(tool_call.function.arguments)
tool_function = tool_map[tool_call_name]
tool_result = tool_function(**tool_call_arguments)
print("tool_result:", tool_result)
messages.append({
"role": "tool",
"tool_call_id": tool_call.id,
"name": tool_call_name,
"content": json.dumps(tool_result)
print("-" * 100)
print(choice.message.content)
The tool_call_with_client function implements the pipeline from user query to tool execution.
This pipeline requires the inference engine to support Kimi-K2’s native tool-parsing logic.
For streaming output and manual tool-parsing, see the Tool Calling Guide.
Both the code and the model weights are released under the Modified MIT License.
@misc{kimiteam2025kimik2openagentic,
title={Kimi K2: Open Agentic Intelligence},
[...内容已截断,完整版请查看原文或 Wayback 快照]