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 +2 -6
config.json
CHANGED
|
@@ -15,7 +15,7 @@
|
|
| 15 |
"hidden_size": 5376,
|
| 16 |
"initializer_range": 0.006,
|
| 17 |
"intermediate_size": 12288,
|
| 18 |
-
"max_position_embeddings":
|
| 19 |
"model_type": "bailing_moe",
|
| 20 |
"moe_intermediate_size": 3072,
|
| 21 |
"num_experts": 64,
|
|
@@ -27,11 +27,7 @@
|
|
| 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",
|
|
|
|
| 15 |
"hidden_size": 5376,
|
| 16 |
"initializer_range": 0.006,
|
| 17 |
"intermediate_size": 12288,
|
| 18 |
+
"max_position_embeddings": 16384,
|
| 19 |
"model_type": "bailing_moe",
|
| 20 |
"moe_intermediate_size": 3072,
|
| 21 |
"num_experts": 64,
|
|
|
|
| 27 |
"num_key_value_heads": 8,
|
| 28 |
"pretraining_tp": 1,
|
| 29 |
"rms_norm_eps": 1e-05,
|
| 30 |
+
"rope_scaling": null,
|
|
|
|
|
|
|
|
|
|
|
|
|
| 31 |
"rope_theta": 600000,
|
| 32 |
"tie_word_embeddings": false,
|
| 33 |
"torch_dtype": "bfloat16",
|