Text Generation
Transformers
Safetensors
kimi_k2
conversational
custom_code
Eval Results
compressed-tensors
Instructions to use moonshotai/Kimi-K2-Thinking with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use moonshotai/Kimi-K2-Thinking with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="moonshotai/Kimi-K2-Thinking", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("moonshotai/Kimi-K2-Thinking", trust_remote_code=True, dtype="auto") - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use moonshotai/Kimi-K2-Thinking with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "moonshotai/Kimi-K2-Thinking" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "moonshotai/Kimi-K2-Thinking", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/moonshotai/Kimi-K2-Thinking
- SGLang
How to use moonshotai/Kimi-K2-Thinking with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "moonshotai/Kimi-K2-Thinking" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "moonshotai/Kimi-K2-Thinking", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "moonshotai/Kimi-K2-Thinking" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "moonshotai/Kimi-K2-Thinking", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use moonshotai/Kimi-K2-Thinking with Docker Model Runner:
docker model run hf.co/moonshotai/Kimi-K2-Thinking
Update README.md
Browse files
README.md
CHANGED
|
@@ -71,13 +71,13 @@ Kimi K2 Thinking is the latest, most capable version of open-source thinking mod
|
|
| 71 |
|:----------|:--------|------------:|------:|----------------------------:|--------:|--------------:|-------:|
|
| 72 |
| **HLE (Text-only)** | no tools | 23.9 | 26.3 | 19.8* | 7.9 | 19.8 | 25.4 |
|
| 73 |
| | w/ tools | 44.9 | 41.7* | 32.0* | 21.7 | 20.3* | 41.0 |
|
| 74 |
-
| | heavy | 51.0 | 42.0 |
|
| 75 |
| **AIME25** | no tools | 94.5 | 94.6 | 87.0 | 51.0 | 89.3 | 91.7 |
|
| 76 |
| | w/ python | 99.1 | 99.6 | 100.0 | 75.2 | 58.1* | 98.8 |
|
| 77 |
-
| | heavy | 100.0 | 100.0 |
|
| 78 |
| **HMMT25** | no tools | 89.4 | 93.3 | 74.6* | 38.8 | 83.6 | 90.0 |
|
| 79 |
| | w/ python | 95.1 | 96.7 | 88.8* | 70.4 | 49.5* | 93.9 |
|
| 80 |
-
| | heavy | 97.5 | 100.0 |
|
| 81 |
| **IMO-AnswerBench** | no tools | 78.6 | 76.0* | 65.9* | 45.8 | 76.0* | 73.1 |
|
| 82 |
| **GPQA** | no tools | 84.5 | 85.7 | 83.4 | 74.2 | 79.9 | 87.5 |
|
| 83 |
|
|
|
|
| 71 |
|:----------|:--------|------------:|------:|----------------------------:|--------:|--------------:|-------:|
|
| 72 |
| **HLE (Text-only)** | no tools | 23.9 | 26.3 | 19.8* | 7.9 | 19.8 | 25.4 |
|
| 73 |
| | w/ tools | 44.9 | 41.7* | 32.0* | 21.7 | 20.3* | 41.0 |
|
| 74 |
+
| | heavy | 51.0 | 42.0 | - | - | - | 50.7 |
|
| 75 |
| **AIME25** | no tools | 94.5 | 94.6 | 87.0 | 51.0 | 89.3 | 91.7 |
|
| 76 |
| | w/ python | 99.1 | 99.6 | 100.0 | 75.2 | 58.1* | 98.8 |
|
| 77 |
+
| | heavy | 100.0 | 100.0 | - | - | - | 100.0 |
|
| 78 |
| **HMMT25** | no tools | 89.4 | 93.3 | 74.6* | 38.8 | 83.6 | 90.0 |
|
| 79 |
| | w/ python | 95.1 | 96.7 | 88.8* | 70.4 | 49.5* | 93.9 |
|
| 80 |
+
| | heavy | 97.5 | 100.0 | - | - | - | 96.7 |
|
| 81 |
| **IMO-AnswerBench** | no tools | 78.6 | 76.0* | 65.9* | 45.8 | 76.0* | 73.1 |
|
| 82 |
| **GPQA** | no tools | 84.5 | 85.7 | 83.4 | 74.2 | 79.9 | 87.5 |
|
| 83 |
|