alt.freeweights.minicpm / MiniCPM4-0.5B
From: openbmb <huggingface.co/openbmb>Newsgroups: alt.freeweights.minicpmSubject:

MiniCPM4-0.5B

Date: 2026-11-14Commit: 5253c7fSigned: 2DC28CC7B26A283B ✓

Text generation model with 434M parameters. Safetensors weights, 876 MB in all. Published by openbmb under Apache-2.0.

434M params876MBMiniCPM4-0.5Bsafetensorspermissive
FactsParams434MSize876 MBFormatssafetensorsTasktext generationLicenseApache-2.0From sourcepermissive
$ fw get openbmb/MiniCPM4-0.5B
# manifest sha256 76bdaeb7303e… · 876 MB · 12 files
$ fw verify ./MiniCPM4-0.5B openbmb/MiniCPM4-0.5B
From sourceHosted (signed)openbmb/MiniCPM4-0.5BLast check: 2026-11-14 21:25 UTC

Get help: custom fine-tune or private deploy. We review your setup before we quote.

Works with

Overview

Size
876 MB
Weights
868 MB (safetensors)
Parameters
434M
Formats
safetensors
Task
text generation
License
Apache-2.0 (permissive)
Files
12, each with a sha256
Publisher
openbmb
Added
2026-11-14
Section
alt.freeweights.minicpm
Lineage

Original release from the publisher.

Where these bytes come from
Publisher at the pinned commit→You

Sources are tried in order. A file counts only when its size and sha256 match the manifest. Sources are checked when you ask for them, not on a timer.

Sources
BadgeHostLast checkResult
From sourcehuggingface.co2026-11-14 21:25 UTCpassed

Model card

From the publisher at commit 5253c7f. Shown as plain text with links; images open at the publisher.

Image: image

GitHub Repo | Technical Report

👋 Join us on Discord and WeChat

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#

For now, you need to install our forked version of SGLang.

git clone -b openbmb https://github.com/OpenBMB/sglang.git
cd sglang

pip install --upgrade pip
pip install -e "python[all]"

You can start the inference server by running the following command:

python -m sglang.launch_server --model openbmb/MiniCPM4-0.5B --trust-remote-code --port 30000 --chat-template chatml

Then you can use the chat interface by running the following command:

import openai

client = openai.Client(base_url=f"http://localhost:30000/v1", api_key="None")

response = client.chat.completions.create(
    model="openbmb/MiniCPM4-0.5B",
    messages=[
        {"role": "user", "content": "Write an article about Artificial Intelligence."},
    ],
    temperature=0.7,
    max_tokens=1024,
)

print(response.choices[0].message.content)
Inference with vLLM#

For now, you need to install the latest version of vLLM.

pip install -U vllm \
    --pre \
    --extra-index-url https://wheels.vllm.ai/nightly

Then you can inference MiniCPM4-0.5B with vLLM:

from transformers import AutoTokenizer
from vllm import LLM, SamplingParams

model_name = "openbmb/MiniCPM4-0.5B"
prompt = [{"role": "user", "content": "Please recommend 5 tourist attractions in Beijing. "}]

tokenizer = AutoTokenizer.from_pretrained(model_name, trust_remote_code=True)
input_text = tokenizer.apply_chat_template(prompt, tokenize=False, add_generation_prompt=True)

llm = LLM(
    model=model_name,
    trust_remote_code=True,
    max_num_batched_tokens=32768, 
    dtype="bfloat16", 
    gpu_memory_utilization=0.8, 
)
sampling_params = SamplingParams(top_p=0.7, temperature=0.7, max_tokens=1024, repetition_penalty=1.02)

outputs = llm.generate(prompts=input_text, sampling_params=sampling_params)

print(outputs[0].outputs[0].text)

Also, you can start the inference server by running the following command:

Note: In vLLM's chat API, add_special_tokens is False by default. This means important special tokens—such as the beginning-of-sequence (BOS) token—will not be added automatically. To ensure the input prompt is correctly formatted for the model, you should explicitly set extra_body={"add_special_tokens": True}.

vllm serve openbmb/MiniCPM4-0.5B 

Then you can use the chat interface by running the following code:

import openai

client = openai.Client(base_url="http://localhost:8000/v1", api_key="EMPTY")

