Text Generation
MLX
Safetensors
kimi_k25
kimi
kimi-k2
Mixture of Experts
mla
code
quantized
apple-silicon
conversational
custom_code
3-bit
Instructions to use avlp12/Kimi-K2.7-Code-Alis-MLX-Dynamic-3.6bpw with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use avlp12/Kimi-K2.7-Code-Alis-MLX-Dynamic-3.6bpw 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("avlp12/Kimi-K2.7-Code-Alis-MLX-Dynamic-3.6bpw") 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 Settings
- LM Studio
- Pi
How to use avlp12/Kimi-K2.7-Code-Alis-MLX-Dynamic-3.6bpw with Pi:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "avlp12/Kimi-K2.7-Code-Alis-MLX-Dynamic-3.6bpw"
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": "avlp12/Kimi-K2.7-Code-Alis-MLX-Dynamic-3.6bpw" } ] } } }Run Pi
# Start Pi in your project directory: pi
- MLX LM
How to use avlp12/Kimi-K2.7-Code-Alis-MLX-Dynamic-3.6bpw with MLX LM:
Generate or start a chat session
# Install MLX LM uv tool install mlx-lm # Interactive chat REPL mlx_lm.chat --model "avlp12/Kimi-K2.7-Code-Alis-MLX-Dynamic-3.6bpw"
Run an OpenAI-compatible server
# Install MLX LM uv tool install mlx-lm # Start the server mlx_lm.server --model "avlp12/Kimi-K2.7-Code-Alis-MLX-Dynamic-3.6bpw" # Calling the OpenAI-compatible server with curl curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "avlp12/Kimi-K2.7-Code-Alis-MLX-Dynamic-3.6bpw", "messages": [ {"role": "user", "content": "Hello"} ] }' - Hermes Agent
How to use avlp12/Kimi-K2.7-Code-Alis-MLX-Dynamic-3.6bpw 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 "avlp12/Kimi-K2.7-Code-Alis-MLX-Dynamic-3.6bpw"
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 avlp12/Kimi-K2.7-Code-Alis-MLX-Dynamic-3.6bpw
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use avlp12/Kimi-K2.7-Code-Alis-MLX-Dynamic-3.6bpw with OpenClaw:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "avlp12/Kimi-K2.7-Code-Alis-MLX-Dynamic-3.6bpw"
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:8080/v1 \ --custom-model-id "avlp12/Kimi-K2.7-Code-Alis-MLX-Dynamic-3.6bpw" \ --custom-provider-id mlx-lm \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
File size: 3,399 Bytes
e9009a3 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 | <svg viewBox="0 0 1100 660" xmlns="http://www.w3.org/2000/svg" font-family="-apple-system, Helvetica, Arial, sans-serif">
<rect width="1100" height="660" fill="#ffffff"/>
<text x="50" y="58" font-size="34" font-weight="700" fill="#0f172a">Sensitivity-graded 3.6-bit recipe</text>
<text x="50" y="92" font-size="20" fill="#475569">3.62 bits/weight · 465 GB · routed experts ≈ 99% of params set the size</text>
<!-- bit scale legend -->
<g font-size="16" fill="#334155">
<rect x="700" y="40" width="22" height="22" rx="4" fill="#f59e0b"/><text x="728" y="57">3-bit</text>
<rect x="790" y="40" width="22" height="22" rx="4" fill="#f97316"/><text x="818" y="57">4-bit</text>
<rect x="880" y="40" width="22" height="22" rx="4" fill="#3b82f6"/><text x="908" y="57">6-bit</text>
<rect x="970" y="40" width="22" height="22" rx="4" fill="#10b981"/><text x="998" y="57">bf16</text>
</g>
<!-- rows: x bar origin 360, scale 70px per bit -->
<g font-size="20">
<!-- Experts gate/up : 3-bit -->
<text x="50" y="168" font-weight="600" fill="#0f172a">Experts gate / up</text>
<text x="50" y="192" font-size="15" fill="#64748b">≈ 66% of all params</text>
<rect x="360" y="148" width="210" height="40" rx="6" fill="#f59e0b"/>
<text x="585" y="175" font-size="18" fill="#334155">3-bit · g64</text>
<!-- Experts down_proj : 3-4-bit -->
<text x="50" y="246" font-weight="600" fill="#0f172a">Experts down_proj</text>
<text x="50" y="270" font-size="15" fill="#64748b">≈ 33% · the residual-writing matrix</text>
<rect x="360" y="226" width="210" height="40" rx="6" fill="#f59e0b"/>
<rect x="360" y="226" width="280" height="40" rx="6" fill="#f97316" opacity="0.0"/>
<rect x="570" y="226" width="70" height="40" rx="0" fill="#f97316"/>
<text x="655" y="253" font-size="18" fill="#334155">3-bit, upgraded to 4-bit on 16 / 60 layers</text>
<!-- Attention MLA : 6-bit -->
<text x="50" y="324" font-weight="600" fill="#0f172a">Attention (MLA)</text>
<text x="50" y="348" font-size="15" fill="#64748b">q_a / q_b / kv_a / kv_b / o</text>
<rect x="360" y="304" width="420" height="40" rx="6" fill="#3b82f6"/>
<text x="795" y="331" font-size="18" fill="#334155">6-bit</text>
<!-- Shared + dense : 6-bit -->
<text x="50" y="402" font-weight="600" fill="#0f172a">Shared expert · dense MLP</text>
<rect x="360" y="382" width="420" height="40" rx="6" fill="#3b82f6"/>
<text x="795" y="409" font-size="18" fill="#334155">6-bit</text>
<!-- Embed/head : 6-bit -->
<text x="50" y="480" font-weight="600" fill="#0f172a">Token embedding · LM head</text>
<rect x="360" y="460" width="420" height="40" rx="6" fill="#3b82f6"/>
<text x="795" y="487" font-size="18" fill="#334155">6-bit</text>
<!-- Router : bf16 -->
<text x="50" y="558" font-weight="600" fill="#0f172a">MoE router gate</text>
<text x="50" y="582" font-size="15" fill="#64748b">drives discrete top-8 routing</text>
<rect x="360" y="538" width="430" height="40" rx="6" fill="#10b981"/>
<text x="805" y="565" font-size="18" fill="#334155">bf16 — full precision</text>
</g>
<line x1="50" y1="612" x2="1050" y2="612" stroke="#e2e8f0" stroke-width="1.5"/>
<text x="50" y="640" font-size="16" fill="#64748b">Cheap bits on the robust expert bulk; full precision on the discrete-control path.</text>
</svg>
|