MiniCPM5-2B — MNN 4bit
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 .
参考性能(Apple M5 Pro / 48GB / Metal 4 / macOS 26.6)
- Prefill(pp512,
llm_bench -a metal):~4742 t/s - Decode(256 token 真实生成,
llm_demoMetal):~155 t/s
- Downloads last month
- 16
Model tree for yunfengwang/MiniCPM5-2B-MNN-4bit
Base model
openbmb/MiniCPM5-2B