response = client.chat.completions.create(
    model="openbmb/MiniCPM4-0.5B",
    messages=[
        {"role": "user", "content": "Write an article about Artificial Intelligence."},
    ],
    temperature=0.7,
    max_tokens=1024,
    extra_body=dict(add_special_tokens=True),  # Ensures special tokens are added for chat template
    
)

print(response.choices[0].message.content)

Evaluation Results#

On two typical end-side chips, Jetson AGX Orin and RTX 4090, MiniCPM4 demonstrates significantly faster processing speed compared to similar-size models in long text processing tasks. As text length increases, MiniCPM4's efficiency advantage becomes more pronounced. On the Jetson AGX Orin platform, compared to Qwen3-8B, MiniCPM4 achieves approximately 7x decoding speed improvement.

Image: benchmark

Comprehensive Evaluation#

MiniCPM4 launches end-side versions with 8B and 0.5B parameter scales, both achieving best-in-class performance in their respective categories.

Image: benchmark

Long Text Evaluation#

MiniCPM4 is pre-trained on 32K long texts and achieves length extension through YaRN technology. In the 128K long text needle-in-a-haystack task, MiniCPM4 demonstrates outstanding performance.

Image: long-niah

Statement#

  • As a language model, MiniCPM generates content by learning from a vast amount of text.
  • However, it does not possess the ability to comprehend or express personal opinions or value judgments.
  • Any content generated by MiniCPM does not represent the viewpoints or positions of the model developers.
  • Therefore, when using content generated by MiniCPM, users should take full responsibility for evaluating and verifying it on their own.

LICENSE#

  • This repository and MiniCPM models are released under the Apache-2.0 License.

Citation#

  • Please cite our paper if you find our work valuable.
@article{minicpm4,
  title={{MiniCPM4}: Ultra-Efficient LLMs on End Devices},
  author={MiniCPM Team},
  year={2025}
}

Files

12 files · 876 MBWeights 868 MB (safetensors). Sizes and sha256 from the signed manifest.
Hide all 12 files with their sha256
FileSizesha256
.gitattributes1.52 KB11ad7efa24975ee4b0c3c3a38ed18737f0658a5f75a0a96787b576a78a023361
README.md11.6 KB9ecaf0591b47a7d2d94555f1e796afa032bdfe28cbd75ae1a20edc9c4cfa23b7
added_tokens.json216 B4760fcbf90bc193f33827ffe02f2e7ba1af1ec43644cc02ac22fdd611f6cca15
config.json2.40 KB610c5b519420a3633ec4950c15a26d83ad0e9be35ef9d00a9e3d2b621b325f72
configuration_minicpm.py9.66 KB1e289912fdc0608ccad3983f4ff8b381ec8f161f45c85be4d694f92f17596b0a
generation_config.json182 B83595cf3b045d7ed16593ae399b0e3c13fe45640a4bec3a1cd371b057a6a98b7
model.safetensors868 MBef74f4de1d1c580dd64e425d11f29881b9fd39f9be16a485150f727d4583181c
modeling_minicpm.py70.0 KBc646022c44d0e1cc1d149fb80422a5d5f1ba6de66dd0f525f2be1e18d99994bf
special_tokens_map.json630 B9ec9d6f07cb0e436598bf29b4d97c6355434c08fdbe9c264e6926907f3751c7e
tokenizer.json6.70 MBadf7208af154a5ca065d2eda4e5419e02aac58c2c00627874748b75ec6769094
tokenizer.model1.18 MBbb74d51116831c3bf65db812c553f94ab0c88dcf97a5bbb37e3504f6d359c530
tokenizer_config.json2.83 KB8bef75d59004eb0e62db89e97090d4736b14fd6c4a0282370c28833be1e83051
VersionsEach time the pinned upstream commit or file list changed in this repo. Newest first.
Upstream commitDateContents
5253c7fcc5 pinned now manifest updated, same commit2026-11-14 21:25 UTC12 files · 876 MB
5253c7fcc52026-11-14 21:25 UTC12 files · 876 MB

Use it

