Hugging Face's logo Hugging Face
  • Models
  • Datasets
  • Spaces
  • Buckets new
  • Docs
  • Enterprise
  • Pricing

  • Log In
  • Sign Up

openbmb
/
MiniCPM3-4B-GPTQ-Int4

Text Generation
Safetensors
Chinese
English
minicpm3
conversational
custom_code
4-bit precision
gptq
Model card Files Files and versions
xet
Community
1

Instructions to use openbmb/MiniCPM3-4B-GPTQ-Int4 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.

  • Local Apps
  • vLLM

    How to use openbmb/MiniCPM3-4B-GPTQ-Int4 with vLLM:

    Install from pip and serve model
    # Install vLLM from pip:
    pip install vllm
    # Start the vLLM server:
    vllm serve "openbmb/MiniCPM3-4B-GPTQ-Int4"
    # Call the server using curl (OpenAI-compatible API):
    curl -X POST "http://localhost:8000/v1/chat/completions" \
    	-H "Content-Type: application/json" \
    	--data '{
    		"model": "openbmb/MiniCPM3-4B-GPTQ-Int4",
    		"messages": [
    			{
    				"role": "user",
    				"content": "What is the capital of France?"
    			}
    		]
    	}'
    Use Docker
    docker model run hf.co/openbmb/MiniCPM3-4B-GPTQ-Int4
  • SGLang

    How to use openbmb/MiniCPM3-4B-GPTQ-Int4 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 "openbmb/MiniCPM3-4B-GPTQ-Int4" \
        --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": "openbmb/MiniCPM3-4B-GPTQ-Int4",
    		"messages": [
    			{
    				"role": "user",
    				"content": "What is the capital of France?"
    			}
    		]
    	}'
    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 "openbmb/MiniCPM3-4B-GPTQ-Int4" \
            --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": "openbmb/MiniCPM3-4B-GPTQ-Int4",
    		"messages": [
    			{
    				"role": "user",
    				"content": "What is the capital of France?"
    			}
    		]
    	}'
  • Docker Model Runner

    How to use openbmb/MiniCPM3-4B-GPTQ-Int4 with Docker Model Runner:

    docker model run hf.co/openbmb/MiniCPM3-4B-GPTQ-Int4
MiniCPM3-4B-GPTQ-Int4
Ctrl+K
Ctrl+K
  • 3 contributors
History: 28 commits
RanchiZhao's picture
RanchiZhao
Upload model.safetensors
4fc73a8 verified over 1 year ago
  • .gitattributes
    1.52 kB
    initial commit over 1 year ago
  • README.md
    8.69 kB
    Update README.md over 1 year ago
  • added_tokens.json
    216 Bytes
    Upload 10 files over 1 year ago
  • config.json
    2.92 kB
    Update config.json over 1 year ago
  • configuration_minicpm.py
    9.22 kB
    Update configuration_minicpm.py over 1 year ago
  • generation_config.json
    122 Bytes
    Upload 10 files over 1 year ago
  • model.safetensors
    2.4 GB
    xet
    Upload model.safetensors over 1 year ago
  • modeling_minicpm.py
    71.8 kB
    Update modeling_minicpm.py over 1 year ago
  • quantize_config.json
    287 Bytes
    Upload 10 files over 1 year ago
  • special_tokens_map.json
    1.63 kB
    Upload 10 files over 1 year ago
  • tokenization_minicpm.py
    17.9 kB
    Update tokenization_minicpm.py over 1 year ago
  • tokenizer.json
    3.68 MB
    Upload 10 files over 1 year ago
  • tokenizer.model
    1.18 MB
    xet
    Upload 10 files over 1 year ago
  • tokenizer_config.json
    2.9 kB
    Update tokenizer_config.json over 1 year ago