Text Generation
MLX
Safetensors
English
Chinese
llama
minicpm
minicpm5
long-context
tool-calling
on-device
edge-ai
conversational
4-bit precision
Instructions to use dalatexcoder/MiniCPM5-2B-5BitL-MLX with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use dalatexcoder/MiniCPM5-2B-5BitL-MLX 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("dalatexcoder/MiniCPM5-2B-5BitL-MLX") 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 dalatexcoder/MiniCPM5-2B-5BitL-MLX with Pi:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "dalatexcoder/MiniCPM5-2B-5BitL-MLX"
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "mlx-lm": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "dalatexcoder/MiniCPM5-2B-5BitL-MLX" } ] } } }Run Pi
# Start Pi in your project directory: pi
- MLX LM
How to use dalatexcoder/MiniCPM5-2B-5BitL-MLX with MLX LM:
Generate or start a chat session
# Install MLX LM uv tool install mlx-lm # Interactive chat REPL mlx_lm.chat --model "dalatexcoder/MiniCPM5-2B-5BitL-MLX"
Run an OpenAI-compatible server
# Install MLX LM uv tool install mlx-lm # Start the server mlx_lm.server --model "dalatexcoder/MiniCPM5-2B-5BitL-MLX" # Calling the OpenAI-compatible server with curl curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "dalatexcoder/MiniCPM5-2B-5BitL-MLX", "messages": [ {"role": "user", "content": "Hello"} ] }' - Hermes Agent
How to use dalatexcoder/MiniCPM5-2B-5BitL-MLX 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 "dalatexcoder/MiniCPM5-2B-5BitL-MLX"
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 dalatexcoder/MiniCPM5-2B-5BitL-MLX
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use dalatexcoder/MiniCPM5-2B-5BitL-MLX with OpenClaw:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "dalatexcoder/MiniCPM5-2B-5BitL-MLX"
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 "dalatexcoder/MiniCPM5-2B-5BitL-MLX" \ --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"
Update README.md
Browse files
README.md
CHANGED
|
@@ -123,31 +123,31 @@ Quantized from [openbmb/MiniCPM5-2B](https://huggingface.co/openbmb/MiniCPM5-2B)
|
|
| 123 |
3. model.layers.0.self_attn.v_proj sens=5.739e-03 params=524,288
|
| 124 |
4. model.layers.3.self_attn.k_proj sens=5.012e-03 params=524,288
|
| 125 |
5. model.layers.2.self_attn.v_proj sens=4.739e-03 params=524,288
|
| 126 |
-
6. model.layers.0.mlp.up_proj sens=4.594e-03 params=12,582,912
|
| 127 |
-
7. model.layers.2.self_attn.q_proj sens=4.409e-03 params=4,194,304
|
| 128 |
-
8. model.layers.2.mlp.down_proj sens=4.399e-03 params=12,582,912
|
| 129 |
-
9. model.layers.6.mlp.up_proj sens=4.348e-03 params=12,582,912
|
| 130 |
-
10. model.layers.1.self_attn.v_proj sens=4.302e-03 params=524,288
|
| 131 |
-
11. model.layers.2.self_attn.o_proj sens=4.259e-03 params=4,194,304
|
| 132 |
-
12. model.layers.4.self_attn.q_proj sens=4.223e-03 params=4,194,304
|
| 133 |
-
13. model.layers.1.mlp.gate_proj sens=4.110e-03 params=12,582,912
|
| 134 |
-
14. model.layers.2.self_attn.k_proj sens=4.094e-03 params=524,288
|
| 135 |
-
15. model.layers.6.self_attn.q_proj sens=3.977e-03 params=4,194,304
|
| 136 |
-
16. model.layers.6.mlp.gate_proj sens=3.973e-03 params=12,582,912
|
| 137 |
-
17. model.layers.1.self_attn.o_proj sens=3.940e-03 params=4,194,304
|
| 138 |
-
18. model.layers.4.mlp.down_proj sens=3.883e-03 params=12,582,912
|
| 139 |
-
19. model.layers.5.mlp.gate_proj sens=3.870e-03 params=12,582,912
|
| 140 |
-
20. model.layers.0.self_attn.o_proj sens=3.824e-03 params=4,194,304
|
| 141 |
-
|
| 142 |
-
Top 20 most-sensitive layers at 8-bit:
|
| 143 |
-
1. model.layers.1.self_attn.v_proj sens=4.394e-03 params=524,288
|
| 144 |
-
2. model.layers.2.self_attn.v_proj sens=4.088e-03 params=524,288
|
| 145 |
-
3. model.layers.4.self_attn.k_proj sens=3.958e-03 params=524,288
|
| 146 |
4. model.layers.1.mlp.gate_proj sens=3.900e-03 params=12,582,912
|
| 147 |
5. model.layers.0.mlp.up_proj sens=3.824e-03 params=12,582,912
|
| 148 |
6. model.layers.0.mlp.down_proj sens=3.799e-03 params=12,582,912
|
| 149 |
7. model.layers.0.self_attn.k_proj sens=3.778e-03 params=524,288
|
| 150 |
-
8. model.layers.0.self_attn.o_proj sens=3.697e-03 params=4,194,304
|
| 151 |
9. model.layers.4.mlp.up_proj sens=3.644e-03 params=12,582,912
|
| 152 |
10. model.layers.0.self_attn.v_proj sens=3.592e-03 params=524,288
|
| 153 |
11. model.layers.4.mlp.gate_proj sens=3.513e-03 params=12,582,912
|
|
|
|
| 123 |
3. model.layers.0.self_attn.v_proj sens=5.739e-03 params=524,288
|
| 124 |
4. model.layers.3.self_attn.k_proj sens=5.012e-03 params=524,288
|
| 125 |
5. model.layers.2.self_attn.v_proj sens=4.739e-03 params=524,288
|
| 126 |
+
6. model.layers.0.mlp.up_proj sens=4.594e-03 params=12,582,912
|
| 127 |
+
7. model.layers.2.self_attn.q_proj sens=4.409e-03 params=4,194,304
|
| 128 |
+
8. model.layers.2.mlp.down_proj sens=4.399e-03 params=12,582,912
|
| 129 |
+
9. model.layers.6.mlp.up_proj sens=4.348e-03 params=12,582,912
|
| 130 |
+
10. model.layers.1.self_attn.v_proj sens=4.302e-03 params=524,288
|
| 131 |
+
11. model.layers.2.self_attn.o_proj sens=4.259e-03 params=4,194,304
|
| 132 |
+
12. model.layers.4.self_attn.q_proj sens=4.223e-03 params=4,194,304
|
| 133 |
+
13. model.layers.1.mlp.gate_proj sens=4.110e-03 params=12,582,912
|
| 134 |
+
14. model.layers.2.self_attn.k_proj sens=4.094e-03 params=524,288
|
| 135 |
+
15. model.layers.6.self_attn.q_proj sens=3.977e-03 params=4,194,304
|
| 136 |
+
16. model.layers.6.mlp.gate_proj sens=3.973e-03 params=12,582,912
|
| 137 |
+
17. model.layers.1.self_attn.o_proj sens=3.940e-03 params=4,194,304
|
| 138 |
+
18. model.layers.4.mlp.down_proj sens=3.883e-03 params=12,582,912
|
| 139 |
+
19. model.layers.5.mlp.gate_proj sens=3.870e-03 params=12,582,912
|
| 140 |
+
20. model.layers.0.self_attn.o_proj sens=3.824e-03 params=4,194,304
|
| 141 |
+
|
| 142 |
+
Top 20 most-sensitive layers at 8-bit:
|
| 143 |
+
1. model.layers.1.self_attn.v_proj sens=4.394e-03 params=524,288
|
| 144 |
+
2. model.layers.2.self_attn.v_proj sens=4.088e-03 params=524,288
|
| 145 |
+
3. model.layers.4.self_attn.k_proj sens=3.958e-03 params=524,288
|
| 146 |
4. model.layers.1.mlp.gate_proj sens=3.900e-03 params=12,582,912
|
| 147 |
5. model.layers.0.mlp.up_proj sens=3.824e-03 params=12,582,912
|
| 148 |
6. model.layers.0.mlp.down_proj sens=3.799e-03 params=12,582,912
|
| 149 |
7. model.layers.0.self_attn.k_proj sens=3.778e-03 params=524,288
|
| 150 |
+
8. model.layers.0.self_attn.o_proj sens=3.697e-03 params=4,194,304
|
| 151 |
9. model.layers.4.mlp.up_proj sens=3.644e-03 params=12,582,912
|
| 152 |
10. model.layers.0.self_attn.v_proj sens=3.592e-03 params=524,288
|
| 153 |
11. model.layers.4.mlp.gate_proj sens=3.513e-03 params=12,582,912
|