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
Download reference.json from yeasah/MiniCPM5-2B-exl3: direct link, hf CLI and curl.
- Browser
- Download file 3.06 kB
-
https://huggingface.co/yeasah/MiniCPM5-2B-exl3/resolve/main/reference.json
- Command line
-
hf download hf://yeasah/MiniCPM5-2B-exl3/reference.json
-
curl -L -o reference.json https://huggingface.co/yeasah/MiniCPM5-2B-exl3/resolve/main/reference.json
3.06 kB
| { | |
| "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 | |
| } | |
| } | |
| } |