Hugging Face's logo Hugging Face
  • Models
  • Datasets
  • Spaces
  • Buckets new
  • Docs
  • Enterprise
  • Pricing
    • Website
      • Tasks
      • HuggingChat
      • Collections
      • Languages
      • Organizations
    • Community
      • Blog
      • Posts
      • Daily Papers
      • Learn
      • Discord
      • Forum
      • GitHub
    • Solutions
      • Team & Enterprise
      • Hugging Face PRO
      • Enterprise Support
      • Inference Providers
      • Inference Endpoints
      • Storage Buckets

  • Log In
  • Sign Up

AXERA-TECH
/
MiniCPM-V-4

Image-Text-to-Text
Transformers
Safetensors
Chinese
English
MiniCPM
MiniCPM-V-4
Model card Files Files and versions
xet
Community

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")
    # Load model directly
    from transformers import AutoModel
    model = AutoModel.from_pretrained("AXERA-TECH/MiniCPM-V-4", dtype="auto")
  • Notebooks
  • Google Colab
  • Kaggle
  • Local Apps
  • 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
MiniCPM-V-4
5.15 GB
Ctrl+K
Ctrl+K
  • 2 contributors
History: 17 commits
qqc1989's picture
qqc1989
Upload config.json
b7e4aae verified 8 months ago
  • minicpm-v-4_axmodel
    Upload folder using huggingface_hub 8 months ago
  • minicpmv4_tokenizer
    Upload folder using huggingface_hub 8 months ago
  • .gitattributes
    6.78 kB
    Upload folder using huggingface_hub 8 months ago
  • README.md
    1.68 kB
    Create README.md 8 months ago
  • config.json
    0 Bytes
    Upload config.json 8 months ago
  • embed_tokens.pth

    Detected Pickle imports (6)

    • "torch._utils._rebuild_tensor_v2",
    • "torch.FloatStorage",
    • "collections.OrderedDict",
    • "__builtin__.set",
    • "torch.nn.modules.sparse.Embedding",
    • "torch._utils._rebuild_parameter"

    How to fix it?

    752 MB
    xet
    Upload folder using huggingface_hub 8 months ago
  • resampler.axmodel
    38.3 MB
    xet
    Upload folder using huggingface_hub 8 months ago
  • run_axmodel.py
    21 kB
    Upload folder using huggingface_hub 8 months ago
  • show_demo.jpg
    102 kB
    xet
    Upload folder using huggingface_hub 8 months ago
  • siglip.axmodel
    533 MB
    xet
    Upload folder using huggingface_hub 8 months ago