MiniCPM5-2B MLX BF16
BF16 MLX conversion of openbmb/MiniCPM5-2B.
This conversion preserves BF16 precision and performs no quantization.
Why?
At the time the official MLX version was only 4 bit quant.
Conversion
Converted from the official OpenBMB checkpoint using mlx-lm 0.31.3:
mlx_lm.convert \
--hf-path openbmb/MiniCPM5-2B \
--mlx-path MiniCPM5-2B-MLX-bf16 \
--dtype bfloat16
Precision verification
All tensors in the converted safetensors files were verified as BF16:
Counter({'mlx.core.bfloat16': 381})
Tested hardware
Apple M4 Max with 128 GB unified memory.
Observed with mlx_lm.generate:
- Peak memory: approximately 5.1 GB
- Decode: approximately 96 tokens/sec
- Prefill: approximately 2300 tokens/sec on a short test
- MLX-LM: 0.31.3
Performance varies with prompt length, generation settings, and hardware.
Usage
mlx_lm.generate \
--model MiniCPM5-2B-MLX-bf16 \
--prompt "explain in two sentences quantum physics" \
--max-tokens 512
MiniCPM5-2B supports thinking/reasoning output. For interactive or low-latency workloads, generation settings should be chosen according to the intended use case.
Original model
Architecture, training details, benchmarks, limitations, license information, and citation are available from the original model:
openbmb/MiniCPM5-2B
https://huggingface.co/openbmb/MiniCPM5-2B
Conversion provenance
OpenBMB official MiniCPM5-2B BF16 weights => mlx-lm 0.31.3 => MLX BF16 weights no quantization