Instructions to use openbmb/MiniCPM5-1B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use openbmb/MiniCPM5-1B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="openbmb/MiniCPM5-1B") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForMultimodalLM tokenizer = AutoTokenizer.from_pretrained("openbmb/MiniCPM5-1B") model = AutoModelForMultimodalLM.from_pretrained("openbmb/MiniCPM5-1B") 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=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use openbmb/MiniCPM5-1B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "openbmb/MiniCPM5-1B" # 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-1B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/openbmb/MiniCPM5-1B
- SGLang
How to use openbmb/MiniCPM5-1B 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-1B" \ --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-1B", "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-1B" \ --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-1B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use openbmb/MiniCPM5-1B with Docker Model Runner:
docker model run hf.co/openbmb/MiniCPM5-1B
BFCLv4 eval的LFM跑分好像不太对
Thanks for your feedback! We're aware of the issue and our team is actively investigating the parsing logic in the BFCLv4 evaluation. We also appreciate the PR link you shared — we'll take a closer look. Will keep this thread updated once we have more findings. Thanks for your attention! 🙏
感谢反馈!我们正在排查 BFCLv4 评测中的解析逻辑问题,非常感谢你提供的 PR 链接,我们会一并参考。有进展会及时同步,非常感谢! 🙏
Hi, thanks for your patience! 🙏
Our reported score for LFM2.5-1.2B-Thinking was obtained using BFCLv4's native Function Calling (FC) evaluation flow. At the time, a dedicated LFM2 handler was not yet available, so the model was evaluated through the standard OpenAI-compatible chat-completions interface using the generic handler rather than a model-specific one.
We've now reproduced the results using the dedicated handler, and they align closely with the numbers reported in the PR (Overall: 32.72% vs. 32.02% in the PR). We'll update the reported score accordingly.
Thanks again for the discussion and for contributing the handler! 🙏
感谢耐心等待!🙏
我们此前报告的 LFM2.5-1.2B-Thinking 分数,是使用 BFCLv4 原生 Function Calling(FC)评测流程得到的。当时尚未提供 LFM2 专用 handler,因此模型是通过标准 OpenAI 兼容 chat-completions 接口接入,并使用通用 handler 完成评测的。
我们现已使用该专用 handler 复现评测结果,结果与 PR 中报告的数据高度一致(Overall:32.72%,PR 中为 32.02%)。我们会据此更新已公布的分数。
再次感谢你的讨论以及对 handler 的贡献!🙏
Thanks for replying, later this month I will also have a PR for GPT-OSS to resolve issue: https://github.com/ShishirPatil/gorilla/issues/1146 Hope this would be helpful for your team too. By the way, I love your team's 1.58bit quant model