Instructions to use AXERA-TECH/MiniCPM-V-4 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use AXERA-TECH/MiniCPM-V-4 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="AXERA-TECH/MiniCPM-V-4")# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("AXERA-TECH/MiniCPM-V-4", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use AXERA-TECH/MiniCPM-V-4 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "AXERA-TECH/MiniCPM-V-4" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "AXERA-TECH/MiniCPM-V-4", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/AXERA-TECH/MiniCPM-V-4
- SGLang
How to use AXERA-TECH/MiniCPM-V-4 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 "AXERA-TECH/MiniCPM-V-4" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "AXERA-TECH/MiniCPM-V-4", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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 "AXERA-TECH/MiniCPM-V-4" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "AXERA-TECH/MiniCPM-V-4", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use AXERA-TECH/MiniCPM-V-4 with Docker Model Runner:
docker model run hf.co/AXERA-TECH/MiniCPM-V-4
Commit History
-
Upload config.json
Verified signatureb7e4aae
-
Delete llama_post.axmodel
Verified signatureccdf44f -
Create README.md
Verified signature8605312 -
Upload folder using huggingface_hub
Verified signature7d5a619 -
Delete llama_post.axmodel
Verified signatureeb5f323 -
Add files using upload-large-folder tool
Verified signature9764e0e -
Upload folder using huggingface_hub
Verified signatureef6a6f4 -
Delete files *.py with huggingface_hub
Verified signature921b0e2 -
Delete files *cpmv.py with huggingface_hub
Verified signatureb71f8af -
Delete files m*.py with huggingface_hub
Verified signature4afec3a -
Delete files resampler.py with huggingface_hub
Verified signaturee8121a6 -
Delete files *.json with huggingface_hub
Verified signature5990989 -
Upload folder using huggingface_hub
Verified signature964a1c2 -
Delete files *.axmodel with huggingface_hub
Verified signature004d817 -
Upload resampler.axmodel with huggingface_hub
Verified signaturec272925 -
Upload folder using huggingface_hub
Verified signaturecd0f6d2 -
initial commit
Verified signature055ac9c