Text Generation
Transformers
Safetensors
English
Chinese
minicpm5_moe
minicpm
minicpm5
Mixture of Experts
long-context
tool-calling
on-device
edge-ai
conversational
Run this model with HF Jobs
Run openbmb/MiniCPM5-15B-A2.5B-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 and TRL to fine-tune https://huggingface.co/openbmb/MiniCPM5-15B-A2.5B-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/openbmb/MiniCPM5-15B-A2.5B-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/openbmb/MiniCPM5-15B-A2.5B-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.
Quantize for lower memory use
Use HF Jobs to create a 4-bit version of https://huggingface.co/openbmb/MiniCPM5-15B-A2.5B-MLX. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.
Instructions to use openbmb/MiniCPM5-15B-A2.5B-MLX with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use openbmb/MiniCPM5-15B-A2.5B-MLX with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="openbmb/MiniCPM5-15B-A2.5B-MLX") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("openbmb/MiniCPM5-15B-A2.5B-MLX") model = AutoModelForCausalLM.from_pretrained("openbmb/MiniCPM5-15B-A2.5B-MLX", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use openbmb/MiniCPM5-15B-A2.5B-MLX with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "openbmb/MiniCPM5-15B-A2.5B-MLX" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "openbmb/MiniCPM5-15B-A2.5B-MLX", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/openbmb/MiniCPM5-15B-A2.5B-MLX
- SGLang
How to use openbmb/MiniCPM5-15B-A2.5B-MLX with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "openbmb/MiniCPM5-15B-A2.5B-MLX" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "openbmb/MiniCPM5-15B-A2.5B-MLX", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "openbmb/MiniCPM5-15B-A2.5B-MLX" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "openbmb/MiniCPM5-15B-A2.5B-MLX", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use openbmb/MiniCPM5-15B-A2.5B-MLX with Docker Model Runner:
docker model run hf.co/openbmb/MiniCPM5-15B-A2.5B-MLX
update README
Browse files1{"version": 3, "repo_id": "openbmb/MiniCPM5-15B-A2.5B-MLX", "files": {"model.safetensors.index.json|1796266490.888822|68603": {"hash": "79f750fcb89c54086a2a3128072fc9ef0cf6d76056c487d2651303f94a7f3cca", "size": 68603, "status": "c"}, "tokenizer_config.json|1796266491.0688267|94391": {"hash": "daab558a87488612988d1700dc29b9989cc05b061e67d580cebb48cd81839112", "size": 94391, "status": "c"}, "tokenizer.json|1796266491.4328358|9894271": {"hash": "3e065a558a034185fe299917b398685c1facd0169a9eea1e629eb30c171fed81", "size": 9894271, "status": "c"}, "model.safetensors|1796266606.2837665|9220689496": {"hash": "ca6168b04de886fe174293a7d00181f6931d54683daace054a024837663943d1", "size": 9220689496, "status": "c"}, "chat_template.jinja|1796266490.7128177|5862": {"hash": "f921403fdf57b3c8ee5bfef4c8ede0260a80c89e1e4f51b2bf13f5fbdf707a55", "size": 5862, "status": "c"}, "generation_config.json|1796266490.724818|213": {"hash": "9ac4f32e5f32358697a9f438a3ea89ef80e6ba786c72c49e932f9f21c122fdb1", "size": 213, "status": "c"}, "README.md|1796266490.6288154|3674": {"hash": "53557e2b612ee55446dbbd93a73e61717b17a37bf478278c884cf934e31f2d11", "size": 3674, "status": "c"}, "special_tokens_map.json|1796266490.8368208|551": {"hash": "82d96d7a9e6ced037f12394b7ea6a5b02e6ca87e0d11edaa8d60d9be857ce7db", "size": 551, "status": "c"}, "config.json|1796266490.644816|975": {"hash": "6e0156283067ab2bfa9da8c5d1ed871535f6626d705f9a59330f15cd5d1fd3c2", "size": 975, "status": "c"}, ".gitattributes|1796266490.5008123|50": {"hash": "ee05350c7fda0af4da116020dd7b976d731de3beed4f5e717d5bcc95ead24550", "size": 50, "status": "c"}, "README-cn.md|1796266490.5768142|3384": {"hash": "ac07d4ec8f864f8b66f4ddaeb959be6ac06bf6da95e79d6f6054bd8678b28cf8", "size": 3384, "status": "c"}}}.ms_upload_cacheDeleted-1