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
      • Hardware
      • Learn
      • Discord
      • Forum
      • GitHub
    • Solutions
      • Team & Enterprise
      • Hugging Face PRO
      • Enterprise Support
      • Inference Providers
      • Inference Endpoints
      • Storage Buckets

  • Log In
  • Sign Up

Duplicated from  openbmb/MiniCPM5-2B-GGUF

Megarex
/
MiniCPM5-2B-GGUF

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

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

  • Libraries
  • Transformers

    How to use Megarex/MiniCPM5-2B-GGUF with Transformers:

    # Use a pipeline as a high-level helper
    from transformers import pipeline
    
    pipe = pipeline("text-generation", model="Megarex/MiniCPM5-2B-GGUF")
    # pip install -U transformers accelerate
    # Load model directly
    from transformers import AutoModel
    model = AutoModel.from_pretrained("Megarex/MiniCPM5-2B-GGUF", device_map="auto")
  • Notebooks
  • Google Colab
  • Kaggle
  • Local Apps Settings
  • vLLM

    How to use Megarex/MiniCPM5-2B-GGUF with vLLM:

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

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

    How to use Megarex/MiniCPM5-2B-GGUF with Docker Model Runner:

    docker model run hf.co/Megarex/MiniCPM5-2B-GGUF
MiniCPM5-2B-GGUF
9.39 GB
Ctrl+K
Ctrl+K
  • 3 contributors
History: 14 commits
Megarex's picture
Megarex
add imatrix-quantized models and imatrix
6a5d298 10 days ago
  • assets
    add assets 10 days ago
  • .gitattributes
    1.83 kB
    update readme and gitattributes 10 days ago
  • MiniCPM5-2B-IQ3_M.gguf
    1.23 GB
    xet
    add imatrix-quantized models and imatrix 10 days ago
  • MiniCPM5-2B-IQ4_XS.gguf
    1.42 GB
    xet
    add imatrix-quantized models and imatrix 10 days ago
  • MiniCPM5-2B-Q3_K_M.gguf
    1.29 GB
    xet
    add imatrix-quantized models and imatrix 10 days ago
  • MiniCPM5-2B-Q4_K_M.gguf
    1.56 GB
    xet
    update gitattributes and update/remove base models 10 days ago
  • MiniCPM5-2B-Q5_K_M.gguf
    1.81 GB
    xet
    add imatrix-quantized models and imatrix 10 days ago
  • MiniCPM5-2B-Q6_K.gguf
    2.07 GB
    xet
    add imatrix-quantized models and imatrix 10 days ago
  • README-cn.md
    110 kB
    Enhance README with sampling parameter recommendations and Llama.cpp usage examples about 1 month ago
  • README.md
    113 kB
    update readme and gitattributes 10 days ago
  • imatrix.gguf
    6.29 MB
    xet
    add imatrix-quantized models and imatrix 10 days ago