Text Generation
GGUF
English
llama.cpp
llama-cpp
ollama
lm-studio
minicpm
minicpm5
minicpm5-1b
tool-calling
function-calling
tool-use
agentic
agentic-ai
ai-agent
xml-tool-calling
json-function-calling
quantized
quantization
q4_k_m
q8_0
f16
gguf-my-repo
small-language-model
slm
edge-ai
on-device
local-llm
offline-ai
privacy
openbmb
Eval Results (legacy)
conversational
Instructions to use ewinregirgojr/MiniCPM5-1B-Agentic-Tooluse-v3-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use ewinregirgojr/MiniCPM5-1B-Agentic-Tooluse-v3-GGUF with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf ewinregirgojr/MiniCPM5-1B-Agentic-Tooluse-v3-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf ewinregirgojr/MiniCPM5-1B-Agentic-Tooluse-v3-GGUF:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf ewinregirgojr/MiniCPM5-1B-Agentic-Tooluse-v3-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf ewinregirgojr/MiniCPM5-1B-Agentic-Tooluse-v3-GGUF:Q4_K_M
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf ewinregirgojr/MiniCPM5-1B-Agentic-Tooluse-v3-GGUF:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf ewinregirgojr/MiniCPM5-1B-Agentic-Tooluse-v3-GGUF:Q4_K_M
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf ewinregirgojr/MiniCPM5-1B-Agentic-Tooluse-v3-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf ewinregirgojr/MiniCPM5-1B-Agentic-Tooluse-v3-GGUF:Q4_K_M
Use Docker
docker model run hf.co/ewinregirgojr/MiniCPM5-1B-Agentic-Tooluse-v3-GGUF:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use ewinregirgojr/MiniCPM5-1B-Agentic-Tooluse-v3-GGUF 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-v3-GGUF" # 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-v3-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/ewinregirgojr/MiniCPM5-1B-Agentic-Tooluse-v3-GGUF:Q4_K_M
- Ollama
How to use ewinregirgojr/MiniCPM5-1B-Agentic-Tooluse-v3-GGUF with Ollama:
ollama run hf.co/ewinregirgojr/MiniCPM5-1B-Agentic-Tooluse-v3-GGUF:Q4_K_M
- Unsloth Studio
How to use ewinregirgojr/MiniCPM5-1B-Agentic-Tooluse-v3-GGUF 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-v3-GGUF 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-v3-GGUF 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-v3-GGUF to start chatting
- Pi
How to use ewinregirgojr/MiniCPM5-1B-Agentic-Tooluse-v3-GGUF with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf ewinregirgojr/MiniCPM5-1B-Agentic-Tooluse-v3-GGUF:Q4_K_M
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "ewinregirgojr/MiniCPM5-1B-Agentic-Tooluse-v3-GGUF:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use ewinregirgojr/MiniCPM5-1B-Agentic-Tooluse-v3-GGUF with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf ewinregirgojr/MiniCPM5-1B-Agentic-Tooluse-v3-GGUF:Q4_K_M
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 ewinregirgojr/MiniCPM5-1B-Agentic-Tooluse-v3-GGUF:Q4_K_M
Run Hermes
hermes
- Atomic Chat new
- OpenClaw new
How to use ewinregirgojr/MiniCPM5-1B-Agentic-Tooluse-v3-GGUF with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf ewinregirgojr/MiniCPM5-1B-Agentic-Tooluse-v3-GGUF:Q4_K_M
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 "ewinregirgojr/MiniCPM5-1B-Agentic-Tooluse-v3-GGUF:Q4_K_M" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
- Docker Model Runner
How to use ewinregirgojr/MiniCPM5-1B-Agentic-Tooluse-v3-GGUF with Docker Model Runner:
docker model run hf.co/ewinregirgojr/MiniCPM5-1B-Agentic-Tooluse-v3-GGUF:Q4_K_M
- Lemonade
How to use ewinregirgojr/MiniCPM5-1B-Agentic-Tooluse-v3-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull ewinregirgojr/MiniCPM5-1B-Agentic-Tooluse-v3-GGUF:Q4_K_M
Run and chat with the model
lemonade run user.MiniCPM5-1B-Agentic-Tooluse-v3-GGUF-Q4_K_M
List all available models
lemonade list
Add model-index eval YAML, arch spec, thinking docs, limitations, citation, ModelScope; remove column meanings note
Browse files
README.md
CHANGED
|
@@ -1,77 +1,76 @@
|
|
| 1 |
---
|
| 2 |
-
|
| 3 |
license: apache-2.0
|
| 4 |
-
|
| 5 |
base_model: openbmb/MiniCPM5-1B
|
| 6 |
-
|
| 7 |
tags:
|
| 8 |
-
|
| 9 |
- gguf
|
| 10 |
-
|
| 11 |
- llama.cpp
|
| 12 |
-
|
| 13 |
- llama-cpp
|
| 14 |
-
|
| 15 |
- ollama
|
| 16 |
-
|
| 17 |
- lm-studio
|
| 18 |
-
|
| 19 |
- minicpm
|
| 20 |
-
|
| 21 |
- minicpm5
|
| 22 |
-
|
| 23 |
- minicpm5-1b
|
| 24 |
-
|
| 25 |
- tool-calling
|
| 26 |
-
|
| 27 |
- function-calling
|
| 28 |
-
|
| 29 |
- tool-use
|
| 30 |
-
|
| 31 |
- agentic
|
| 32 |
-
|
| 33 |
- agentic-ai
|
| 34 |
-
|
| 35 |
- ai-agent
|
| 36 |
-
|
| 37 |
- xml-tool-calling
|
| 38 |
-
|
| 39 |
- json-function-calling
|
| 40 |
-
|
| 41 |
- quantized
|
| 42 |
-
|
| 43 |
- quantization
|
| 44 |
-
|
| 45 |
- q4_k_m
|
| 46 |
-
|
| 47 |
- q8_0
|
| 48 |
-
|
| 49 |
- f16
|
| 50 |
-
|
| 51 |
- gguf-my-repo
|
| 52 |
-
|
| 53 |
- small-language-model
|
| 54 |
-
|
| 55 |
- slm
|
| 56 |
-
|
| 57 |
- edge-ai
|
| 58 |
-
|
| 59 |
- on-device
|
| 60 |
-
|
| 61 |
- local-llm
|
| 62 |
-
|
| 63 |
- offline-ai
|
| 64 |
-
|
| 65 |
- privacy
|
| 66 |
-
|
| 67 |
- openbmb
|
| 68 |
-
|
| 69 |
language:
|
| 70 |
-
|
| 71 |
- en
|
| 72 |
-
|
| 73 |
pipeline_tag: text-generation
|
| 74 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 75 |
---
|
| 76 |
|
| 77 |
# MiniCPM5-1B-Agentic-Tooluse-v3-GGUF — Local Function-Calling LLM (llama.cpp / Ollama / LM Studio)
|
|
@@ -112,15 +111,6 @@ negative result below is measured against it.
|
|
| 112 |
| `arg_key_overlap` — F1 over argument keys | 0.8757 | 0.9422 | **0.9388** |
|
| 113 |
| **mean of 5** | 0.8718 | 0.9245 | **0.9251** |
|
| 114 |
|
| 115 |
-
Column meanings, to avoid the ambiguity the word "baseline" invites:
|
| 116 |
-
**v2 (previous release)** = the previously published SFT adapter. An earlier draft of this card
|
| 117 |
-
mislabeled this column "base model (untrained)" -- that was wrong; it is NOT the raw base model.
|
| 118 |
-
The real untrained `openbmb/MiniCPM5-1B`, measured on this same test slice, scores `parseable`
|
| 119 |
-
0.9333, `valid_name` 0.9133, `expected_name` 0.8867, `args_exact` 0.6300, `arg_key_overlap` 0.8920.
|
| 120 |
-
**SFT retrain** = a fresh SFT pass from v2, prior to GRPO. **v3** = what this repo currently serves.
|
| 121 |
-
Every "did it improve?" decision in this card is judged against **v2**, not against the untrained
|
| 122 |
-
base model — beating an untrained model is not evidence of anything.
|
| 123 |
-
|
| 124 |
GRPO buys +0.0100 on `args_exact`, the metric that matters here, and gives back 0.0034 (one test example
|
| 125 |
each) on `expected_name` and `arg_key_overlap`. That trade is reported rather than hidden: the mean moves
|
| 126 |
only +0.0006, so this is a targeted gain on the hardest metric, not a broad improvement.
|
|
@@ -216,6 +206,73 @@ ollama run minicpm5-tooluse-v3
|
|
| 216 |
|
| 217 |
**How was this trained?** QLoRA supervised fine-tuning on tool-calling trajectories, followed by GRPO (Group Relative Policy Optimization) reinforcement-learning refinement targeting exact argument correctness.
|
| 218 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 219 |
## Related repos
|
| 220 |
|
| 221 |
### v3 model family (this release)
|
|
@@ -237,3 +294,4 @@ ollama run minicpm5-tooluse-v3
|
|
| 237 |
|
| 238 |
Built on [MiniCPM5-1B](https://huggingface.co/openbmb/MiniCPM5-1B) by OpenBMB, fine-tuned for agentic tool/function calling and refined with GRPO reinforcement learning.
|
| 239 |
|
|
|
|
|
|
| 1 |
---
|
|
|
|
| 2 |
license: apache-2.0
|
|
|
|
| 3 |
base_model: openbmb/MiniCPM5-1B
|
|
|
|
| 4 |
tags:
|
|
|
|
| 5 |
- gguf
|
|
|
|
| 6 |
- llama.cpp
|
|
|
|
| 7 |
- llama-cpp
|
|
|
|
| 8 |
- ollama
|
|
|
|
| 9 |
- lm-studio
|
|
|
|
| 10 |
- minicpm
|
|
|
|
| 11 |
- minicpm5
|
|
|
|
| 12 |
- minicpm5-1b
|
|
|
|
| 13 |
- tool-calling
|
|
|
|
| 14 |
- function-calling
|
|
|
|
| 15 |
- tool-use
|
|
|
|
| 16 |
- agentic
|
|
|
|
| 17 |
- agentic-ai
|
|
|
|
| 18 |
- ai-agent
|
|
|
|
| 19 |
- xml-tool-calling
|
|
|
|
| 20 |
- json-function-calling
|
|
|
|
| 21 |
- quantized
|
|
|
|
| 22 |
- quantization
|
|
|
|
| 23 |
- q4_k_m
|
|
|
|
| 24 |
- q8_0
|
|
|
|
| 25 |
- f16
|
|
|
|
| 26 |
- gguf-my-repo
|
|
|
|
| 27 |
- small-language-model
|
|
|
|
| 28 |
- slm
|
|
|
|
| 29 |
- edge-ai
|
|
|
|
| 30 |
- on-device
|
|
|
|
| 31 |
- local-llm
|
|
|
|
| 32 |
- offline-ai
|
|
|
|
| 33 |
- privacy
|
|
|
|
| 34 |
- openbmb
|
|
|
|
| 35 |
language:
|
|
|
|
| 36 |
- en
|
|
|
|
| 37 |
pipeline_tag: text-generation
|
| 38 |
+
datasets:
|
| 39 |
+
- Team-ACE/ToolACE
|
| 40 |
+
model-index:
|
| 41 |
+
- name: MiniCPM5-1B-Agentic-Tooluse-v3
|
| 42 |
+
results:
|
| 43 |
+
- task:
|
| 44 |
+
type: text-generation
|
| 45 |
+
name: Tool calling
|
| 46 |
+
dataset:
|
| 47 |
+
name: External ToolACE-derived first-call evaluation (held-out 300 examples)
|
| 48 |
+
type: Team-ACE/ToolACE
|
| 49 |
+
metrics:
|
| 50 |
+
- type: parseable_rate
|
| 51 |
+
value: 1.0000
|
| 52 |
+
name: Parseable tool-call rate
|
| 53 |
+
- type: valid_name_rate
|
| 54 |
+
value: 0.9867
|
| 55 |
+
name: Valid available-tool name rate
|
| 56 |
+
- type: expected_name_rate
|
| 57 |
+
value: 0.9533
|
| 58 |
+
name: Expected tool-name rate
|
| 59 |
+
- type: args_exact_rate
|
| 60 |
+
value: 0.7467
|
| 61 |
+
name: Exact-arguments rate
|
| 62 |
+
- type: arg_key_overlap
|
| 63 |
+
value: 0.9388
|
| 64 |
+
name: Argument-key overlap
|
| 65 |
+
- type: no_schema_copy_rate
|
| 66 |
+
value: 0.9967
|
| 67 |
+
name: No-schema-copy rate
|
| 68 |
+
- type: no_repetition_rate
|
| 69 |
+
value: 0.3400
|
| 70 |
+
name: No-repetition rate
|
| 71 |
+
- type: stopped_cleanly_rate
|
| 72 |
+
value: 0.0000
|
| 73 |
+
name: Stopped-cleanly rate
|
| 74 |
---
|
| 75 |
|
| 76 |
# MiniCPM5-1B-Agentic-Tooluse-v3-GGUF — Local Function-Calling LLM (llama.cpp / Ollama / LM Studio)
|
|
|
|
| 111 |
| `arg_key_overlap` — F1 over argument keys | 0.8757 | 0.9422 | **0.9388** |
|
| 112 |
| **mean of 5** | 0.8718 | 0.9245 | **0.9251** |
|
| 113 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 114 |
GRPO buys +0.0100 on `args_exact`, the metric that matters here, and gives back 0.0034 (one test example
|
| 115 |
each) on `expected_name` and `arg_key_overlap`. That trade is reported rather than hidden: the mean moves
|
| 116 |
only +0.0006, so this is a targeted gain on the hardest metric, not a broad improvement.
|
|
|
|
| 206 |
|
| 207 |
**How was this trained?** QLoRA supervised fine-tuning on tool-calling trajectories, followed by GRPO (Group Relative Policy Optimization) reinforcement-learning refinement targeting exact argument correctness.
|
| 208 |
|
| 209 |
+
## Base model architecture
|
| 210 |
+
|
| 211 |
+
MiniCPM5-1B uses a standard `LlamaForCausalLM` architecture:
|
| 212 |
+
|
| 213 |
+
| Property | Value |
|
| 214 |
+
|---|---|
|
| 215 |
+
| Parameters (total) | 1,080,632,832 |
|
| 216 |
+
| Parameters (non-embedding) | 679,552,512 |
|
| 217 |
+
| Architecture | `LlamaForCausalLM` |
|
| 218 |
+
| Layers | 24 |
|
| 219 |
+
| Attention heads (GQA) | 16 Q / 2 KV |
|
| 220 |
+
| Context length | 131,072 tokens |
|
| 221 |
+
| Training | SFT → RL (GRPO) fine-tune on [openbmb/MiniCPM5-1B](https://huggingface.co/openbmb/MiniCPM5-1B) |
|
| 222 |
+
|
| 223 |
+
## Thinking mode
|
| 224 |
+
|
| 225 |
+
MiniCPM5-1B has a built-in `<think>...</think>` chat template. The same checkpoint can act as a fast assistant **or** a deliberate chain-of-thought reasoner — controlled by a single flag:
|
| 226 |
+
|
| 227 |
+
```python
|
| 228 |
+
# Fast mode — recommended for tool calling (thinking OFF)
|
| 229 |
+
prompt = tokenizer.apply_chat_template(
|
| 230 |
+
messages, tools=tools, add_generation_prompt=True,
|
| 231 |
+
enable_thinking=False,
|
| 232 |
+
tokenize=False,
|
| 233 |
+
)
|
| 234 |
+
|
| 235 |
+
# Reasoning mode (thinking ON — NOT recommended for tool calling)
|
| 236 |
+
prompt = tokenizer.apply_chat_template(
|
| 237 |
+
messages, tools=tools, add_generation_prompt=True,
|
| 238 |
+
enable_thinking=True,
|
| 239 |
+
tokenize=False,
|
| 240 |
+
)
|
| 241 |
+
```
|
| 242 |
+
|
| 243 |
+
> **Important:** always use `enable_thinking=False` for tool/function calling. With thinking ON the model spends its token budget inside `<think>...</think>` and may not reach a completed function call. All benchmark numbers in this card use thinking OFF.
|
| 244 |
+
|
| 245 |
+
## Citation
|
| 246 |
+
|
| 247 |
+
If you use this model, please cite the base model paper:
|
| 248 |
+
|
| 249 |
+
```bibtex
|
| 250 |
+
@article{minicpm4,
|
| 251 |
+
title = {MiniCPM4: Ultra-Efficient LLMs on End Devices},
|
| 252 |
+
author = {MiniCPM Team},
|
| 253 |
+
journal = {arXiv preprint arXiv:2506.07900},
|
| 254 |
+
year = {2025}
|
| 255 |
+
}
|
| 256 |
+
```
|
| 257 |
+
|
| 258 |
+
And the ToolACE dataset used for fine-tuning:
|
| 259 |
+
|
| 260 |
+
```bibtex
|
| 261 |
+
@article{toolace,
|
| 262 |
+
title = {ToolACE: Winning the Points of LLM Function Calling},
|
| 263 |
+
author = {Liu, Ying and others},
|
| 264 |
+
journal = {arXiv preprint arXiv:2409.00920},
|
| 265 |
+
year = {2024}
|
| 266 |
+
}
|
| 267 |
+
```
|
| 268 |
+
|
| 269 |
+
## ModelScope
|
| 270 |
+
|
| 271 |
+
The base model is also available on ModelScope (for users in China and East Asia):
|
| 272 |
+
|
| 273 |
+
- [OpenBMB/MiniCPM5-1B on ModelScope](https://www.modelscope.cn/models/OpenBMB/MiniCPM5-1B)
|
| 274 |
+
|
| 275 |
+
*(The fine-tuned adapter/GGUF builds are currently HuggingFace-only.)*
|
| 276 |
## Related repos
|
| 277 |
|
| 278 |
### v3 model family (this release)
|
|
|
|
| 294 |
|
| 295 |
Built on [MiniCPM5-1B](https://huggingface.co/openbmb/MiniCPM5-1B) by OpenBMB, fine-tuned for agentic tool/function calling and refined with GRPO reinforcement learning.
|
| 296 |
|
| 297 |
+
## Limitations
|