MiniCPM5-2B
Collection
MNN 8-bit and 4-bit builds of MiniCPM5-2B for on-device inference. • 2 items • Updated
openbmb/MiniCPM5-2B 转换并量化为 MNN 4bit(weight-only,quant_bit=4,quant_block=128,对称量化),用于端侧 / Apple Silicon Metal 推理。架构为标准 LlamaForCausalLM。
| 文件 | 说明 |
|---|---|
llm.mnn |
计算图 |
llm.mnn.weight |
4bit 量化权重(~1.16 GB) |
embeddings_bf16.bin |
bf16 词嵌入(~535 MB) |
tokenizer.mtok |
分词器 |
config.json |
运行配置(默认 CPU 后端) |
config_metal.json |
Apple GPU(Metal)后端配置 |
llm_config.json |
模型结构 / chat template |
用 MNN 的 llm_demo 运行(需 MNN_BUILD_LLM=ON + MNN_METAL=ON 编译):
# Apple Silicon 上走 Metal GPU
./llm_demo config_metal.json
# 或 CPU
./llm_demo config.json
cd MNN/transformers/llm/export
python llmexport.py --path <MiniCPM5-2B> --export mnn \
--quant_bit 4 --quant_block 128 --sym \
--mnnconvert <path>/MNNConvert --dst_path .
llm_bench -a metal):~4742 t/sllm_demo Metal):~155 t/sBase model
openbmb/MiniCPM5-2B