CoolFace
Modelpublic

openbmb/MiniCPM4-0.5B-QAT-Int4-GGUF

sourceHugging Faceapache-2.0updated 1y agoView on Hugging Face
3likes127downloads
Model Card

<div align="center"> <img src="https://github.com/OpenBMB/MiniCPM/blob/main/assets/minicpm_logo.png?raw=true" width="500em" ></img> </div>

<p align="center"> <a href="https://github.com/OpenBMB/MiniCPM/" target="blank">GitHub Repo</a> | <a href="https://github.com/OpenBMB/MiniCPM/tree/main/report/MiniCPM4TechnicalReport.pdf" target="blank">Technical Report</a> </p> <p align="center"> πŸ‘‹ Join us on <a href="https://discord.gg/3cGQn9b3YM" target="blank">Discord</a> and <a href="https://github.com/OpenBMB/MiniCPM/blob/main/assets/wechat.jpg" target="_blank">WeChat</a> </p>

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.
  • β€”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.
  • β€”MiniCPM4-0.5B-QAT-Int4-unquantized: Int4 version of MiniCPM4-0.5B, trained by QAT and stored in fake quantization style.
  • β€”MiniCPM4-0.5B-QAT-Int4-GPTQ-format: Int4 version of MiniCPM4-0.5B, trained by QAT and stored in GPTQ format.
  • β€”MiniCPM4-0.5B-QAT-Int4-GGUF: Int4 version of MiniCPM4-0.5B in GGUF. (<-- you are here)

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 Llama.cpp

bash
llama-cli -m MiniCPM4-0.5B-QAT-Int4_gptq_aware_q4_0.gguf -p "推荐5δΈͺεŒ—δΊ¬ηš„ζ™―η‚Ήγ€‚" -n 100

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.
bibtex
@article{minicpm4,
  title={{MiniCPM4}: Ultra-Efficient LLMs on End Devices},
  author={MiniCPM Team},
  year={2025}
}