[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 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.
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. (<-- you are here)
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.
MiniCPM4-8B-Eagle-FRSpec-QAT is a quantization-friendly Eagle model trained with MiniCPM4-8B in QAT. It clould be apply on our inference framework cpm.cu with FRSpec, accelerating the generation speed by 7 times compared to Qwen3-8B.
# case 1: verify model is fp16 or bf16
cd cpm.cu/tests
python3 test_generate.py \
--no-apply-quant \
--apply-eagle-quant
# case 2: verify model is quanted with Marlin (W4A16, group size = 128)
cd cpm.cu/tests
python3 test_generate.py \
--apply-quant \
--apply-eagle-quant
Tested on two representative edge devices, the Jetson AGX Orin and RTX 4090, MiniCPM4 with MiniCPM4-8B-Eagle-FRSpec-QAT demonstrates significantly superior processing speed over models of comparable size for long-text processing tasks. Its performance advantage becomes increasingly pronounced as the text length increases. On the Jetson AGX Orin platform, MiniCPM4 achieves approximately a 7x improvement in generation speed compared to Qwen3-8B.
import os
os.environ["HF_ENDPOINT"] = "https://freeweights.allternit.com"
from transformers import AutoModelForCausalLM, AutoTokenizer
tok = AutoTokenizer.from_pretrained("openbmb/MiniCPM4-8B-Eagle-FRSpec-QAT-cpmcu", revision="259b5380f7900676b232d5dad57fe7c78c888c96")
model = AutoModelForCausalLM.from_pretrained("openbmb/MiniCPM4-8B-Eagle-FRSpec-QAT-cpmcu", revision="259b5380f7900676b232d5dad57fe7c78c888c96", device_map="auto")