Model reference · open weights

MiniCPM4

LLMs openbmb Text gen 2 builds Open weights 42k dl/mo

MiniCPM4 is an open-weight language model from openbmb. MiniCPM4-0.5B (BF16) weighs 868 MB; the smallest configuration that runs it is RTX 3060 12 GB.

  • MiniCPM4-0.5B is a text-generation model developed by openbmb with 434M parameters, designed for efficient deployment on end-side devices.
  • It supports a context length of 32,768 tokens and operates in Chinese and English.
  • The model is released under the Apache-2.0 license.

Summary of the openbmb/MiniCPM4-0.5B model card, 2026-10-01

What it is

Released byopenbmb
Released2025-06-05
Parameters434M
VRAM868 MB for the weights

What it runs on

Memory and cards for MiniCPM4-0.5B (BF16)

868 MBweights, file size
12 MBcache per 1K tokens
555 MBruntime overhead, at least
32,768 tokenscontext max
CardRequests at onceContext maxMemory
8K each32K each
RTX 3060 12 GB10125all 32K11.6 GB
RTX 4060 Ti 16 GB13834all 32K15.4 GB
RTX 3090 24 GB21854all 32K23.4 GB
RTX 4090 24 GB21754all 32K23.4 GB
RTX 5090 32 GB29473all 32K31.0 GB
L40S 48 GB422105all 32K44.0 GB
A100 80 GB762190all 32K78.2 GB
H100 80 GB731182all 32K78.1 GB
RTX PRO 6000 Blackwell 96 GB887221all 32K93.8 GB
DGX Spark (GB10) 128 GB unified1000+255all 32K107 GB
H200 141 GB1000+331all 32K138 GB
B200 180 GB1000+425all 32K176 GB
Memory needed at each load
Requests at once8K tokens each32K tokens each
11.5 GB1.8 GB
51.9 GB3.4 GB
82.2 GB4.6 GB
163.0 GB7.9 GB
324.6 GB14.3 GB
647.9 GB27.2 GB

One card, with vLLM's small-card settings.

Builds

Sizes, precisions & builds

BuildParamsPrecisionWeightsSmallest setup
MiniCPM4-0.5B (above) ↗ 434MBF16 868 MBRTX 3060 12 GB
MiniCPM4-8B ↗ 8.2BBF16 16.4 GB2× RTX 3060 12 GB

From the model card

What openbmb says about MiniCPM4

Read the model card

What's New

  • [2025.06.06] MiniCPM4 series are released! This model achieves ultimate efficiency improvements while maintaining optimal performance at the same scale! It can achieve over 5x generation acceleration on typical end-side chips! You can find technical report here.🔥🔥🔥

MiniCPM4 Series

MiniCPM4 series are highly efficient large language models (LLMs) designed explicitly for end-side devices, which achieves this efficiency through systematic innovation in four key dimensions: model architecture, training data, training algorithms, and inference systems.

  • MiniCPM4-8B: The flagship of MiniCPM4, with 8B parameters, trained on 8T tokens.
  • MiniCPM4-0.5B: The small version of MiniCPM4, with 0.5B parameters, trained on 1T tokens. (<-- you are here)
  • MiniCPM4-8B-Eagle-FRSpec: Eagle head for FRSpec, accelerating speculative inference for MiniCPM4-8B.
  • MiniCPM4-8B-Eagle-FRSpec-QAT-cpmcu: Eagle head trained with QAT for FRSpec, efficiently integrate speculation and quantization to achieve ultra acceleration for MiniCPM4-8B.
  • MiniCPM4-8B-Eagle-vLLM: Eagle head in vLLM format, accelerating speculative inference for MiniCPM4-8B.
  • MiniCPM4-8B-marlin-Eagle-vLLM: Quantized Eagle head for vLLM format, accelerating speculative inference for MiniCPM4-8B.
  • BitCPM4-0.5B: Extreme ternary quantization applied to MiniCPM4-0.5B compresses model parameters into ternary values, achieving a 90% reduction in bit width.
  • BitCPM4-1B: Extreme ternary quantization applied to MiniCPM3-1B compresses model parameters into ternary values, achieving a 90% reduction in bit width.
  • MiniCPM4-Survey: Based on MiniCPM4-8B, accepts users' quiries as input and autonomously generate trustworthy, long-form survey papers.
  • MiniCPM4-MCP: Based on MiniCPM4-8B, accepts users' queries and available MCP tools as input and autonomously calls relevant MCP tools to satisfy users' requirements.

