Text Generation
Transformers
English
Chinese
minicpm
minicpm5
llama
long-context
tool-calling
on-device
edge-ai
exl3
Instructions to use yeasah/MiniCPM5-2B-exl3 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use yeasah/MiniCPM5-2B-exl3 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="yeasah/MiniCPM5-2B-exl3")# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("yeasah/MiniCPM5-2B-exl3", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use yeasah/MiniCPM5-2B-exl3 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "yeasah/MiniCPM5-2B-exl3" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "yeasah/MiniCPM5-2B-exl3", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/yeasah/MiniCPM5-2B-exl3
- SGLang
How to use yeasah/MiniCPM5-2B-exl3 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 "yeasah/MiniCPM5-2B-exl3" \ --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": "yeasah/MiniCPM5-2B-exl3", "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 "yeasah/MiniCPM5-2B-exl3" \ --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": "yeasah/MiniCPM5-2B-exl3", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use yeasah/MiniCPM5-2B-exl3 with Docker Model Runner:
docker model run hf.co/yeasah/MiniCPM5-2B-exl3
File size: 3,064 Bytes
128f2b7 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 | {
"references": [
{
"repo": "bartowski/MiniCPM5-2B-GGUF",
"type": "gguf",
"ladders": {
"GGUF": {
"IQ2_M": "hf:bartowski/MiniCPM5-2B-GGUF@31fee0334c4ed9f1e079afe586ba30cb83e0f883/MiniCPM5-2B-IQ2_M.gguf",
"IQ3_XXS": "hf:bartowski/MiniCPM5-2B-GGUF@31fee0334c4ed9f1e079afe586ba30cb83e0f883/MiniCPM5-2B-IQ3_XXS.gguf",
"IQ3_M": "hf:bartowski/MiniCPM5-2B-GGUF@31fee0334c4ed9f1e079afe586ba30cb83e0f883/MiniCPM5-2B-IQ3_M.gguf",
"IQ4_XS": "hf:bartowski/MiniCPM5-2B-GGUF@31fee0334c4ed9f1e079afe586ba30cb83e0f883/MiniCPM5-2B-IQ4_XS.gguf",
"Q4_K_M": "hf:bartowski/MiniCPM5-2B-GGUF@31fee0334c4ed9f1e079afe586ba30cb83e0f883/MiniCPM5-2B-Q4_K_M.gguf",
"Q5_K_M": "hf:bartowski/MiniCPM5-2B-GGUF@31fee0334c4ed9f1e079afe586ba30cb83e0f883/MiniCPM5-2B-Q5_K_M.gguf"
}
}
}
],
"baseline": {
"3.00bpw-H5": "work/MiniCPM5-2B-exl3/_baseline/3.00bpw-H5",
"3.50bpw-H5": "work/MiniCPM5-2B-exl3/_baseline/3.50bpw-H5",
"4.00bpw": "work/MiniCPM5-2B-exl3/_baseline/4.00bpw",
"5.00bpw": "work/MiniCPM5-2B-exl3/_baseline/5.00bpw",
"6.00bpw": "work/MiniCPM5-2B-exl3/_baseline/6.00bpw"
},
"sizes": {
"ref:bartowski/MiniCPM5-2B-GGUF@IQ2_M": {
"total": 964608000,
"embed": 114892800,
"encoder": 0,
"head": 150405120,
"mtp": 0,
"bits": 2.82,
"head_bits": 4.5
},
"ref:bartowski/MiniCPM5-2B-GGUF@IQ3_XXS": {
"total": 1138696192,
"embed": 150405120,
"encoder": 0,
"head": 150405120,
"mtp": 0,
"bits": 3.38,
"head_bits": 4.5
},
"ref:bartowski/MiniCPM5-2B-GGUF@IQ3_M": {
"total": 1357586432,
"embed": 150405120,
"encoder": 0,
"head": 150405120,
"mtp": 0,
"bits": 4.26,
"head_bits": 4.5
},
"ref:bartowski/MiniCPM5-2B-GGUF@IQ4_XS": {
"total": 1458794496,
"embed": 142049280,
"encoder": 0,
"head": 219340800,
"mtp": 0,
"bits": 4.43,
"head_bits": 6.56
},
"ref:bartowski/MiniCPM5-2B-GGUF@Q4_K_M": {
"total": 1610678272,
"embed": 150405120,
"encoder": 0,
"head": 219340800,
"mtp": 0,
"bits": 5.01,
"head_bits": 6.56
},
"ref:bartowski/MiniCPM5-2B-GGUF@Q5_K_M": {
"total": 1915027456,
"embed": 183828480,
"encoder": 0,
"head": 219340800,
"mtp": 0,
"bits": 6.1,
"head_bits": 6.56
},
"baseline:3.00bpw-H5": {
"total": 1049835676,
"embed": 135786496,
"encoder": 0,
"head": 167382020,
"mtp": 0,
"bits": 3.0,
"head_bits": 5
},
"baseline:3.50bpw-H5": {
"total": 1173698716,
"embed": 135786496,
"encoder": 0,
"head": 167382020,
"mtp": 0,
"bits": 3.5,
"head_bits": 5
},
"baseline:4.00bpw": {
"total": 1330985116,
"embed": 135786496,
"encoder": 0,
"head": 200805380,
"mtp": 0,
"bits": 4.0,
"head_bits": 6
},
"baseline:5.00bpw": {
"total": 1612134556,
"embed": 169209856,
"encoder": 0,
"head": 200805380,
"mtp": 0,
"bits": 5.0,
"head_bits": 6
},
"baseline:6.00bpw": {
"total": 1859860636,
"embed": 169209856,
"encoder": 0,
"head": 200805380,
"mtp": 0,
"bits": 6.0,
"head_bits": 6
}
}
} |