Instructions to use ewinregirgojr/MiniCPM5-1B-Agentic-Tooluse-Merged-FP16 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ewinregirgojr/MiniCPM5-1B-Agentic-Tooluse-Merged-FP16 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="ewinregirgojr/MiniCPM5-1B-Agentic-Tooluse-Merged-FP16") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("ewinregirgojr/MiniCPM5-1B-Agentic-Tooluse-Merged-FP16") model = AutoModelForCausalLM.from_pretrained("ewinregirgojr/MiniCPM5-1B-Agentic-Tooluse-Merged-FP16") 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]:])) - PEFT
How to use ewinregirgojr/MiniCPM5-1B-Agentic-Tooluse-Merged-FP16 with PEFT:
Task type is invalid.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use ewinregirgojr/MiniCPM5-1B-Agentic-Tooluse-Merged-FP16 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ewinregirgojr/MiniCPM5-1B-Agentic-Tooluse-Merged-FP16" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ewinregirgojr/MiniCPM5-1B-Agentic-Tooluse-Merged-FP16", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/ewinregirgojr/MiniCPM5-1B-Agentic-Tooluse-Merged-FP16
- SGLang
How to use ewinregirgojr/MiniCPM5-1B-Agentic-Tooluse-Merged-FP16 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 "ewinregirgojr/MiniCPM5-1B-Agentic-Tooluse-Merged-FP16" \ --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": "ewinregirgojr/MiniCPM5-1B-Agentic-Tooluse-Merged-FP16", "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 "ewinregirgojr/MiniCPM5-1B-Agentic-Tooluse-Merged-FP16" \ --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": "ewinregirgojr/MiniCPM5-1B-Agentic-Tooluse-Merged-FP16", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Unsloth Studio
How to use ewinregirgojr/MiniCPM5-1B-Agentic-Tooluse-Merged-FP16 with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for ewinregirgojr/MiniCPM5-1B-Agentic-Tooluse-Merged-FP16 to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for ewinregirgojr/MiniCPM5-1B-Agentic-Tooluse-Merged-FP16 to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for ewinregirgojr/MiniCPM5-1B-Agentic-Tooluse-Merged-FP16 to start chatting
Load model with FastModel
pip install unsloth from unsloth import FastModel model, tokenizer = FastModel.from_pretrained( model_name="ewinregirgojr/MiniCPM5-1B-Agentic-Tooluse-Merged-FP16", max_seq_length=2048, ) - Docker Model Runner
How to use ewinregirgojr/MiniCPM5-1B-Agentic-Tooluse-Merged-FP16 with Docker Model Runner:
docker model run hf.co/ewinregirgojr/MiniCPM5-1B-Agentic-Tooluse-Merged-FP16
- MiniCPM5-1B Agentic Tooluse Merged FP16
- Latest Status: July 2026 Nemotron Repair
- Model Family
- Quick Answer
- Model Details
- Tool Calling Format
- Transformers Example
- vLLM
- Evaluation
- Training Data and Caveat
- Limitations
- Safety
- Search Keywords
- July 2026 Nemotron SFT+DPO Repair Update
- Current Files vs Previous Versions
- Current Status
- Known Limitations
- Latest Status: July 2026 Nemotron Repair
MiniCPM5-1B Agentic Tooluse Merged FP16
Latest Status: July 2026 Nemotron Repair
This is the current best merged fp16 release for the MiniCPM5-1B Agentic Tooluse family. It was repaired with a short Nemotron SFT continuation followed by DPO preference optimization, starting from the previously trained DPO adapter.
External Team-ACE/ToolACE evaluation, 300 cases:
| Metric | Base MiniCPM5-1B | Merged fp16 | Delta |
|---|---|---|---|
| parseable_rate | 0.0133 | 0.9933 | +0.9800 |
| valid_name_rate | 0.0133 | 0.9700 | +0.9567 |
| expected_name_rate | 0.0133 | 0.9267 | +0.9133 |
| args_exact_rate | 0.1500 | 0.6533 | +0.5033 |
| arg_key_overlap | 0.0033 | 0.7517 | +0.7484 |
| no_schema_copy_rate | 1.0000 | 1.0000 | +0.0000 |
| no_repetition_rate | 0.9967 | 1.0000 | +0.0033 |
| stopped_cleanly_rate | 0.0000 | 0.1500 | +0.1500 |
Use this adapter for first-call XML tool selection. In production, stop generation immediately after the first complete </function> call.
Standalone merged fp16 Hugging Face model built from openbmb/MiniCPM5-1B plus the MiniCPM5-1B-Agentic-Tooluse-QLoRA-v2 adapter.
Use this repository when you want a complete Transformers/vLLM-loadable model instead of loading a separate PEFT adapter.
Model Family
| Use case | Repository |
|---|---|
| Standalone fp16 Hugging Face model for Transformers or vLLM | This repo: ewinregirgojr/MiniCPM5-1B-Agentic-Tooluse-Merged-FP16 |
| Adapter-only PEFT/LoRA loading | ewinregirgojr/MiniCPM5-1B-Agentic-Tooluse-QLoRA-v2 |
| Quantized GGUF files for llama.cpp-compatible runtimes | ewinregirgojr/MiniCPM5-1B-Agentic-Tooluse-GGUF |
Quick Answer
This is the current merged fp16 release of a MiniCPM5-1B tool-calling model after the July 2026 Nemotron SFT+DPO repair. It is optimized for first-call function selection in MiniCPM5 XML format and should be used with a runtime that stops generation after the first completed function call.
Model Details
- Base model:
openbmb/MiniCPM5-1B - Adapter source:
ewinregirgojr/MiniCPM5-1B-Agentic-Tooluse-QLoRA-v2 - Release type: merged fp16 model
- File format: Hugging Face
safetensors - Primary task: tool calling, function calling, XML function-call generation
- Recommended runtime behavior: stop after first completed
</function>
Tool Calling Format
MiniCPM5 uses XML-style function calls:
<function name="tool_name"><param name="param_name">value</param></function>
Use the tokenizer chat template and pass tools through the template when possible. Decode with skip_special_tokens=False for XML parsing and evaluation.
Transformers Example
import torch
from transformers import AutoTokenizer, AutoModelForCausalLM
model_id = "ewinregirgojr/MiniCPM5-1B-Agentic-Tooluse-Merged-FP16"
tokenizer = AutoTokenizer.from_pretrained("openbmb/MiniCPM5-1B", trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(
model_id,
dtype=torch.float16,
device_map="auto",
trust_remote_code=True,
)
model.eval()
vLLM
Use this repo as the model path:
vllm serve ewinregirgojr/MiniCPM5-1B-Agentic-Tooluse-Merged-FP16 --trust-remote-code
MiniCPM-family support depends on the installed vLLM version and parser support available in that build.
Evaluation
External ToolACE-Derived Sanity Eval
External sanity eval from Team-ACE/ToolACE, not used in training. This is not the official ToolACE leaderboard evaluator.
n=300, greedy decoding, runtime stops after first completed function call.
| Metric | Base MiniCPM5-1B | Fine-tuned merged model | Delta |
|---|---|---|---|
| parseable_rate | 0.3567 | 0.9967 | +0.6400 |
| valid_name_rate | 0.3467 | 0.9400 | +0.5933 |
| expected_name_rate | 0.3467 | 0.8400 | +0.4933 |
| no_schema_copy_rate | 0.3567 | 0.9967 | +0.6400 |
| no_repetition_rate | 1.0000 | 1.0000 | +0.0000 |
Held-Out Source-Mix Eval
Held-out split from the same xLAM/Glaive source mixture used for training. This is not an external benchmark.
| Metric | Score |
|---|---|
| parseable_rate | 0.7800 |
| valid_name_rate | 0.7733 |
| expected_name_rate | 0.7633 |
| no_schema_copy_rate | 0.7800 |
| no_repetition_rate | 0.7800 |
Training Data and Caveat
The adapter used to create this merged model was trained from:
A later audit found that the original validation checked for valid tool calls but did not strictly enforce that the supervised target ended immediately after the first tool call. Some source examples include assistant text, tool responses, follow-up turns, or final assistant answers. This release should therefore be framed as a first-call tool-selection model, not a clean-stop free-running agent.
Limitations
- May continue with extra text or synthetic turns if generation is not stopped at
</function>. - External failures are often near-miss function names, casing differences, or unusual tool names.
- Not an official ToolACE/BFCL leaderboard score.
- Not validated for production autonomous tool execution.
- Quantized GGUF behavior may differ from this fp16 source model.
Safety
Tool calls should be parsed, validated, allowlisted, and executed only inside a controlled tool runtime. Do not directly execute generated tool calls for sensitive or irreversible actions.
Search Keywords
MiniCPM5, MiniCPM5-1B, OpenBMB, agentic tool calling, function calling, tool use LLM, XML function call, vLLM MiniCPM, Transformers safetensors, merged LoRA, QLoRA merged model, PEFT merged model, llama.cpp conversion source, Unsloth compatible model.
July 2026 Nemotron SFT+DPO Repair Update
This merged fp16 Transformers/vLLM release now reflects the latest repair pass from the MiniCPM5-1B Agentic Tooluse model family.
The repair continued from the previous DPO adapter and added a targeted Nemotron SFT + DPO pass focused on:
- first-call tool selection
- valid function-name prediction
- argument-key selection
- schema-copy avoidance
- repeated-call suppression
- XML
<function ...>...</function>tool-call formatting
Training/eval artifacts:
- SFT continuation:
./minicpm5_tooluse_nemotron_sft_from_repair_dpo - DPO continuation:
./minicpm5_tooluse_nemotron_dpo_from_repair_dpo - Merged fp16 export:
./minicpm5_tooluse_nemotron_merged_fp16 - External eval:
Team-ACE/ToolACE, 300 cases
Datasets used in the repair:
nvidia/Nemotron-SFT-Agentic-v2nvidia/Nemotron-RL-Agentic-Function-Calling-Pivot-v1nvidia/Nemotron-RL-Agentic-Conversational-Tool-Use-Pivot-v1
Dataset inspection note: nvidia/Nemotron-SFT-Agentic-v2/data/tool_calling.jsonl contains 8,444 physical lines and one malformed JSONL line. The final training pipeline reads the file directly with hf_hub_download, parses JSONL line by line, and skips invalid rows. The pipeline also removes oversized source policy text from SFT prompts while preserving tool schemas and recent dialogue context.
Latest External ToolACE Evaluation
| Metric | Base MiniCPM5-1B | Nemotron repaired adapter/model | Delta |
|---|---|---|---|
| parseable_rate | 0.0133 | 0.9933 | +0.9800 |
| valid_name_rate | 0.0133 | 0.9700 | +0.9567 |
| expected_name_rate | 0.0133 | 0.9267 | +0.9133 |
| args_exact_rate | 0.1500 | 0.6533 | +0.5033 |
| arg_key_overlap | 0.0033 | 0.7517 | +0.7484 |
| no_schema_copy_rate | 1.0000 | 1.0000 | +0.0000 |
| no_repetition_rate | 0.9967 | 1.0000 | +0.0033 |
| stopped_cleanly_rate | 0.0000 | 0.1500 | +0.1500 |
The repaired model beats base on 7/8 external ToolACE metrics.
The strongest improvements are in parseability, valid tool-name selection, expected tool-name selection, and argument-key overlap. The remaining weak point is clean stopping, so production runtimes should stop generation immediately after the first complete </function> call.
Runtime Contract
Use this as a first-call tool-selection model:
- Render tools in the prompt.
- Generate one tool call.
- Parse the first complete
<function ...>...</function>block. - Stop at
</function>. - Execute the tool outside the model.
- Feed the tool result back as the next turn.
Do not let the model keep generating fake tool responses or synthetic user turns after a function call.
Current Files vs Previous Versions
This repository keeps old versions in Hugging Face commit history. Files removed from the current visible file list are not permanently erased; they can still be found by opening the repository History tab and selecting an older commit.
Current merged fp16 weights are stored as sharded safetensors:
model-00001-of-00002.safetensorsmodel-00002-of-00002.safetensorsmodel.safetensors.index.json
The older single-file model.safetensors was removed from the current file list because it was from the previous merged release and could confuse loaders. It is still recoverable from the repository commit history.
Current Status
This is the current merged fp16 release after the July 2026 Nemotron SFT+DPO repair. Use it when you want a standalone Transformers/vLLM-loadable model without separately loading PEFT adapters.
Current primary weight files:
model-00001-of-00002.safetensorsmodel-00002-of-00002.safetensorsmodel.safetensors.index.json
The older single-file model.safetensors from the previous merged release was removed from the current file list because it conflicted with the new sharded weights. It remains recoverable from Hugging Face commit history.
Known Limitations
- This is a merged fp16 model, so it does not require loading a separate PEFT adapter.
- Strongest validated use case is first-call XML tool selection with Transformers/vLLM-style serving.
- External ToolACE eval improved strongly after the July 2026 Nemotron SFT+DPO repair, but this is still not an official ToolACE/BFCL leaderboard submission.
- Argument exactness is improved but not perfect; production systems should validate tool arguments before execution.
- Clean stopping is still runtime-sensitive. Use stop strings or parser-side stopping after the first complete
</function>block. - Not validated as a fully autonomous production agent. Use it inside an application-owned tool loop.
- Downloads last month
- -
Model tree for ewinregirgojr/MiniCPM5-1B-Agentic-Tooluse-Merged-FP16
Base model
openbmb/MiniCPM5-1BEvaluation results
- Parseable tool call rate on External ToolACE-derived first-call sanity evalself-reported0.993
- Expected tool name rate on External ToolACE-derived first-call sanity evalself-reported0.927