Instructions to use adityabhushannagar/MiniCPM-v-4.7-35B-A3B-Copy with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use adityabhushannagar/MiniCPM-v-4.7-35B-A3B-Copy with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="adityabhushannagar/MiniCPM-v-4.7-35B-A3B-Copy") 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)# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("adityabhushannagar/MiniCPM-v-4.7-35B-A3B-Copy") model = AutoModelForMultimodalLM.from_pretrained("adityabhushannagar/MiniCPM-v-4.7-35B-A3B-Copy", device_map="auto") 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?"} ] }, ] inputs = processor.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use adityabhushannagar/MiniCPM-v-4.7-35B-A3B-Copy with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "adityabhushannagar/MiniCPM-v-4.7-35B-A3B-Copy" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "adityabhushannagar/MiniCPM-v-4.7-35B-A3B-Copy", "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/adityabhushannagar/MiniCPM-v-4.7-35B-A3B-Copy
- SGLang
How to use adityabhushannagar/MiniCPM-v-4.7-35B-A3B-Copy 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 "adityabhushannagar/MiniCPM-v-4.7-35B-A3B-Copy" \ --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": "adityabhushannagar/MiniCPM-v-4.7-35B-A3B-Copy", "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 "adityabhushannagar/MiniCPM-v-4.7-35B-A3B-Copy" \ --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": "adityabhushannagar/MiniCPM-v-4.7-35B-A3B-Copy", "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 adityabhushannagar/MiniCPM-v-4.7-35B-A3B-Copy with Docker Model Runner:
docker model run hf.co/adityabhushannagar/MiniCPM-v-4.7-35B-A3B-Copy
MiniCPM-V-4.7-35B-A3B
Mirror of OpenBMB/MiniCPM-V-4.7-35B-A3B from ModelScope. This is an unofficial copy. The source README is only a ModelScope stub with no model card, so everything below was read from the config files in this repo.
Integrity: all 27 files match the ModelScope source. The 16 weight shards and tokenizer.json were compared by SHA-256, and the other files byte-for-byte. All 1,152 tensors in the index are present in the shards.
Summary
| Architecture | MiniCPMV4_7ForConditionalGeneration (minicpmv4_7) |
| Parameters | 35.2B total (BF16), about 3B active per token (MoE) |
| Inputs | text, image, video |
| Output | text |
| Audio | not supported (audio tokens are defined in the tokenizer, but there is no audio encoder in the weights) |
| Context | 262,144 tokens. No YaRN or other extension is configured |
Architecture
- Language model:
qwen3_5_moe_text, 40 layers, hidden size 2048. Linear-attention layers alternate with periodic full-attention layers. 256 experts, 8 active per token. - Vision tower: 27 layers, hidden size 1152, input 980 px, patch size 14.
- Projector:
model.merger, with 16x downsampling of vision tokens (downsample_mode: 16x). - Images: large images are split into up to 9 slices (
max_slice_nums: 9). Normalization uses mean and std of 0.5. - Positions: interleaved M-RoPE (
mrope_mode: canvas),rope_theta1e7. - Special tokens:
<|image_pad|>(id 248056),<|video_pad|>(id 248057),<image>/</image>,<slice>/</slice>.
Weight groups in the index: language model 692 tensors, vision tower 453, merger 6, lm_head 1.
Usage
Generation defaults (generation_config.json): temperature=1.0, top_k=20, top_p=0.95.
This repo has no custom .py files, but preprocessor_config.json references image_processing_minicpmv4_7.py, video_processing_minicpmv4_7.py and processing_minicpmv4_7.py through auto_map. The ModelScope source doesn't include them either. You will need a transformers release that supports minicpmv4_7 natively, or the code files from OpenBMB's GitHub.
from transformers import AutoModelForImageTextToText, AutoProcessor
repo = "adityabhushannagar/MiniCPM-V-4.7-35B-A3B"
processor = AutoProcessor.from_pretrained(repo, trust_remote_code=True)
model = AutoModelForImageTextToText.from_pretrained(
repo, dtype="bfloat16", device_map="auto", trust_remote_code=True
)
This snippet is untested. It depends on the processor code being available as described above.
Notes
- No benchmarks or license text were published with the source files, and none are claimed here. The license is marked
other, so check OpenBMB's terms before any use. - Weights occupy about 70.4 GB across 16 safetensors shards.
Source
Original release: OpenBMB, via ModelScope. See the OpenBMB organization for official model cards of related MiniCPM-V releases.
- Downloads last month
- 79