Instructions to use mlx-community/MiniCPM-V-4.6-bf16 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use mlx-community/MiniCPM-V-4.6-bf16 with MLX:
# Make sure mlx-vlm is installed # pip install --upgrade mlx-vlm from mlx_vlm import load, generate from mlx_vlm.prompt_utils import apply_chat_template from mlx_vlm.utils import load_config # Load the model model, processor = load("mlx-community/MiniCPM-V-4.6-bf16") config = load_config("mlx-community/MiniCPM-V-4.6-bf16") # Prepare input image = ["http://images.cocodataset.org/val2017/000000039769.jpg"] prompt = "Describe this image." # Apply chat template formatted_prompt = apply_chat_template( processor, config, prompt, num_images=1 ) # Generate output output = generate(model, processor, formatted_prompt, image) print(output) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- LM Studio
- Pi new
How to use mlx-community/MiniCPM-V-4.6-bf16 with Pi:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "mlx-community/MiniCPM-V-4.6-bf16"
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "mlx-lm": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "mlx-community/MiniCPM-V-4.6-bf16" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use mlx-community/MiniCPM-V-4.6-bf16 with Hermes Agent:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "mlx-community/MiniCPM-V-4.6-bf16"
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default mlx-community/MiniCPM-V-4.6-bf16
Run Hermes
hermes
Upload folder using huggingface_hub
Browse files- README.md +2 -1
- tokenizer_config.json +1 -0
README.md
CHANGED
|
@@ -4,6 +4,7 @@ pipeline_tag: image-text-to-text
|
|
| 4 |
tags:
|
| 5 |
- minicpm-v
|
| 6 |
- multimodal
|
|
|
|
| 7 |
- mlx
|
| 8 |
library_name: mlx
|
| 9 |
base_model: openbmb/MiniCPM-V-4.6
|
|
@@ -12,7 +13,7 @@ base_model: openbmb/MiniCPM-V-4.6
|
|
| 12 |
# mlx-community/MiniCPM-V-4.6-bf16
|
| 13 |
|
| 14 |
This model was converted to MLX format from [`openbmb/MiniCPM-V-4.6`](https://huggingface.co/openbmb/MiniCPM-V-4.6)
|
| 15 |
-
using mlx-vlm version **0.
|
| 16 |
Refer to the [original model card](https://huggingface.co/openbmb/MiniCPM-V-4.6) for more details on the model.
|
| 17 |
|
| 18 |
## Use with mlx
|
|
|
|
| 4 |
tags:
|
| 5 |
- minicpm-v
|
| 6 |
- multimodal
|
| 7 |
+
- On-Device Model
|
| 8 |
- mlx
|
| 9 |
library_name: mlx
|
| 10 |
base_model: openbmb/MiniCPM-V-4.6
|
|
|
|
| 13 |
# mlx-community/MiniCPM-V-4.6-bf16
|
| 14 |
|
| 15 |
This model was converted to MLX format from [`openbmb/MiniCPM-V-4.6`](https://huggingface.co/openbmb/MiniCPM-V-4.6)
|
| 16 |
+
using mlx-vlm version **0.5.0**.
|
| 17 |
Refer to the [original model card](https://huggingface.co/openbmb/MiniCPM-V-4.6) for more details on the model.
|
| 18 |
|
| 19 |
## Use with mlx
|
tokenizer_config.json
CHANGED
|
@@ -10,6 +10,7 @@
|
|
| 10 |
"errors": "replace",
|
| 11 |
"image_token": "<|image_pad|>",
|
| 12 |
"is_local": true,
|
|
|
|
| 13 |
"model_max_length": 262144,
|
| 14 |
"model_specific_special_tokens": {
|
| 15 |
"audio_bos_token": "<|audio_start|>",
|
|
|
|
| 10 |
"errors": "replace",
|
| 11 |
"image_token": "<|image_pad|>",
|
| 12 |
"is_local": true,
|
| 13 |
+
"local_files_only": false,
|
| 14 |
"model_max_length": 262144,
|
| 15 |
"model_specific_special_tokens": {
|
| 16 |
"audio_bos_token": "<|audio_start|>",
|