Instructions to use aidiffuser/Kimi-K2.6-MLX-4bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use aidiffuser/Kimi-K2.6-MLX-4bit with MLX:
# Make sure mlx-lm is installed # pip install --upgrade mlx-lm # Generate text with mlx-lm from mlx_lm import load, generate model, tokenizer = load("aidiffuser/Kimi-K2.6-MLX-4bit") prompt = "Write a story about Einstein" messages = [{"role": "user", "content": prompt}] prompt = tokenizer.apply_chat_template( messages, add_generation_prompt=True ) text = generate(model, tokenizer, prompt=prompt, verbose=True) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- LM Studio
- Pi new
How to use aidiffuser/Kimi-K2.6-MLX-4bit with Pi:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "aidiffuser/Kimi-K2.6-MLX-4bit"
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "mlx-lm": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "aidiffuser/Kimi-K2.6-MLX-4bit" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use aidiffuser/Kimi-K2.6-MLX-4bit with Hermes Agent:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "aidiffuser/Kimi-K2.6-MLX-4bit"
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 aidiffuser/Kimi-K2.6-MLX-4bit
Run Hermes
hermes
- MLX LM
How to use aidiffuser/Kimi-K2.6-MLX-4bit with MLX LM:
Generate or start a chat session
# Install MLX LM uv tool install mlx-lm # Interactive chat REPL mlx_lm.chat --model "aidiffuser/Kimi-K2.6-MLX-4bit"
Run an OpenAI-compatible server
# Install MLX LM uv tool install mlx-lm # Start the server mlx_lm.server --model "aidiffuser/Kimi-K2.6-MLX-4bit" # Calling the OpenAI-compatible server with curl curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "aidiffuser/Kimi-K2.6-MLX-4bit", "messages": [ {"role": "user", "content": "Hello"} ] }'
Kimi-K2.6-mlx
MLX-compatible weights for moonshotai/Kimi-K2.6, converted using mlx_lm.convert.
Model Details
- Base model: moonshotai/Kimi-K2.6
- Architecture: Mixture-of-Experts (MoE), Kimi/DeepSeek family
- Layers: 61
- Hidden size: 7168
- KV heads: 64
- Quantization: INT4 compressed-tensors (pack-quantized)
- Model size on disk: ~612 GB (182 safetensors shards)
- Context length: 262,144 tokens
- Capabilities: text generation, thinking/reasoning, tool use (text-only; vision not supported — use mlx-vlm for VLM conversion)
Conversion
Converted from the original moonshotai/Kimi-K2.6 using:
python -m mlx_lm.convert \
--hf-path moonshotai/Kimi-K2.6 \
--mlx-path ./Kimi-K2.6-mlx \
--trust-remote-code
No additional quantization was applied — the model ships with compressed-tensors INT4 from the source.
Usage
With mlx-lm
pip install mlx-lm
python -m mlx_lm.generate \
--model aidiffuser/Kimi-K2.6-mlx \
--prompt "Hello, who are you?" \
--trust-remote-code
With exo (distributed inference)
This model runs on exo with JACCL/RDMA tensor parallelism across multiple Apple Silicon nodes. Tested on a 2-node Mac Studio M3 Ultra cluster (512 GB + 512 GB unified memory) at ~21 tok/s.
Recommended sampling parameters
temperature: 1.0
top_p: 0.95
min_p: 0.01
Hardware Requirements
This is a large MoE model. You will need significant unified memory to run it:
- Distributed: Two Apple Silicon machines with 512+ GB each, connected via Thunderbolt
License
This model inherits the Kimi K2 Community License from the base model.
- Downloads last month
- 2,791
4-bit
Model tree for aidiffuser/Kimi-K2.6-MLX-4bit
Base model
moonshotai/Kimi-K2.6