Files
MiniCPM4.1-8B-bf16/README.md

40 lines
852 B
Markdown
Raw Permalink Normal View History

2025-09-08 18:23:33 +00:00
---
2025-09-08 18:26:13 +00:00
license: apache-2.0
language:
- zh
- en
pipeline_tag: text-generation
library_name: mlx
base_model: openbmb/MiniCPM4.1-8B
tags:
- mlx
---
2025-09-08 18:23:33 +00:00
2025-09-08 18:26:13 +00:00
# mlx-community/MiniCPM4.1-8B-bf16
2025-09-08 18:23:33 +00:00
2025-09-08 18:26:13 +00:00
This model [mlx-community/MiniCPM4.1-8B-bf16](https://huggingface.co/mlx-community/MiniCPM4.1-8B-bf16) was
converted to MLX format from [openbmb/MiniCPM4.1-8B](https://huggingface.co/openbmb/MiniCPM4.1-8B)
using mlx-lm version **0.26.0**.
2025-09-08 18:23:33 +00:00
2025-09-08 18:26:13 +00:00
## Use with mlx
2025-09-08 18:23:33 +00:00
```bash
2025-09-08 18:26:13 +00:00
pip install mlx-lm
2025-09-08 18:23:33 +00:00
```
2025-09-08 18:26:13 +00:00
2025-09-08 18:23:33 +00:00
```python
2025-09-08 18:26:13 +00:00
from mlx_lm import load, generate
model, tokenizer = load("mlx-community/MiniCPM4.1-8B-bf16")
2025-09-08 18:23:33 +00:00
2025-09-08 18:26:13 +00:00
prompt = "hello"
if tokenizer.chat_template is not None:
messages = [{"role": "user", "content": prompt}]
prompt = tokenizer.apply_chat_template(
messages, add_generation_prompt=True
)
response = generate(model, tokenizer, prompt=prompt, verbose=True)
```