Image-Text-to-Text
Transformers
Safetensors
English
minicpmo
feature-extraction
minicpm
omni
multimodal
audio
vision
tts
quantized
int8
INT8
w8a16
compressed-tensors
vllm
text-generation
conversational
8-bit precision
ptq
llmcompressor
sglang
text-generation-inference
88plug
post-training-quantization
vlm
image
custom_code
Instructions to use 88plug/MiniCPM-o-4.5-W8A16 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use 88plug/MiniCPM-o-4.5-W8A16 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="88plug/MiniCPM-o-4.5-W8A16", trust_remote_code=True) messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("88plug/MiniCPM-o-4.5-W8A16", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use 88plug/MiniCPM-o-4.5-W8A16 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "88plug/MiniCPM-o-4.5-W8A16" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "88plug/MiniCPM-o-4.5-W8A16", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/88plug/MiniCPM-o-4.5-W8A16
- SGLang
How to use 88plug/MiniCPM-o-4.5-W8A16 with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "88plug/MiniCPM-o-4.5-W8A16" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "88plug/MiniCPM-o-4.5-W8A16", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "88plug/MiniCPM-o-4.5-W8A16" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "88plug/MiniCPM-o-4.5-W8A16", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }' - Docker Model Runner
How to use 88plug/MiniCPM-o-4.5-W8A16 with Docker Model Runner:
docker model run hf.co/88plug/MiniCPM-o-4.5-W8A16
P15: add processor_config.json (parity with W4; multimodal processor load)
Browse files- processor_config.json +102 -0
processor_config.json
ADDED
|
@@ -0,0 +1,102 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"audio_processor": {
|
| 3 |
+
"audio_pool_step": 5,
|
| 4 |
+
"auto_map": {
|
| 5 |
+
"AutoFeatureExtractor": "processing_minicpmo.MiniCPMAAudioProcessor",
|
| 6 |
+
"AutoImageProcessor": "processing_minicpmo.MiniCPMVImageProcessor",
|
| 7 |
+
"AutoProcessor": "processing_minicpmo.MiniCPMOProcessor"
|
| 8 |
+
},
|
| 9 |
+
"chunk_length": 30,
|
| 10 |
+
"dither": 0.0,
|
| 11 |
+
"dynamic_log_norm": true,
|
| 12 |
+
"dynamic_range_db": 8.0,
|
| 13 |
+
"feature_extractor_type": "MiniCPMAAudioProcessor",
|
| 14 |
+
"feature_size": 80,
|
| 15 |
+
"hop_length": 160,
|
| 16 |
+
"im_end": "</image>",
|
| 17 |
+
"im_id_end": "</image_id>",
|
| 18 |
+
"im_id_start": "<image_id>",
|
| 19 |
+
"im_start": "<image>",
|
| 20 |
+
"image_feature_size": 64,
|
| 21 |
+
"image_processor_type": "MiniCPMVImageProcessor",
|
| 22 |
+
"log_floor_db": -10.0,
|
| 23 |
+
"max_slice_nums": 9,
|
| 24 |
+
"n_fft": 400,
|
| 25 |
+
"n_samples": 480000,
|
| 26 |
+
"nb_max_frames": 3000,
|
| 27 |
+
"norm_mean": [
|
| 28 |
+
0.5,
|
| 29 |
+
0.5,
|
| 30 |
+
0.5
|
| 31 |
+
],
|
| 32 |
+
"norm_std": [
|
| 33 |
+
0.5,
|
| 34 |
+
0.5,
|
| 35 |
+
0.5
|
| 36 |
+
],
|
| 37 |
+
"padding_side": "right",
|
| 38 |
+
"padding_value": 0.0,
|
| 39 |
+
"patch_size": 14,
|
| 40 |
+
"return_attention_mask": false,
|
| 41 |
+
"sampling_rate": 16000,
|
| 42 |
+
"scale_resolution": 448,
|
| 43 |
+
"slice_end": "</slice>",
|
| 44 |
+
"slice_mode": true,
|
| 45 |
+
"slice_start": "<slice>",
|
| 46 |
+
"unk": "<unk>",
|
| 47 |
+
"use_image_id": true,
|
| 48 |
+
"version": 4.5
|
| 49 |
+
},
|
| 50 |
+
"auto_map": {
|
| 51 |
+
"AutoProcessor": "processing_minicpmo.MiniCPMOProcessor"
|
| 52 |
+
},
|
| 53 |
+
"image_processor": {
|
| 54 |
+
"audio_pool_step": 5,
|
| 55 |
+
"auto_map": {
|
| 56 |
+
"AutoFeatureExtractor": "processing_minicpmo.MiniCPMAAudioProcessor",
|
| 57 |
+
"AutoImageProcessor": "processing_minicpmo.MiniCPMVImageProcessor",
|
| 58 |
+
"AutoProcessor": "processing_minicpmo.MiniCPMOProcessor"
|
| 59 |
+
},
|
| 60 |
+
"im_end": "</image>",
|
| 61 |
+
"im_end_token": "</image>",
|
| 62 |
+
"im_id_end": "</image_id>",
|
| 63 |
+
"im_id_start": "<image_id>",
|
| 64 |
+
"im_start": "<image>",
|
| 65 |
+
"im_start_token": "<image>",
|
| 66 |
+
"image_feature_size": 64,
|
| 67 |
+
"image_processor_type": "MiniCPMVImageProcessor",
|
| 68 |
+
"max_slice_nums": 9,
|
| 69 |
+
"mean": [
|
| 70 |
+
0.5,
|
| 71 |
+
0.5,
|
| 72 |
+
0.5
|
| 73 |
+
],
|
| 74 |
+
"norm_mean": [
|
| 75 |
+
0.5,
|
| 76 |
+
0.5,
|
| 77 |
+
0.5
|
| 78 |
+
],
|
| 79 |
+
"norm_std": [
|
| 80 |
+
0.5,
|
| 81 |
+
0.5,
|
| 82 |
+
0.5
|
| 83 |
+
],
|
| 84 |
+
"patch_size": 14,
|
| 85 |
+
"scale_resolution": 448,
|
| 86 |
+
"slice_end": "</slice>",
|
| 87 |
+
"slice_end_token": "</slice>",
|
| 88 |
+
"slice_mode": true,
|
| 89 |
+
"slice_start": "<slice>",
|
| 90 |
+
"slice_start_token": "<slice>",
|
| 91 |
+
"std": [
|
| 92 |
+
0.5,
|
| 93 |
+
0.5,
|
| 94 |
+
0.5
|
| 95 |
+
],
|
| 96 |
+
"unk": "<unk>",
|
| 97 |
+
"unk_token": "<unk>",
|
| 98 |
+
"use_image_id": true,
|
| 99 |
+
"version": 4.5
|
| 100 |
+
},
|
| 101 |
+
"processor_class": "MiniCPMOProcessor"
|
| 102 |
+
}
|