Skip to main content
Back

MiniCPM5-1B

MiniCPM Text Series

Deployment Cookbook and Agent Skills​

MiniCPM5-1B uses the standard LlamaForCausalLM architecture, so mainstream inference engines can load it directly, with no custom kernels and no forked model code. To help developers quickly reproduce the deployment process, we provide a single-page cookbook, each section paired one-to-one with a Cursor Agent Skill.

Cookbook: suited to running steps manually. Agent Skills: suited to letting an agent in Cursor / Claude Code choose the execution route based on the target backend, hardware, and data paths.

Top-level Skill​

MiniCPM5-1B Deploy Skill ( automatically routes to transformers · vllm · sglang · llama-cpp · ollama · lmstudio · mlx )

After downloading this Skill and placing it in your current project directory, you can type the following in a coding agent such as Cursor / Claude Code:

Plain Text
@minicpm5-deploy 用 vLLM 在 8000 端口起 openbmb/MiniCPM5-1B

The agent reads the top-level Skill, selects the matching sub-Skill and cookbook based on the target backend, hardware, and data paths, then runs the commands and reports the results.

The cookbooks and sub-Skills are listed below by inference backend.

Quantized models are not listed as separate backends; they are covered under the inference backends that can load the corresponding formats.

Inference Deployment​

BackendModels / Use caseCookbookAgent Skill
TransformersBF16 / FP16, local Python inference, GPU + CPUGet itGet it
vLLMBF16 / FP16 OpenAI serverGet itGet it
SGLangBF16 / FP16 OpenAI server, recommended for tool callingGet itGet it
llama.cppGGUF, local CPU/GPU inferenceGet itGet it
OllamaGGUF, local on-device useGet itGet it
LM StudioGGUF, Mac desktop app and OpenAI serverGet itGet it
MLXMLX / 4bit, local inference on Apple SiliconGet itGet it
ArcLightGGUF, local on-device / CPU / desktop / serverGet itGet it

Other Supported Frameworks​

In addition to the deployment frameworks listed above, MiniCPM5-1B also supports multi-chip deployment via FlagOS.

Multi-AI-Chip Support​

Thanks to the unified multi-chip AI system software stack of FlagOS, MiniCPM5-1B was adapted to 9 different AI chips in a very short time. Multi-chip versions of MiniCPM5-1B have now been released on FlagRelease, a platform built by the FlagOS team for automatic migration, adaptation, and release of large models across multi-architecture AI chips. If you're interested, jump here 👉 Learn more

Usage​

Accelerating Performance on Nvidia with FlagOS​

  1. From FlagRelease (recommended)

FlagRelease is a platform built by the FlagOS team for automatic migration, adaptation, and release of large models across multi-architecture AI chips, and it has released multi-chip versions of MiniCPM-1B. FlagRelease ships with the relevant packages built in, so no installation is required.

  1. From scratch

Requires a Python3.12, GLIBC_2.39, GLIBCXX_3.4.33, CXXABI_1.3.15 environment

Step 1: Install the FlagOS operator library​

Official repository: https://github.com/flagos-ai/FlagGems

Bash
pip install flag-gems==4.2.1rc0
pip install triton==3.5.1
Step 2: Enable acceleration​

Enable flagGems acceleration by adding the flagGems import to the vllm source code that runs inference:

Python
import flag_gems
flag_gems.enable(record=True, once=True, path="/root/gems.txt")
Bash
vllm serve ${model_path} \
--trust-remote-code \
--dtype bfloat16 \
--enforce-eager \
--port ${Port} \
--served-model-name ${model_name} \
--gpu-memory-utilization 0.85

Using the FlagOS Unified Multi-chip Backend Plugin​

vllm-plugin-FL is a plugin built for the vLLM inference/serving framework. It is developed on FlagOS's unified multi-chip backend and aims to extend vLLM's functionality and performance across a variety of hardware environments.

VendorFrom scratchFrom FlagReleaseFrom FlagRelease
Nvidiavllm-plugin-FL/MiniCPM5-1BMiniCPM5-1B-ModelScopeMiniCPM5-1B-nvidia-FlagOS

Developer Showcase

