Instructions to use moonshotai/Kimi-K3 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use moonshotai/Kimi-K3 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="moonshotai/Kimi-K3", trust_remote_code=True) messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("moonshotai/Kimi-K3", trust_remote_code=True, device_map="auto") - Inference
- HuggingChat
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use moonshotai/Kimi-K3 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "moonshotai/Kimi-K3" # 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-K3", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/moonshotai/Kimi-K3
- SGLang
How to use moonshotai/Kimi-K3 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-K3" \ --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-K3", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'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-K3" \ --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-K3", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }' - Docker Model Runner
How to use moonshotai/Kimi-K3 with Docker Model Runner:
docker model run hf.co/moonshotai/Kimi-K3
Add RedlineBench evaluation result (redline_overall: 49.3)
Adds .eval_results/redlinebench.yaml with Kimi K3's result on RedlineBench
(crosbylegal/RedlineBench),
a Hugging Face registered benchmark for multi-turn contract redlining.
Result: redline_overall = 49.3 (0–100 scale; higher is better)
- Benchmark: 140 Harbor tasks — 3 grounded SaaS /
professional-services MSA negotiations (3 scenarios x 4 alternating turns). The agent
edits a real Word.docx, producing native tracked changes (<w:ins>/<w:del>) and
threaded margin comments. - Metric definition: turn-weighted weighted pass rate. Per task, reward is
clamp((earned - penalty) / total_positive)over weighted attorney-authored rubric
verdicts; rewards are averaged within input groups, then the 12 (scenario x turn)
cells are weighted equally so later turns don't dominate. - Judging: 3-LLM judge panel (
gpt-5.4-mini+claude-haiku-4-5+gemini-3.1-flash-lite), strict majority vote per rubric criterion. The panel is
deliberately outside the family of the model under test. - Harness:
agent=kimi-k3, via the public reproduction driver at
https://github.com/crosbylegal/redline-bench - Report / methodology: https://intelligence.crosby.ai/benchmark/
Note on the filename: redlinebench.yaml refers to crosbylegal/RedlineBench
(contract negotiation), which is the dataset.id in the YAML. There are unrelated
Hub datasets with similar names (e.g. feichtb/redlinebench, on construction
drawings) — this result is not from those.
This is a post-publication run; the originally published report covers GPT-5.5,
Claude Fable 5, Gemini 3.5 Flash, and Claude Opus 4.8. Same harness, same judge
panel, same metric.