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
I researched the practical GPU specs for Kimi-K3 — a few findings that surprised me more...
Well, I spent some time going through the Kimi K3 release, vLLM recipes, checkpoint sizing, speculative decoding setup, and the GPU configurations that are actually realistic for self-hosting it.
Kimi K3 is 2.8T parameters total with ~104B active per token. It has 896 routed experts, 16 active per token, native vision, and a 1M-token context window.
The interesting part is that it doesn't ship as a giant BF16 checkpoint. The released weights use a mixed MXFP4/BF16 representation and are only about 1.56 TB.
A few useful things I found:
8× B300 / GB300 is basically the minimum NVIDIA setup. With 288 GB per GPU, you get ~2.3 TB aggregate VRAM, leaving enough headroom beyond the ~1.56 TB checkpoint.
AMD is viable too: vLLM has a documented 8× MI355X TP8 path.
B200/GB200 needs more GPUs. vLLM says K3 requires at least 16× B200/GB200, since an 8-GPU B200 box doesn't have enough memory.
K3's 1M context doesn't mean you should always allocate 1M tokens. Long context still eats serving memory and concurrency, so --max-model-len should match the workload you're actually running.
The other big one is DSpark speculative decoding. vLLM's GB300 testing went from 118 tok/s/user → 370 tok/s/user, about a 3.14× improvement, using the open Kimi-K3 DSpark draft model.
---
Hardware picture:
Native MXFP4 / mixed checkpoint
~1.56 TB weights
8× B300 / GB300
8× MI355X
16× B200 / GB200
For production-scale traffic, the story quickly becomes multi-node with expert/data parallelism, fast NVLink/RDMA, prefix caching, and potentially prefill/decode disaggregation.
I collected the verified GPU layouts, vLLM commands, quants, DSpark config, and deployment notes here:
Full breakdown:
https://blog.gpus.market/deploying-kimi-k3-with-vllm-verified-gpu-pods-quants-and-serving-recipes