Instructions to use inclusionAI/Ling-plus with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use inclusionAI/Ling-plus with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="inclusionAI/Ling-plus", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("inclusionAI/Ling-plus", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use inclusionAI/Ling-plus with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "inclusionAI/Ling-plus" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "inclusionAI/Ling-plus", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/inclusionAI/Ling-plus
- SGLang
How to use inclusionAI/Ling-plus 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 "inclusionAI/Ling-plus" \ --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": "inclusionAI/Ling-plus", "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 "inclusionAI/Ling-plus" \ --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": "inclusionAI/Ling-plus", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use inclusionAI/Ling-plus with Docker Model Runner:
docker model run hf.co/inclusionAI/Ling-plus
Update config.json
Browse files- config.json +10 -5
config.json
CHANGED
|
@@ -21,13 +21,17 @@
|
|
| 21 |
"num_experts": 64,
|
| 22 |
"num_shared_experts": 1,
|
| 23 |
"norm_topk_prob": true,
|
| 24 |
-
"num_attention_heads":
|
| 25 |
"num_experts_per_tok": 4,
|
| 26 |
"num_hidden_layers": 88,
|
| 27 |
-
"num_key_value_heads":
|
| 28 |
"pretraining_tp": 1,
|
| 29 |
-
"rms_norm_eps": 1e-
|
| 30 |
-
"rope_scaling":
|
|
|
|
|
|
|
|
|
|
|
|
|
| 31 |
"rope_theta": 600000,
|
| 32 |
"tie_word_embeddings": false,
|
| 33 |
"torch_dtype": "bfloat16",
|
|
@@ -40,5 +44,6 @@
|
|
| 40 |
"embedding_dropout": 0.0,
|
| 41 |
"norm_head": true,
|
| 42 |
"norm_softmax": false,
|
| 43 |
-
"output_dropout": 0.0
|
|
|
|
| 44 |
}
|
|
|
|
| 21 |
"num_experts": 64,
|
| 22 |
"num_shared_experts": 1,
|
| 23 |
"norm_topk_prob": true,
|
| 24 |
+
"num_attention_heads": 56,
|
| 25 |
"num_experts_per_tok": 4,
|
| 26 |
"num_hidden_layers": 88,
|
| 27 |
+
"num_key_value_heads": 8,
|
| 28 |
"pretraining_tp": 1,
|
| 29 |
+
"rms_norm_eps": 1e-05,
|
| 30 |
+
"rope_scaling": {
|
| 31 |
+
"factor": 4.0,
|
| 32 |
+
"original_max_position_embeddings": 16384,
|
| 33 |
+
"type": "yarn"
|
| 34 |
+
},
|
| 35 |
"rope_theta": 600000,
|
| 36 |
"tie_word_embeddings": false,
|
| 37 |
"torch_dtype": "bfloat16",
|
|
|
|
| 44 |
"embedding_dropout": 0.0,
|
| 45 |
"norm_head": true,
|
| 46 |
"norm_softmax": false,
|
| 47 |
+
"output_dropout": 0.0,
|
| 48 |
+
"head_dim": 128
|
| 49 |
}
|