Text Generation
MLX
Safetensors
English
Chinese
llama
minicpm
minicpm5
long-context
tool-calling
on-device
edge-ai
conversational
4-bit precision
Run this model with HF Jobs
Run dalatexcoder/MiniCPM5-2B-5BitL-MLX on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/dalatexcoder/MiniCPM5-2B-5BitL-MLX. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/dalatexcoder/MiniCPM5-2B-5BitL-MLX on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Evaluate on a benchmark
Use HF Jobs to evaluate https://huggingface.co/dalatexcoder/MiniCPM5-2B-5BitL-MLX. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.
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:8080/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 files122 unmodified lines123124125126127128129130131132133134135136137138139140141142143144145126127128129130131132133134135136137138139140141142143144145146147148149150150151152153122 unmodified lines 3. model.layers.0.self_attn.v_proj sens=5.739e-03 params=524,288 4. model.layers.3.self_attn.k_proj sens=5.012e-03 params=524,288 5. model.layers.2.self_attn.v_proj sens=4.739e-03 params=524,288 6. model.layers.0.mlp.up_proj sens=4.594e-03 params=12,582,912 7. model.layers.2.self_attn.q_proj sens=4.409e-03 params=4,194,304 8. model.layers.2.mlp.down_proj sens=4.399e-03 params=12,582,912 9. model.layers.6.mlp.up_proj sens=4.348e-03 params=12,582,912 10. model.layers.1.self_attn.v_proj sens=4.302e-03 params=524,288 11. model.layers.2.self_attn.o_proj sens=4.259e-03 params=4,194,304 12. model.layers.4.self_attn.q_proj sens=4.223e-03 params=4,194,304 13. model.layers.1.mlp.gate_proj sens=4.110e-03 params=12,582,912 14. model.layers.2.self_attn.k_proj sens=4.094e-03 params=524,288 15. model.layers.6.self_attn.q_proj sens=3.977e-03 params=4,194,304 16. model.layers.6.mlp.gate_proj sens=3.973e-03 params=12,582,912 17. model.layers.1.self_attn.o_proj sens=3.940e-03 params=4,194,304 18. model.layers.4.mlp.down_proj sens=3.883e-03 params=12,582,912 19. model.layers.5.mlp.gate_proj sens=3.870e-03 params=12,582,912 20. model.layers.0.self_attn.o_proj sens=3.824e-03 params=4,194,304 Top 20 most-sensitive layers at 8-bit: 1. model.layers.1.self_attn.v_proj sens=4.394e-03 params=524,288 2. model.layers.2.self_attn.v_proj sens=4.088e-03 params=524,288 3. model.layers.4.self_attn.k_proj sens=3.958e-03 params=524,288 6. model.layers.0.mlp.up_proj sens=4.594e-03 params=12,582,912 7. model.layers.2.self_attn.q_proj sens=4.409e-03 params=4,194,304 8. model.layers.2.mlp.down_proj sens=4.399e-03 params=12,582,912 9. model.layers.6.mlp.up_proj sens=4.348e-03 params=12,582,912 10. model.layers.1.self_attn.v_proj sens=4.302e-03 params=524,288 11. model.layers.2.self_attn.o_proj sens=4.259e-03 params=4,194,304 12. model.layers.4.self_attn.q_proj sens=4.223e-03 params=4,194,304 13. model.layers.1.mlp.gate_proj sens=4.110e-03 params=12,582,912 14. model.layers.2.self_attn.k_proj sens=4.094e-03 params=524,288 15. model.layers.6.self_attn.q_proj sens=3.977e-03 params=4,194,304 16. model.layers.6.mlp.gate_proj sens=3.973e-03 params=12,582,912 17. model.layers.1.self_attn.o_proj sens=3.940e-03 params=4,194,304 18. model.layers.4.mlp.down_proj sens=3.883e-03 params=12,582,912 19. model.layers.5.mlp.gate_proj sens=3.870e-03 params=12,582,912 20. model.layers.0.self_attn.o_proj sens=3.824e-03 params=4,194,304 Top 20 most-sensitive layers at 8-bit: 1. model.layers.1.self_attn.v_proj sens=4.394e-03 params=524,288 2. model.layers.2.self_attn.v_proj sens=4.088e-03 params=524,288 3. model.layers.4.self_attn.k_proj sens=3.958e-03 params=524,288 4. model.layers.1.mlp.gate_proj sens=3.900e-03 params=12,582,912 5. model.layers.0.mlp.up_proj sens=3.824e-03 params=12,582,912 6. model.layers.0.mlp.down_proj sens=3.799e-03 params=12,582,912 7. model.layers.0.self_attn.k_proj sens=3.778e-03 params=524,288 8. model.layers.0.self_attn.o_proj sens=3.697e-03 params=4,194,304 8. model.layers.0.self_attn.o_proj sens=3.697e-03 params=4,194,304 9. model.layers.4.mlp.up_proj sens=3.644e-03 params=12,582,912 10. model.layers.0.self_attn.v_proj sens=3.592e-03 params=524,288 11. model.layers.4.mlp.gate_proj sens=3.513e-03 params=12,582,912 README.md+21-21