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)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("openbmb/MiniCPM-SALA", trust_remote_code=True, dtype="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
File size: 2,397 Bytes
6c071d2 85b2dbe 6c071d2 | 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 | {
"_name_or_path": "openbmb/MiniCPM-SALA",
"architectures": [
"MiniCPMSALAForCausalLM"
],
"attention_bias": false,
"attention_dropout": 0.0,
"attn_use_rope": false,
"auto_map": {
"AutoConfig": "configuration_minicpm_sala.MiniCPMSALAConfig",
"AutoModel": "modeling_minicpm_sala.MiniCPMSALAModel",
"AutoModelForCausalLM": "modeling_minicpm_sala.MiniCPMSALAForCausalLM",
"AutoModelForSeq2SeqLM": "modeling_minicpm_sala.MiniCPMSALAForCausalLM",
"AutoModelForSequenceClassification": "modeling_minicpm_sala.MiniCPMSALAForSequenceClassification"
},
"bos_token_id": 1,
"eos_token_id": [
2,
73440
],
"pad_token_id": 2,
"head_dim": 128,
"hidden_act": "silu",
"hidden_size": 4096,
"initializer_range": 0.1,
"intermediate_size": 16384,
"lightning_head_dim": 128,
"lightning_nh": 32,
"lightning_nkv": 32,
"lightning_scale": "1/sqrt(d)",
"lightning_use_rope": true,
"max_position_embeddings": 524288,
"model_type": "minicpm_sala",
"mixer_types": [
"minicpm4",
"lightning-attn",
"lightning-attn",
"lightning-attn",
"lightning-attn",
"lightning-attn",
"lightning-attn",
"lightning-attn",
"lightning-attn",
"minicpm4",
"lightning-attn",
"lightning-attn",
"lightning-attn",
"lightning-attn",
"lightning-attn",
"lightning-attn",
"minicpm4",
"minicpm4",
"lightning-attn",
"lightning-attn",
"lightning-attn",
"lightning-attn",
"minicpm4",
"lightning-attn",
"lightning-attn",
"lightning-attn",
"lightning-attn",
"lightning-attn",
"lightning-attn",
"minicpm4",
"minicpm4",
"minicpm4"
],
"sparse_config": {
"kernel_size": 32,
"kernel_stride": 16,
"init_blocks": 1,
"block_size": 64,
"window_size": 2048,
"topk": 64,
"use_nope": false,
"dense_len": 8192
},
"num_attention_heads": 32,
"num_hidden_layers": 32,
"num_key_value_heads": 2,
"qk_norm": true,
"rand_init": false,
"rms_norm_eps": 1e-06,
"torch_dtype": "bfloat16",
"dtype": "bfloat16",
"transformers_version": "4.56.0",
"use_cache": true,
"vocab_size": 73448,
"rope_theta": 10000.0,
"scale_emb": 12,
"scale_depth": 1.4,
"mup_denominator": 32,
"dim_model_base": 256,
"tie_word_embeddings": false,
"use_output_gate": true,
"use_output_norm": true,
"attn_use_output_gate": true
} |