Skip to main content
Back to Showcase

MiniCPM5-1B Agentic Tool-Use v3: An Offline 1B Function-Calling Model

Author:ewinregirgojrModel:MiniCPM5-1B

A 1B GGUF function-calling model (SFT + GRPO) that runs offline on CPU

MiniCPM5-1B-Agentic-Tooluse-v3 is a 1B-parameter open-weight function-calling model fine-tuned from MiniCPM5-1B. Quantized to GGUF, it runs entirely offline on a CPU — no GPU, no cloud API, no data leaving your machine — and works out of the box with llama.cpp, Ollama, LM Studio, koboldcpp and text-generation-webui.

The model is trained to parse a tool schema plus a natural-language request and emit a structured, correctly-named, correctly-valued function call — the core skill behind LangChain agents, LlamaIndex pipelines, AutoGen, CrewAI, MCP tool servers, ReAct loops and home-automation assistants. On a held-out 300-example benchmark it reaches 74.67% exact-argument accuracy.

Training​

Unlike most small open tool-calling models that stop at supervised fine-tuning, this one goes through a two-stage pipeline:

  1. QLoRA supervised fine-tuning (SFT) on tool-calling trajectories from ToolACE.
  2. GRPO reinforcement learning on top of the SFT checkpoint, specifically rewarding the two hardest parts of tool calling: choosing the right function name and getting every argument value exactly right.

Compared with GPT-4o / Claude function calling, the author notes the model trades some absolute accuracy for being free, local, private, zero cost per call, and fine-tunable.

Results​

Evaluated on a held-out 300-example slice drawn from a seeded shuffle of ToolACE. The base-model column is the same model with the same prompt and no adapter. The published weights are SFT + GRPO; the SFT column is kept because every negative result below is measured against it.

Metricv2 (previous release)SFT retrain (pre-GRPO)v3 = SFT + GRPO (published)
parseable — output is a well-formed call0.99331.00001.0000
valid_name — name exists among the offered tools0.97000.98670.9867
expected_name — name matches gold0.90670.95670.9533
args_exact — every argument value matches gold0.61330.73670.7467
arg_key_overlap — F1 over argument keys0.87570.94220.9388
Mean of 50.87180.92450.9251

GRPO buys +0.0100 on args_exact, the metric that matters most here, and gives back 0.0034 (one test example each) on expected_name and arg_key_overlap. The author reports this trade rather than hiding it: the mean moves only +0.0006, so this is a targeted gain on the hardest metric, not a broad improvement.

Full 8-Metric Benchmark (held-out test set, n=300)​

Mirroring the v2 evaluation format, with Base, v2 and v3 side by side on a single consistent harness and test slice:

MetricBase MiniCPM5-1Bv2 (previous release)v3 (this model)Delta (v2 → v3)
parseable_rate0.01330.99331.0000+0.0067
valid_name_rate0.01330.97000.9867+0.0167
expected_name_rate0.01330.92670.9533+0.0267
args_exact_rate0.15000.65330.7467+0.0934
arg_key_overlap0.00330.75170.9388+0.1871
no_schema_copy_rate1.00001.00000.9967-0.0033
no_repetition_rate0.99671.00000.3400-0.6600
stopped_cleanly_rate0.00000.15000.0000-0.1500

Note: the v2 values for expected_name, args_exact and arg_key_overlap differ between the two tables in the model card; they are reproduced here as published.

What the additional metrics mean:

  • no_schema_copy_rate — the model did not copy the tool schema's own field description verbatim into an argument value.
  • no_repetition_rate — the completion contained no duplicated function-call block or degenerate repeated-phrase loop. This is a known weakness: the model often keeps generating filler content after the tool call completes.
  • stopped_cleanly_rate — the model stopped naturally right after the completed </function> tag with no trailing tokens.

So in practice, use a parser that treats the first completed <function>...</function> block as the action boundary — do not rely on natural end-of-generation.

Available Quantizations​

FileQuantSizeBest for
MiniCPM5-1B-Agentic-Tooluse-v3.F16.ggufF16~2.02 GBMaximum quality, GPU or high-RAM CPU inference
MiniCPM5-1B-Agentic-Tooluse-v3.Q8_0.ggufQ8_0~1.07 GBNear-lossless, recommended default for most users
MiniCPM5-1B-Agentic-Tooluse-v3.Q4_K_M.ggufQ4_K_M~656 MBSmallest and fastest — edge devices, phones, CPU-only/low-RAM machines

All three run well on CPU; a GPU just makes them faster.

Quick Start​

llama.cpp:

Bash
./llama-cli -m MiniCPM5-1B-Agentic-Tooluse-v3.Q8_0.gguf -p "Your prompt with tool schema here"

llama-server (OpenAI-compatible API, works with most agent frameworks):

Bash
./llama-server -m MiniCPM5-1B-Agentic-Tooluse-v3.Q4_K_M.gguf --port 8080

Ollama:

Bash
# Create a Modelfile containing:
# FROM ./MiniCPM5-1B-Agentic-Tooluse-v3.Q8_0.gguf
ollama create minicpm5-tooluse-v3 -f Modelfile
ollama run minicpm5-tooluse-v3

LM Studio: download one of the .gguf files above directly through the LM Studio search/download UI.

Turn Thinking Off​

MiniCPM5-1B ships with a built-in <think>...</think> chat template. Always use enable_thinking=False for tool calling — with thinking on, the model spends its token budget on reasoning and may never reach a completed function call. All benchmark numbers on this page use thinking off.

Python
prompt = tokenizer.apply_chat_template(
messages, tools=tools, add_generation_prompt=True,
enable_thinking=False,
tokenize=False,
)

Use Cases​

  • Fully local / offline / private AI agents
  • Home automation and smart-home voice assistants
  • Mobile, browser-extension and embedded/IoT tool-calling agents
  • Cost-sensitive, high-volume backends that can't afford large-model API costs per call
  • A function-calling backbone for LangChain, LlamaIndex, AutoGen, CrewAI and MCP-based agent stacks
  • Hobbyist and research experiments with small-model agentic reasoning
FormatRepository
v3 LoRA adapter (PEFT, smallest download, fine-tune further)MiniCPM5-1B-Agentic-Tooluse-QLoRA-v3
v3 merged full-weight FP16 (transformers / vLLM / SGLang)MiniCPM5-1B-Agentic-Tooluse-v3-Merged-FP16
v3 GGUF quantizations (llama.cpp / Ollama / LM Studio)MiniCPM5-1B-Agentic-Tooluse-v3-GGUF
v2 LoRA adapterMiniCPM5-1B-Agentic-Tooluse-QLoRA-v2
v2 merged FP16MiniCPM5-1B-Agentic-Tooluse-Merged-FP16
v2 GGUFMiniCPM5-1B-Agentic-Tooluse-GGUF

Project info

Author
ewinregirgojr