MiniCPM4让大模型高效运行在终端设备上,适合移动端部署。
MiniCPM4: Ultra-Efficient LLMs on End Devices
- 采用稀疏注意力与量化技术,提升长文本处理速度。
- 仅用8万亿词训练,性能超越同规模开源模型。
- 支持0.5B和8B两种版本,适配不同设备需求。
本文提出MiniCPM4,一种专为终端设备设计的超高效大语言模型。通过在模型架构、训练数据、训练算法和推理系统四个维度进行系统性创新实现高效。模型架构方面,提出可训练的稀疏注意力机制InfLLM v2,加速长序列预填充与解码;训练数据方面,提出UltraClean数据清洗与生成策略,以及UltraChat v2监督微调数据集,仅用8万亿训练词即可达到良好性能;训练算法方面,提出ModelTunnel v2用于高效预训练策略搜索,并引入分块滚动的负载均衡强化学习方法与数据高效的三值大模型BitCPM;推理系统方面,提出CPM.cu集成稀疏注意力、模型量化与推测采样,实现高效推理。MiniCPM4提供0.5B与8B两种参数版本,并构建混合推理模型MiniCPM4.1,支持深度推理与非推理模式。评估显示,MiniCPM4与MiniCPM4.1在多个基准上优于同规模开源模型,8B版本在长序列理解与生成任务中显著提速。
原文摘要 · Abstract (English)
This paper introduces MiniCPM4, a highly efficient large language model (LLM) designed explicitly for end-side devices. We achieve this efficiency through systematic innovation in four key dimensions: model architecture, training data, training algorithms, and inference systems. Specifically, in terms of model architecture, we propose InfLLM v2, a trainable sparse attention mechanism that accelerates both prefilling and decoding phases for long-context processing. Regarding training data, we propose UltraClean, an efficient and accurate pre-training data filtering and generation strategy, and UltraChat v2, a comprehensive supervised fine-tuning dataset. These datasets enable satisfactory model performance to be achieved using just 8 trillion training tokens. Regarding training algorithms, we propose ModelTunnel v2 for efficient pre-training strategy search, and improve existing post-training methods by introducing chunk-wise rollout for load-balanced reinforcement learning and data-efficient tenary LLM, BitCPM. Regarding inference systems, we propose CPM.cu that integrates sparse attention, model quantization, and speculative sampling to achieve efficient prefilling and decoding. To meet diverse on-device requirements, MiniCPM4 is available in two versions, with 0.5B and 8B parameters, respectively. Furthermore, we construct a hybrid reasoning model, MiniCPM4.1, which can be used in both deep reasoning mode and non-reasoning mode. Evaluation results demonstrate that MiniCPM4 and MiniCPM4.1 outperform similar-sized open-source models across benchmarks, with the 8B variants showing significant speed improvements on long sequence understanding and generation.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。