Introduction

MiniCPM 4 is an extremely efficient edge-side large model that has undergone efficient optimization across four dimensions: model architecture, learning algorithms, training data, and inference systems, achieving ultimate efficiency improvements.

  • 🏗️ Efficient Model Architecture:

    • InfLLM v2 -- Trainable Sparse Attention Mechanism: Adopts a trainable sparse attention mechanism architecture where each token only needs to compute relevance with less than 5% of tokens in 128K long text processing, significantly reducing computational overhead for long texts
  • 🧠 Efficient Learning Algorithms:

    • Model Wind Tunnel 2.0 -- Efficient Predictable Scaling: Introduces scaling prediction methods for performance of downstream tasks, enabling more precise model training configuration search
    • BitCPM -- Ultimate Ternary Quantization: Compresses model parameter bit-width to 3 values, achieving 90% extreme model bit-width reduction
    • Efficient Training Engineering Optimization: Adopts FP8 low-precision computing technology combined with Multi-token Prediction training strategy
  • 📚 High-Quality Training Data:

    • UltraClean -- High-quality Pre-training Data Filtering and Generation: Builds iterative data cleaning strategies based on efficient data verification, open-sourcing high-quality Chinese and English pre-training dataset UltraFinweb
    • UltraChat v2 -- High-quality Supervised Fine-tuning Data Generation: Constructs large-scale high-quality supervised fine-tuning datasets covering multiple dimensions including knowledge-intensive data, reasoning-intensive data, instruction-following data, long text understanding data, and tool calling data
  • ⚡ Efficient Inference System:

    • CPM.cu -- Lightweight and Efficient CUDA Inference Framework: Integrates sparse attention, model quantization, and speculative sampling to achieve efficient prefilling and decoding
    • ArkInfer -- Cross-platform Deployment System: Supports efficient deployment across multiple backend environments, providing flexible cross-platform adaptation capabilities

Usage

Inference with Transformers

from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
torch.manual_seed(0)

path = 'openbmb/MiniCPM4-0.5B'
device = "cuda"
tokenizer = AutoTokenizer.from_pretrained(path)
model = AutoModelForCausalLM.from_pretrained(path, torch_dtype=torch.bfloat16, device_map=device, trust_remote_code=True)

# User can directly use the chat interface
responds, history = model.chat(tokenizer, "Write an article about Artificial Intelligence.", temperature=0.7, top_p=0.7)
print(responds)

# User can also use the generate interface
# messages = [
#     {"role": "user", "content": "Write an article about Artificial Intelligence."},
# ]
# prompt_text = tokenizer.apply_chat_template(
#     messages,
#     tokenize=False,
#     add_generation_prompt=True,
# )
# model_inputs = tokenizer([prompt_text], return_tensors="pt").to(device)

# model_outputs = model.generate(
#     **model_inputs,
#     max_new_tokens=1024,
#     top_p=0.7,
#     temperature=0.7
# )
# output_token_ids = [
#     model_outputs[i][len(model_inputs[i]):] for i in range(len(model_inputs['input_ids']))
# ]

# responses = tokenizer.batch_decode(output_token_ids, skip_special_tokens=True)[0]
# print(responses)

Inference with [SGLang](https://github.com/s

Quoted from the model card on Hugging Face. The full card is behind the Hugging Face link above.

© 2026 AxForge · EU-hosted AI infrastructure Pricing Docs Trust Privacy Terms