Instructions to use inferencerlabs/Kimi-K2-Instruct-MLX-3.9bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use inferencerlabs/Kimi-K2-Instruct-MLX-3.9bit with MLX:
# Make sure mlx-lm is installed # pip install --upgrade mlx-lm # if on a CUDA device, also pip install mlx[cuda] # Generate text with mlx-lm from mlx_lm import load, generate model, tokenizer = load("inferencerlabs/Kimi-K2-Instruct-MLX-3.9bit") prompt = "Once upon a time in" text = generate(model, tokenizer, prompt=prompt, verbose=True) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- LM Studio
- MLX LM
How to use inferencerlabs/Kimi-K2-Instruct-MLX-3.9bit with MLX LM:
Generate or start a chat session
# Install MLX LM uv tool install mlx-lm # Generate some text mlx_lm.generate --model "inferencerlabs/Kimi-K2-Instruct-MLX-3.9bit" --prompt "Once upon a time"
NOTICE
This model has been superseded by the higher quality Kimi-K2.6-Q3.5-INF version available here
INFORMATION
See Kimi-K2 Dynamic MLX in action - https://youtu.be/-zfUvA2CDqE
q3.985bit dynamic quant typically achieves 1.243 perplexity in our testing, slotting closer to q4 perplexity (1.168) than q3 perplexity (1.900).
| Quantization | Perplexity |
|---|---|
| q2 | 41.293 |
| q3 | 1.900 |
| q3.95 | 1.243 |
| q4 | 1.168 |
| q6 | 1.128 |
| q8 | 1.128 |
Usage Notes
- Runs on a single M3 Ultra 512GB RAM using Inferencer app
- Requires expanding VRAM limit to at least ~500000 MB
- For a larger context window, 507000 is used in VRAM limit command below.
sudo sysctl iogpu.wired_limit_mb=507000
- Expect ~20 tokens/s
- Quantized with a modified version of MLX 0.26
- For more details see demonstration video or visit Kimi K2.
Disclaimer
We are not the creator, originator, or owner of any model listed. Each model is created and provided by third parties. Models may not always be accurate or contextually appropriate. You are responsible for verifying the information before making important decisions. We are not liable for any damages, losses, or issues arising from its use, including data loss or inaccuracies in AI-generated content.
Model tree for inferencerlabs/Kimi-K2-Instruct-MLX-3.9bit
Base model
moonshotai/Kimi-K2-Instruct