Instructions to use moxin-org/Kimi-K2-Thinking-Moxin-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use moxin-org/Kimi-K2-Thinking-Moxin-GGUF with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="moxin-org/Kimi-K2-Thinking-Moxin-GGUF") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("moxin-org/Kimi-K2-Thinking-Moxin-GGUF", dtype="auto") - llama-cpp-python
How to use moxin-org/Kimi-K2-Thinking-Moxin-GGUF with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="moxin-org/Kimi-K2-Thinking-Moxin-GGUF", filename="K2-Thinking-IQ1_M/Kimi-K2-Thinking-Moxin-IQ1_M-00001-of-00007.gguf", )
llm.create_chat_completion( messages = [ { "role": "user", "content": "What is the capital of France?" } ] ) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- llama.cpp
How to use moxin-org/Kimi-K2-Thinking-Moxin-GGUF with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf moxin-org/Kimi-K2-Thinking-Moxin-GGUF:IQ1_M # Run inference directly in the terminal: llama-cli -hf moxin-org/Kimi-K2-Thinking-Moxin-GGUF:IQ1_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf moxin-org/Kimi-K2-Thinking-Moxin-GGUF:IQ1_M # Run inference directly in the terminal: llama-cli -hf moxin-org/Kimi-K2-Thinking-Moxin-GGUF:IQ1_M
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf moxin-org/Kimi-K2-Thinking-Moxin-GGUF:IQ1_M # Run inference directly in the terminal: ./llama-cli -hf moxin-org/Kimi-K2-Thinking-Moxin-GGUF:IQ1_M
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf moxin-org/Kimi-K2-Thinking-Moxin-GGUF:IQ1_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf moxin-org/Kimi-K2-Thinking-Moxin-GGUF:IQ1_M
Use Docker
docker model run hf.co/moxin-org/Kimi-K2-Thinking-Moxin-GGUF:IQ1_M
- LM Studio
- Jan
- vLLM
How to use moxin-org/Kimi-K2-Thinking-Moxin-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "moxin-org/Kimi-K2-Thinking-Moxin-GGUF" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "moxin-org/Kimi-K2-Thinking-Moxin-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/moxin-org/Kimi-K2-Thinking-Moxin-GGUF:IQ1_M
- SGLang
How to use moxin-org/Kimi-K2-Thinking-Moxin-GGUF 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 "moxin-org/Kimi-K2-Thinking-Moxin-GGUF" \ --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": "moxin-org/Kimi-K2-Thinking-Moxin-GGUF", "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 "moxin-org/Kimi-K2-Thinking-Moxin-GGUF" \ --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": "moxin-org/Kimi-K2-Thinking-Moxin-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use moxin-org/Kimi-K2-Thinking-Moxin-GGUF with Ollama:
ollama run hf.co/moxin-org/Kimi-K2-Thinking-Moxin-GGUF:IQ1_M
- Unsloth Studio new
How to use moxin-org/Kimi-K2-Thinking-Moxin-GGUF with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for moxin-org/Kimi-K2-Thinking-Moxin-GGUF to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for moxin-org/Kimi-K2-Thinking-Moxin-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for moxin-org/Kimi-K2-Thinking-Moxin-GGUF to start chatting
- Pi new
How to use moxin-org/Kimi-K2-Thinking-Moxin-GGUF with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf moxin-org/Kimi-K2-Thinking-Moxin-GGUF:IQ1_M
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "moxin-org/Kimi-K2-Thinking-Moxin-GGUF:IQ1_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use moxin-org/Kimi-K2-Thinking-Moxin-GGUF with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf moxin-org/Kimi-K2-Thinking-Moxin-GGUF:IQ1_M
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default moxin-org/Kimi-K2-Thinking-Moxin-GGUF:IQ1_M
Run Hermes
hermes
- Docker Model Runner
How to use moxin-org/Kimi-K2-Thinking-Moxin-GGUF with Docker Model Runner:
docker model run hf.co/moxin-org/Kimi-K2-Thinking-Moxin-GGUF:IQ1_M
- Lemonade
How to use moxin-org/Kimi-K2-Thinking-Moxin-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull moxin-org/Kimi-K2-Thinking-Moxin-GGUF:IQ1_M
Run and chat with the model
lemonade run user.Kimi-K2-Thinking-Moxin-GGUF-IQ1_M
List all available models
lemonade list
Run and chat with the model
lemonade run user.Kimi-K2-Thinking-Moxin-GGUF-List all available models
lemonade listMoxin x llama.cpp Customized Quant for Kimi-K2-Thinking
We sincerely thank the open-source community developers and contributors unsloth and ubergarm for providing BF16 and iMatrix.
IQ1_M is made with tensor-type recipes , and serves only as an experimental configuration for extreme compression.
Q2_K_XL is a specialized version with all expert at 2-bit and all other tensors at 8-bit designed for personalized deployment and experiments.
Q8_0-Q4_0 [Q4_X] is the almost "full quality" version with the hack fix of Q4_0 provided by jukofyork. Final estimate: PPL = 2.0813 +/- 0.00903
Q3_K_XL is derived from the Q4_X variant, with all ffn_gate and ffn_up experts quantized to 3-bits. [recommended if you can't fit in the Q4_X version].
- IQ1_M : 226.86 GiB (1.90 BPW)
- Q2_K_XL : 322.13 GiB (2.70 BPW)
- Q3_K_XL : 459.94 GiB (3.85 BPW)
- Q8_0-Q4_0 [Q4_X] : 543.62 GiB (4.55 BPW)
For ultra-large MoE models like Kimi, the component that dominates VRAM/RAM usage is the expert block itself.
Therefore, our quantization focuses primarily on this critical part, without applying additional precision-mixing on attn or shexp.
👈 Download Guide
huggingface-cli download moxin-org/Kimi-K2-Thinking-Moxin-GGUF --include "*Q3_K_XL*" --local-dir ./Kimi-K2-Moxin
# !pip install huggingface_hub hf_transfer
import os
# os.environ["HF_HUB_ENABLE_HF_TRANSFER"] = "1"
from huggingface_hub import snapshot_download
snapshot_download(
repo_id = "moxin-org/Kimi-K2-Thinking-Moxin-GGUF",
local_dir = "Kimi-K2-Thinking-Moxin-GGUF",
allow_patterns = ["*Q8_0-Q4_0*"], # Q3_K_XL, Q2_K_XL, IQ1_M
)
Download Available for huggingface_hub, huggingface-cli, snapshot_download, xet.
Usage
Example of runing gguf with local build of llama.cpp. (llama-cli/llama-server)
👈 Build llama.cpp locally
git clone https://github.com/ggml-org/llama.cpp.git
cd llama.cpp
# -DLLAMA_CURL=OFF if error
cmake -B build -DGGML_CUDA=ON -DBUILD_SHARED_LIBS=OFF
cmake --build build --config Release -j --clean-first
build/bin/llama-cli -m Kimi-K2-Thinking-Moxin-GGUF/K2-Thinking-IQ1_M/Kimi-K2-Thinking-Moxin-IQ1_M-00001-of-00007.gguf \
-ngl 99 \
--temp 1.0 \
--min-p 0.01 \
--ctx-size 16384 \ # 4096, 8192
Citation
If this work is helpful, please kindly helpe cite as:
@article{chen2025collaborative,
title={Collaborative Compression for Large-Scale MoE Deployment on Edge},
author={Chen, Yixiao and Xie, Yanyue and Yang, Ruining and Jiang, Wei and Wang, Wei and He, Yong and Chen, Yue and Zhao, Pu and Wang, Yanzhi},
journal={arXiv preprint arXiv:2509.25689},
year={2025}
}
Acknowledgements
This repository builds upon the outstanding work of the following open-source authors and projects:
- moonshotai/Kimi-K2-Thinking
- ggml-org/llama.cpp, unsloth.ai, bartowski.
- ikawrakow/ik_llama.cpp, ikawrakow, ubergarm.
We sincerely thank them for their excellent contributions to the open-source community.
- Downloads last month
- 18
1-bit
2-bit
3-bit
4-bit
Model tree for moxin-org/Kimi-K2-Thinking-Moxin-GGUF
Base model
moonshotai/Kimi-K2-Thinking
Pull the model
# Download Lemonade from https://lemonade-server.ai/lemonade pull moxin-org/Kimi-K2-Thinking-Moxin-GGUF: