Instructions to use openbmb/MiniCPM-SALA with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use openbmb/MiniCPM-SALA with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="openbmb/MiniCPM-SALA", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("openbmb/MiniCPM-SALA", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use openbmb/MiniCPM-SALA with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "openbmb/MiniCPM-SALA" # 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/MiniCPM-SALA", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/openbmb/MiniCPM-SALA
- SGLang
How to use openbmb/MiniCPM-SALA 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/MiniCPM-SALA" \ --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/MiniCPM-SALA", "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/MiniCPM-SALA" \ --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/MiniCPM-SALA", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use openbmb/MiniCPM-SALA with Docker Model Runner:
docker model run hf.co/openbmb/MiniCPM-SALA
Commit History
-
Fix _init_rope compatibility with transformers >= 5.x rope_scaling standardization
Verified signature## Problem Starting from transformers 4.43+, `AutoConfig` automatically standardizes a missing or `None` `rope_scaling` to `{"rope_type": "default", "factor": 1.0}` during config initialization. MiniCPM-SALA's `_init_rope()` only handles `None`, `"linear"`, `"dynamic"`, and `"longrope"` — encountering `"default"` causes: ``` ValueError: Unknown RoPE scaling type default ``` This is triggered when loading MiniCPM-SALA via any library that depends on transformers >= 5.x (e.g. GPTQModel 7.0.0 pulls in transformers 5.8.0), even though the model does not use RoPE scaling (`config.json` has no `rope_scaling` field). ## Changes Modified both `_init_rope()` methods in `modeling_minicpm_sala.py` (`MiniCPMInfLLMv2Attention` at line 879 and `MiniCPMSALAMLA` at line 2144): - Treat `rope_scaling` of `None` or `scaling_type in (None, "default")` as no-scaling, falling through to the standard `MiniCPMRotaryEmbedding`. - Support both legacy `"type"` key and new `"rope_type"` key for cross-versio…f28de5e
-
fix bos
Verified signaturefd29bab
-
Update README.md
Verified signature42afc22 -
Update transformers version
Verified signatureUpdate transformers version to 4.56.085b2dbe -
add citation
552d370 -
update readme
9e629ea -
update readme
4169e9a -
update readme
b4d7b0e -
Upload folder using huggingface_hub
Verified signature6c071d2 -
initial commit
Verified signature1fe5735