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
- HuggingChat
- Notebooks
- Google Colab
- Kaggle
- Local Apps
- 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
Add SWE-bench Verified evaluation result (71.3%)
#60 opened 2 months ago
by
SaylorTwift
Install & run moonshotai/Kimi-K2-Thinking easily using llmpm
1
#58 opened 2 months ago
by
sarthak-saxena
Fine tuning kimik2
#57 opened 3 months ago
by
savsuresharintra
Add Terminal-Bench evaluation result (35.7%)
#56 opened 3 months ago
by
burtenshaw
Add converted tokenizer (no trust_remote_code needed)
#55 opened 3 months ago
by
ArthurZ
Add HLE evaluation result (with tools)
#54 opened 4 months ago
by
burtenshaw
Add GPQA evaluation result
#52 opened 4 months ago
by
burtenshaw
I think `eos_token_id` should be `163585`in `config.json`?
#51 opened 4 months ago
by
jukofyork
Add community evaluation results for GPQA
#50 opened 4 months ago
by
nielsr
Add MMLU-Pro evaluation result
#49 opened 4 months ago
by
nielsr
Add HLE evaluation result
#48 opened 4 months ago
by
burtenshaw
New tool to benchmark GGUF files
#47 opened 5 months ago
by
Nerdsking
This model thinks that repeating itself is good
π 1
#46 opened 5 months ago
by
ChuckMcSneed
Which Longform Writing benchmark is?
#44 opened 5 months ago
by
woolpeeker
Update tokenization_kimi.py
π₯ 2
#43 opened 5 months ago
by
noamw-aai
need the version of transformer
#42 opened 5 months ago
by
Jack879
Kimi-K2-Thinking vLLM self host tool call fail
1
#40 opened 5 months ago
by
CHONGYOEYAT
I need a teacher
#39 opened 5 months ago
by
0xola
How to limit the thinking duration?
#38 opened 6 months ago
by
Spankyboy
Add Artificial Analysis evaluations for kimi-k2-thinking
#37 opened 6 months ago
by
mackenzietechdocs
tokenizer.apply_chat_template is right? Manually Parsing Tool Calls Failed! but openai api Success, Why?
#36 opened 6 months ago
by
nwzjk
Kimi-K2 (non-thinking) QAT
#35 opened 6 months ago
by
geboh67859
Token Count Calculation in SFT Data Distribution Curation
9
#31 opened 6 months ago
by
tcy006
kimi-k2-thinking can't use a tool with 2 required arguments if it has 2 or more tools.
#30 opened 6 months ago
by
Yerkhat
Is the reasoning parser going to be available in vllm soon?
1
#29 opened 6 months ago
by
dingobingobango
If we apply PTQ to a QAT model, what will happen
#28 opened 6 months ago
by
onekq
User Reviews about K2 Thinking and Search Agent
1
#27 opened 6 months ago
by
DeepNLP
Was this really trained during QAT using a symmetric 4bit quant with only 15/16 values used?
π 9
3
#26 opened 6 months ago
by
jukofyork
Their API Takes Your Data - PRIVACY RISK
π₯ 1
9
#24 opened 6 months ago
by
evilperson068
Any plan to open source the search agent framework?
β 3
6
#22 opened 6 months ago
by
CherryDurian
Beware quantization destroyed coding abilities, broken code in Q5-K-M (735Gb RAM)
10
#21 opened 6 months ago
by
krustik
Does the Ktranformers deployment support non-AVX-512?
1
#16 opened 6 months ago
by
bullerwins
Question: Will models with other precisions be published soon?
π 1
1
#14 opened 6 months ago
by
jhv00
Question: What model precision was used during the benchmarks?
#13 opened 6 months ago
by
evewashere
vllm deployment failed
8
#11 opened 6 months ago
by
mondaylord
How to control reasoning effort? Heavy Mode/low-latency mode?
π 5
#10 opened 6 months ago
by
huggingfacemotnt
Did you set GPT-5's reasoning effort to high?
2
#6 opened 6 months ago
by
Max-and-Omnis
K2 Thinking Browsecomp/HLE Reproducibility | η»ζε€η°
β 3
17
#5 opened 6 months ago
by
pandemo
Awesome work! Do you want to try AMO-Bench, the most challenging MO-level benchmark?
#3 opened 6 months ago
by
ShengnanAn
Python script to decompress tensors?
βπ₯ 4
15
#2 opened 7 months ago
by
ubergarm
Video of Step-by-Step Review and Testing
ππ 6
#1 opened 7 months ago
by
fahdmirzac