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

openbmb
/
MiniCPM5-1B

Text Generation
Transformers
Safetensors
English
Chinese
minicpm
minicpm5
llama
long-context
tool-calling
on-device
edge-ai
Model card Files Files and versions
xet
Community
5

Instructions to use openbmb/MiniCPM5-1B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.

  • Libraries
  • Transformers

    How to use openbmb/MiniCPM5-1B with Transformers:

    # Use a pipeline as a high-level helper
    from transformers import pipeline
    
    pipe = pipeline("text-generation", model="openbmb/MiniCPM5-1B")
    # Load model directly
    from transformers import AutoModel
    model = AutoModel.from_pretrained("openbmb/MiniCPM5-1B", dtype="auto")
  • Notebooks
  • Google Colab
  • Kaggle
  • Local Apps
  • vLLM

    How to use openbmb/MiniCPM5-1B with vLLM:

    Install from pip and serve model
    # Install vLLM from pip:
    pip install vllm
    # Start the vLLM server:
    vllm serve "openbmb/MiniCPM5-1B"
    # Call the server using curl (OpenAI-compatible API):
    curl -X POST "http://localhost:8000/v1/completions" \
    	-H "Content-Type: application/json" \
    	--data '{
    		"model": "openbmb/MiniCPM5-1B",
    		"prompt": "Once upon a time,",
    		"max_tokens": 512,
    		"temperature": 0.5
    	}'
    Use Docker
    docker model run hf.co/openbmb/MiniCPM5-1B
  • SGLang

    How to use openbmb/MiniCPM5-1B 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/MiniCPM5-1B" \
        --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": "openbmb/MiniCPM5-1B",
    		"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 "openbmb/MiniCPM5-1B" \
            --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": "openbmb/MiniCPM5-1B",
    		"prompt": "Once upon a time,",
    		"max_tokens": 512,
    		"temperature": 0.5
    	}'
  • Docker Model Runner

    How to use openbmb/MiniCPM5-1B with Docker Model Runner:

    docker model run hf.co/openbmb/MiniCPM5-1B
MiniCPM5-1B
2.17 GB
Ctrl+K
Ctrl+K
  • 3 contributors
History: 29 commits
georgethrax's picture
georgethrax
Update README-cn.md
4e9de7a verified about 11 hours ago
  • .gitattributes
    1.52 kB
    initial commit 5 days ago
  • README-cn.md
    22 kB
    Update README-cn.md about 11 hours ago
  • README.md
    23.4 kB
    Update README.md about 11 hours ago
  • chat_template.jinja
    9.06 kB
    init commit 3 days ago
  • config.json
    726 Bytes
    Fix config _name_or_path to openbmb/MiniCPM5-1B 2 days ago
  • generation_config.json
    213 Bytes
    Bump transformers_version to 5.6.2 3 days ago
  • model-00000-of-00001.safetensors
    2.16 GB
    xet
    init commit 3 days ago
  • model.safetensors.index.json
    18 kB
    init commit 3 days ago
  • special_tokens_map.json
    551 Bytes
    init commit 3 days ago
  • tokenizer.json
    9.89 MB
    init commit 3 days ago
  • tokenizer_config.json
    94.4 kB
    Bump transformers_version to 5.6.2 3 days ago