$ fw get openbmb/MiniCPM4-0.5B
# manifest sha256 76bdaeb7303e… · 876 MB · 12 files
$ fw verify ./MiniCPM4-0.5B openbmb/MiniCPM4-0.5B
fw.pyChecks the signature and every sha256, tries each source in order, resumes.
$ python3 fw.py get https://freeweights.allternit.com/manifests/openbmb/MiniCPM4-0.5B.json --dir ./MiniCPM4-0.5B $ python3 fw.py verify ./MiniCPM4-0.5B ./openbmb__MiniCPM4-0.5B.json
hfThe Hugging Face CLI with one setting. Same repo id.
$ HF_ENDPOINT=https://freeweights.allternit.com hf download openbmb/MiniCPM4-0.5B --revision 5253c7fcc5e29e1cf3eacb59a58adf1ba4df8630 --local-dir ./MiniCPM4-0.5B
transformersLoad the weights in Python.
import os os.environ["HF_ENDPOINT"] = "https://freeweights.allternit.com" from transformers import AutoModelForCausalLM, AutoTokenizer tok = AutoTokenizer.from_pretrained("openbmb/MiniCPM4-0.5B", revision="5253c7fcc5e29e1cf3eacb59a58adf1ba4df8630") model = AutoModelForCausalLM.from_pretrained("openbmb/MiniCPM4-0.5B", revision="5253c7fcc5e29e1cf3eacb59a58adf1ba4df8630", device_map="auto")
vLLMServe an OpenAI-compatible API.
$ HF_ENDPOINT=https://freeweights.allternit.com vllm serve openbmb/MiniCPM4-0.5B --revision 5253c7fcc5e29e1cf3eacb59a58adf1ba4df8630

License

Name
Apache License 2.0
Id
Apache-2.0
Class
Permissive
Redistribution
yes
Listing
Hosted (signed)
Decided
License as declared by the publisher. No person read it. 2026-11-14
Text in
README.md
Text sha256
9ecaf0591b47a7d2d94555f1e796afa032bdfe28cbd75ae1a20edc9c4cfa23b7
Terms gate
No extra terms beyond the license.

Read the license text

Licenses are checked against the license table. A custom license passes only after a person reads it.

Provenance

From: openbmb <huggingface.co/openbmb>Newsgroups: alt.freeweights.minicpmSubject: MiniCPM4-0.5BDate: 2026-11-14Commit: 5253c7fSigned: 2DC28CC7B26A283B ✓
Upstream
openbmb/MiniCPM4-0.5B
Pinned commit
5253c7fcc5e29e1cf3eacb59a58adf1ba4df8630
Manifest
MiniCPM4-0.5B.json · .minisig
Manifest sha256
76bdaeb7303e209845eb65f3f98884ed5e96abdc4278d95f2fd4dd218e063a1b
Signature
minisign, Ed25519, key 2DC28CC7B26A283B
Created
2026-11-14 21:25 UTC
Generator
freeweights-manifest/0.1.0
Takedowns
None.

How to verify

$ curl -O https://freeweights.allternit.com/manifests/openbmb/MiniCPM4-0.5B.json $ curl -O https://freeweights.allternit.com/manifests/openbmb/MiniCPM4-0.5B.json.minisig $ minisign -Vm MiniCPM4-0.5B.json -P RWQ7KGqyx4zCLXtUFOqvfv8L3g+8fpKJ1FsuxPyOYMF+4KufbUxKq1Oq $ shasum -a 256 <file> # compare with the Files tab

A manifest whose signature fails must be rejected. A file whose size or sha256 does not match must be discarded. Verify a download

Model tree

1 model in the catalog name this one as their parent.

Fine-tunes
1
Fine-tunes 1
Get it
Download
$ HF_ENDPOINT=https://freeweights.allternit.com hf download openbmb/MiniCPM4-0.5B
Open in Freeweights Studio

Pull, verify and run it in the Allternit app on Desktop, web or phone.

Signed manifest
minisign, key 2DC28CC7B26A283B. MiniCPM4-0.5B.json. Provenance. Takedown history: none.
From: openbmb <huggingface.co/openbmb>Subject: AgentCPM-Explore-GGUF
From: openbmb <huggingface.co/openbmb>Subject: AgentCPM-Report
From: openbmb <huggingface.co/openbmb>Subject: AgentCPM-Report-GGUF
From: openbmb <huggingface.co/openbmb>Subject: BitCPM-CANN-0.5B-gguf
From: openbmb <huggingface.co/openbmb>Subject: BitCPM-CANN-1B-gguf
From: openbmb <huggingface.co/openbmb>Subject: BitCPM-CANN-3B-gguf