Instructions to use mlx-community/Kimi-Linear-48B-A3B-Instruct-8bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use mlx-community/Kimi-Linear-48B-A3B-Instruct-8bit 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("mlx-community/Kimi-Linear-48B-A3B-Instruct-8bit") 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 mlx-community/Kimi-Linear-48B-A3B-Instruct-8bit with Pi:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "mlx-community/Kimi-Linear-48B-A3B-Instruct-8bit"
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": "mlx-community/Kimi-Linear-48B-A3B-Instruct-8bit" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use mlx-community/Kimi-Linear-48B-A3B-Instruct-8bit 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 "mlx-community/Kimi-Linear-48B-A3B-Instruct-8bit"
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 mlx-community/Kimi-Linear-48B-A3B-Instruct-8bit
Run Hermes
hermes
- OpenClaw new
How to use mlx-community/Kimi-Linear-48B-A3B-Instruct-8bit with OpenClaw:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "mlx-community/Kimi-Linear-48B-A3B-Instruct-8bit"
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 "mlx-community/Kimi-Linear-48B-A3B-Instruct-8bit" \ --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"
- MLX LM
How to use mlx-community/Kimi-Linear-48B-A3B-Instruct-8bit with MLX LM:
Generate or start a chat session
# Install MLX LM uv tool install mlx-lm # Interactive chat REPL mlx_lm.chat --model "mlx-community/Kimi-Linear-48B-A3B-Instruct-8bit"
Run an OpenAI-compatible server
# Install MLX LM uv tool install mlx-lm # Start the server mlx_lm.server --model "mlx-community/Kimi-Linear-48B-A3B-Instruct-8bit" # Calling the OpenAI-compatible server with curl curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "mlx-community/Kimi-Linear-48B-A3B-Instruct-8bit", "messages": [ {"role": "user", "content": "Hello"} ] }'
Upload 2 files
Browse files- tokenizer_config.json +48 -8
tokenizer_config.json
CHANGED
|
@@ -72,6 +72,46 @@
|
|
| 72 |
"single_word": false,
|
| 73 |
"special": true
|
| 74 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 75 |
"163601": {
|
| 76 |
"content": "<|im_middle|>",
|
| 77 |
"lstrip": false,
|
|
@@ -107,12 +147,6 @@
|
|
| 107 |
"<|im_system|>",
|
| 108 |
"<|im_middle|>"
|
| 109 |
],
|
| 110 |
-
"auto_map": {
|
| 111 |
-
"AutoTokenizer": [
|
| 112 |
-
"tokenization_kimi.TikTokenTokenizer",
|
| 113 |
-
null
|
| 114 |
-
]
|
| 115 |
-
},
|
| 116 |
"bos_token": "[BOS]",
|
| 117 |
"clean_up_tokenization_spaces": false,
|
| 118 |
"eos_token": "[EOS]",
|
|
@@ -120,5 +154,11 @@
|
|
| 120 |
"model_max_length": 1000000000000000019884624838656,
|
| 121 |
"pad_token": "[PAD]",
|
| 122 |
"tokenizer_class": "TikTokenTokenizer",
|
| 123 |
-
"unk_token": "[UNK]"
|
| 124 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 72 |
"single_word": false,
|
| 73 |
"special": true
|
| 74 |
},
|
| 75 |
+
"163595": {
|
| 76 |
+
"content": "<|tool_calls_section_begin|>",
|
| 77 |
+
"lstrip": false,
|
| 78 |
+
"normalized": false,
|
| 79 |
+
"rstrip": false,
|
| 80 |
+
"single_word": false,
|
| 81 |
+
"special": false
|
| 82 |
+
},
|
| 83 |
+
"163596": {
|
| 84 |
+
"content": "<|tool_calls_section_end|>",
|
| 85 |
+
"lstrip": false,
|
| 86 |
+
"normalized": false,
|
| 87 |
+
"rstrip": false,
|
| 88 |
+
"single_word": false,
|
| 89 |
+
"special": false
|
| 90 |
+
},
|
| 91 |
+
"163597": {
|
| 92 |
+
"content": "<|tool_call_begin|>",
|
| 93 |
+
"lstrip": false,
|
| 94 |
+
"normalized": false,
|
| 95 |
+
"rstrip": false,
|
| 96 |
+
"single_word": false,
|
| 97 |
+
"special": false
|
| 98 |
+
},
|
| 99 |
+
"163598": {
|
| 100 |
+
"content": "<|tool_call_argument_begin|>",
|
| 101 |
+
"lstrip": false,
|
| 102 |
+
"normalized": false,
|
| 103 |
+
"rstrip": false,
|
| 104 |
+
"single_word": false,
|
| 105 |
+
"special": false
|
| 106 |
+
},
|
| 107 |
+
"163599": {
|
| 108 |
+
"content": "<|tool_call_end|>",
|
| 109 |
+
"lstrip": false,
|
| 110 |
+
"normalized": false,
|
| 111 |
+
"rstrip": false,
|
| 112 |
+
"single_word": false,
|
| 113 |
+
"special": false
|
| 114 |
+
},
|
| 115 |
"163601": {
|
| 116 |
"content": "<|im_middle|>",
|
| 117 |
"lstrip": false,
|
|
|
|
| 147 |
"<|im_system|>",
|
| 148 |
"<|im_middle|>"
|
| 149 |
],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 150 |
"bos_token": "[BOS]",
|
| 151 |
"clean_up_tokenization_spaces": false,
|
| 152 |
"eos_token": "[EOS]",
|
|
|
|
| 154 |
"model_max_length": 1000000000000000019884624838656,
|
| 155 |
"pad_token": "[PAD]",
|
| 156 |
"tokenizer_class": "TikTokenTokenizer",
|
| 157 |
+
"unk_token": "[UNK]",
|
| 158 |
+
"auto_map": {
|
| 159 |
+
"AutoTokenizer": [
|
| 160 |
+
"tokenization_kimi.TikTokenTokenizer",
|
| 161 |
+
null
|
| 162 |
+
]
|
| 163 |
+
}
|
| 164 |
+
}
|