View all →
MiniCPM TextVoxCPM SpeechESP32 Radar Tower: AI ATC CalloutsA round-AMOLED tower radar announcing flights in a cloned ATC voiceMiniCPM TextSelf-Evolving Catgirl: Reasoning via On-Policy Self DistillationNo teacher, no new base model: math reasoning emerges from self-distillationMiniCPM TextReJev: Decision-Model Post-TrainingLoRA post-training MiniCPM5-2B: 51.1% → 80.5% on a sealed holdoutMiniCPM TextBMB Agent: a MiniCPM-powered Personal AssistantLetting a 2B on-device model take over schedules and todos, with real-world lessonsMiniCPM TextMetaCog: Judge-Steered ReasoningAn inference-time loop where a judge scores parallel thought pathsMiniCPM TextMiniCPM News Desk: Local Daily BriefA local-first daily brief where MiniCPM5-2B picks exact source passagesMiniCPM TextWebGPU Pi: In-Browser Coding AgentMiniCPM5-2B running a coding agent fully in-browser via WebGPUMiniCPM TextMiniCPM5-1B Tool-Use: Offline Function CallsA 1B GGUF function-calling model (SFT + GRPO) that runs offline on CPUMiniCPM Textdeku: A Trustworthy Local Task AgentCode plans, MiniCPM5-1B answers briefly or refusesMiniCPM TextMiniCPM5-1B: LiteRT & Iberian EvalsINT8 LiteRT-LM build plus Spanish, Catalan, Basque and Galician evalsMiniCPM TextMiniCPM-V MultimodalMiniCPM Agent Gateway: Edge-Cloud RoutingLocal MiniCPM classifies each request so sensitive data stays on-deviceMiniCPM TextToneBridge: Context-Aware Mandarin CoachCorrects Mandarin sentences by context and tone, with pinyin and audioMiniCPM TextMiniCPM5-1B FP8: Faster NVIDIA InferenceFP8 vLLM profile hitting 248 decode tok/s on RTX 3060, 1.5× BF16MiniCPM TextAUGURY: Reading Soil Health from WeedsMaps weed species to soil-health indicators; phone-deployable, no cloudMiniCPM Textgmgn-minicpm: Local Crypto Research AgentA read-only GMGN crypto research agent powered by a local 1B modelMiniCPM TextMiniCPM-V MultimodalLost & Found Desk: Small-Model Item ReturnMiniCPM-V captions items, MiniCPM5 guides claims, staff confirm every handoffMiniCPM TextMiniCPM-V MultimodalVoxCPM SpeechCoreAI Model Zoo: MiniCPM on iPhoneCore AI builds of MiniCPM5 and MiniCPM-V 4.6 running natively on iPhone and MacMiniCPM TextMiniCPM-V MultimodalViva Mais: Local WhatsApp CRM CopilotA travel-agency copilot that turns WhatsApp chats into a local-first CRMMiniCPM TextTianwen: BaZi & I-Ching ReflectionA 1B model that turns BaZi and I-Ching readings into self-reflectionMiniCPM TextWanderLust: Mood-Driven Discovery WalksPlans exploratory A-to-B walking routes based on your moodMiniCPM TextNIGHTWAVE: 1970s Radio Hosted by a 1B ModelA 1970s late-night radio with a 1B-model DJ who takes live callsMiniCPM Text6ixPulse: Agentic Toronto Rent MapAgents compare Toronto neighborhoods, citing a source for every claimMiniCPM TextWall Street of AI AgentsFour small-model AI traders roam a pixel office and trade on their ownMiniCPM TextHackathon Advisor: Idea Map & CoachMaps hackathon ideas and coaches you toward more original projectsMiniCPM TextLLM Cinema: AI-Directed ASCII FilmsA small model writes and directs ASCII-art films in the browserMiniCPM Texttiny-llm: A Pure-Rust Inference EngineA from-scratch, CPU-only Rust inference engine for MiniCPM5-1B with a TUIMiniCPM TextDocument Field Agent: Batch OCR & ExtractionA workbench for batch document OCR and structured field extractionMiniCPM TextMiniCPM-V MultimodalWhen a Catgirl Learns to Think, on Your PhoneWas this model made for catgirls? An on-device deployment testMiniCPM TextMiniCPM-V MultimodalMaking a 1B Model a Good Math AgentTeXada’s on-device MiniCPM practice and lessonsMiniCPM TextORG-2: A Workbench for Coding AgentsAn organizational workbench to orchestrate and manage multiple coding agentsMiniCPM TextEdgeHome HarnessA replayable, evaluable local control loop for a 1B on-device model, built in RustMiniCPM TextSqueezing a NAS: Hooking Up WorkBuddyRunning local AI on an N150 CPU: real-world uses and lessons learned