MiniCPM4: Ultra-Efficient LLMs on End Devices
Paper β’ 2506.07900 β’ Published β’ 102
How to use litert-community/MiniCPM5-2B with LiteRT:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
This repository hosts the LiteRT-LM (LiteRT formerly known as TensorFlow Lite) version of MiniCPM5-2B, optimized for fully on-device inference on mobile and edge hardware.
minicpm_wi4c_wi8_afp32.litertlm: This model features mixed INT4/INT8 weight-only quantization with FP32 activations (afp32). MLP projections use channelwise INT4 with Hadamard rotation; all remaining weights (attention, embedding, and lmhead) use channelwise INT8.minicpm_wi8_afp32.litertlm: This model features weight-only INT8 quantization (wi8) with FP32 activations (afp32).MiniCPM5-2B is part of the MiniCPM5 series from OpenBMB. It is a dense 2.5B-parameter Transformer built specifically for on-device, local, and resource-constrained deployment.
<think> template (enable_thinking).| Item | Value |
|---|---|
| Type | Causal Language Model |
| Architecture | Standard LlamaForCausalLM |
| Parameters | 2,516,756,480 (~2.5B) |
| Non-Embedding Parameters | 1,981,982,720 |
| Layers | 42 |
| Attention Heads (GQA) | 16 (Q) / 2 (KV), head dim 128 |
| Hidden / Intermediate Size | 2048 / 6144 |
| Vocabulary Size | 130,560 |
| Context Length | 131,072 |
.litertlm model and click submit. The model will then appear in your list, and you can proceed to download it (a Hugging Face account login is required)..litertlm model directly to your Android device, OR download it to your computer and push it via ADB (e.g., adb push minicpm_wi4c_wi8_afp32.litertlm /sdcard/Download/). Then, select this option, choose the downloaded file from your storage, configure your preferred parameters, and tap "Import".For full details on importing models and other features, see the Edge Gallery App Wiki.
To build the demo app from source, please follow the instructions from the GitHub repository.
Install uv and run the model directly from the LiteRT-LM command line:
uv tool install litert-lm
uvx litert-lm run --from-huggingface-repo=litert-community/MiniCPM5-2B minicpm_wi4c_wi8_afp32.litertlm --prompt="What is the capital of France?"
Released under the Apache-2.0 License, consistent with the upstream openbmb/MiniCPM5-2B.
@article{minicpm4,
title={MiniCPM4: Ultra-efficient LLMs on end devices},
author={MiniCPM, Team},
journal={arXiv preprint arXiv:2506.07900},
year={2025}
}
Base model
openbmb/MiniCPM5-2B