Update README.md
Browse files
README.md
CHANGED
|
@@ -1,200 +1,81 @@
|
|
| 1 |
---
|
| 2 |
license: mit
|
| 3 |
---
|
|
|
|
| 4 |
<p align="center">
|
| 5 |
<img src="https://mdn.alipayobjects.com/huamei_qa8qxu/afts/img/A*4QxcQrBlTiAAAAAAQXAAAAgAemJ7AQ/original" width="100"/>
|
| 6 |
</p>
|
| 7 |
<p align="center">🤗 <a href="https://huggingface.co/inclusionAI">Hugging Face</a> | 🤖 <a href="https://modelscope.cn/organization/inclusionAI">ModelScope </a> | 🐙 <a href="https://openrouter.ai/inclusionai/ling-3.0-tiny:free">OpenRouter </a> </p>
|
| 8 |
|
| 9 |
-
# Introduction
|
| 10 |
-
We
|
| 11 |
-
It is designed to deliver strong reasoning and agentic capabilities at low inference cost, making advanced model capabilities more accessible for local and resource-constrained deployment.
|
| 12 |
-
BF16, FP8, and INT4 weights are provided for a wide range of hardware and deployment settings.
|
| 13 |
-
|
| 14 |
-
Key highlights of the model are summarized below:
|
| 15 |
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
|
|
|
| 19 |
|
| 20 |
-
# Model Overview
|
| 21 |
-
Ling-3.0-tiny inherits the hybrid linear attation architecture of Ling-3.0 series, while being specifically optimized for lightweight and accessible deployment. The model has 7.9B total parameters, with only 1.3B parameters activated per token.
|
| 22 |
|
| 23 |
-
|
|
|
|
| 24 |
|
| 25 |
-
+
|
| 26 |
-
+
|
| 27 |
-
+
|
| 28 |
|
| 29 |
-
|
| 30 |
|
| 31 |
-
|
| 32 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 33 |
|
| 34 |
-
# Evaluation
|
| 35 |
-
We evaluated Ling-3.0-tiny across agentic tasks, coding, long-context understanding, knowledge reliability, mathematical and scientific reasoning, and instruction following.
|
| 36 |
-
Ling-3.0-tiny achieves a score of **25** on the Artificial Analysis Intelligence Index v4.1.1 and **16** on the Artificial Analysis Agentic Index.
|
| 37 |
-
In Artificial Analysis testing, Ling-3.0-tiny reaches an output speed of over **160 tokens/s**, with approximately **18 seconds** of end-to-end latency for a 500-token response, including reasoning time.
|
| 38 |
-
These results highlight the model's efficiency relative to its 1.3B activated parameter footprint.
|
| 39 |
|
| 40 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 41 |
|
| 42 |
-

|
| 43 |
|
| 44 |
-
|
| 45 |
-
> + Terminal-Bench 2.1: Evaluated under the Artificial Analysis (AA) protocol using the default Terminus 2 harness, a unified 2-hour timeout, the provided JSON parser in preserve-thinking mode, and 3 runs per task (mean). Decoding uses temperature=1.0, max_new_tokens=32K, with a 256K context window.
|
| 46 |
|
| 47 |
-
#
|
| 48 |
-
|
| 49 |
-
The hardware- and recipe-specific launch matrix (BF16/FP8 × Low-Latency / High-Throughput / HiCache + Mooncake), with a live command generator and verified configurations, lives in the SGLang cookbook:
|
| 50 |
|
| 51 |
-
|
| 52 |
|
|
|
|
|
|
|
| 53 |
|
| 54 |
-
|
| 55 |
-
|
|
|
|
|
|
|
|
|
|
| 56 |
|
| 57 |
-
|
| 58 |
-
docker pull lmsysorg/sglang:dev-Ling-3.0-tiny
|
| 59 |
-
```
|
| 60 |
-
|
| 61 |
-
### Run Inference
|
| 62 |
-
Recommended low-latency recipe (built-in MTP / NEXTN, 256K YaRN context) on 1× 141GB-class GPU (H20-3e) or a 1-GPU Blackwell node:
|
| 63 |
-
|
| 64 |
-
**Server**
|
| 65 |
|
| 66 |
-
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
-e HF_TOKEN=<your-hf-token> \
|
| 70 |
-
lmsysorg/sglang:dev-Ling-3.0-tiny \
|
| 71 |
-
env SGLANG_ALLOW_OVERWRITE_LONGER_CONTEXT_LEN=1 \
|
| 72 |
-
python3 -m sglang.launch_server \
|
| 73 |
-
--model-path inclusionAI/Ling-3.0-tiny \
|
| 74 |
-
--tp 1 \
|
| 75 |
-
--json-model-override-args '{"rope_scaling":{"rope_type":"yarn","factor":2.0,"rope_theta":6000000,"partial_rotary_factor":0.5,"original_max_position_embeddings":131072}}' \
|
| 76 |
-
--context-length 262144 \
|
| 77 |
-
--speculative-algorithm NEXTN \
|
| 78 |
-
--mem-fraction-static 0.8 \
|
| 79 |
-
--host 0.0.0.0 \
|
| 80 |
-
--port 30000
|
| 81 |
-
```
|
| 82 |
|
| 83 |
-
|
|
|
|
| 84 |
|
| 85 |
-
|
|
|
|
| 86 |
|
| 87 |
-
|
| 88 |
-
|
| 89 |
-
-H "Content-Type: application/json" \
|
| 90 |
-
-d '{"model": "auto",
|
| 91 |
-
"messages": [{"role": "user", "content": "What is the capital of France?"}],
|
| 92 |
-
"stream": true,
|
| 93 |
-
"temperature": 1.0,
|
| 94 |
-
"top_k": 20,
|
| 95 |
-
"top_p": 0.95
|
| 96 |
-
}'
|
| 97 |
-
```
|
| 98 |
-
For `--reasoning-parser ling3` / `--tool-call-parser ling3`, the HiCache + Mooncake L3 setup, and GSM8K / bench_serving reproduction commands, see the cookbook page linked above.
|
| 99 |
-
|
| 100 |
-
## vLLM
|
| 101 |
-
### Install vLLM with Ling-3.0 Support
|
| 102 |
-
```bash
|
| 103 |
-
pip install uv
|
| 104 |
-
|
| 105 |
-
uv venv ~/my_ling_env
|
| 106 |
-
|
| 107 |
-
source ~/my_ling_env/bin/activate
|
| 108 |
-
|
| 109 |
-
git clone -b ling_3_0 https://github.com/inclusionAI/vllm-ling-v3.git
|
| 110 |
-
|
| 111 |
-
cd vllm-ling-v3
|
| 112 |
-
|
| 113 |
-
VLLM_USE_PRECOMPILED=1 uv pip install --editable . --torch-backend=auto
|
| 114 |
-
```
|
| 115 |
-
|
| 116 |
-
### Run Inference
|
| 117 |
-
Here is the example to run Ling-3.0-tiny with a single GPU, where the server port is `${PORT}`:
|
| 118 |
-
|
| 119 |
-
**Server**
|
| 120 |
-
|
| 121 |
-
```bash
|
| 122 |
-
vllm serve "$MODEL_PATH" \
|
| 123 |
-
--port "$PORT" \
|
| 124 |
-
--trust-remote-code \
|
| 125 |
-
--served-model-name auto \
|
| 126 |
-
--tensor-parallel-size 1 \
|
| 127 |
-
--gpu-memory-utilization 0.85 \
|
| 128 |
-
--enable-prefix-caching \
|
| 129 |
-
--mamba-cache-mode align \
|
| 130 |
-
--enable-auto-tool-choice \
|
| 131 |
-
--tool-call-parser ling3 \
|
| 132 |
-
--reasoning-parser ling3
|
| 133 |
-
```
|
| 134 |
-
|
| 135 |
-
**Client**
|
| 136 |
-
|
| 137 |
-
For better performance, We recommend setting `enable_thinking=true` with `temperature=1.0`, `top_p=0.95`, and `top_k=20`.
|
| 138 |
-
|
| 139 |
-
```bash
|
| 140 |
-
curl -s http://${MASTER_IP}:${PORT}/v1/chat/completions \
|
| 141 |
-
-H "Content-Type: application/json" \
|
| 142 |
-
-d '{"model": "auto",
|
| 143 |
-
"messages": [{"role": "user", "content": "What is the capital of France?"}],
|
| 144 |
-
"chat_template_kwargs": {"enable_thinking": true},
|
| 145 |
-
"stream": true,
|
| 146 |
-
"temperature": 1.0,
|
| 147 |
-
"top_k": 20,
|
| 148 |
-
"top_p": 0.95
|
| 149 |
-
}'
|
| 150 |
-
```
|
| 151 |
-
|
| 152 |
-
## Ollama
|
| 153 |
-
> + This configuration has been verified on an M4 Pro Mac with 48 GB of unified memory.
|
| 154 |
-
|
| 155 |
-
### Preparation and Build
|
| 156 |
-
```bash
|
| 157 |
-
git clone https://github.com/ollama/ollama.git
|
| 158 |
-
cd ollama
|
| 159 |
-
git fetch origin refs/pull/17643/head:bailing-moe-v3
|
| 160 |
-
git switch bailing-moe-v3
|
| 161 |
-
|
| 162 |
-
cmake -B build .
|
| 163 |
-
cmake --build build --parallel 8
|
| 164 |
-
```
|
| 165 |
-
|
| 166 |
-
> + Support is currently provided by [ollama/ollama#17643](https://github.com/ollama/ollama/pull/17643) and is limited to running via MLX on Apple Silicon.
|
| 167 |
-
> + Use the local `./ollama` executable built from source in this section. This functionality is not yet included in the official Ollama release.
|
| 168 |
-
|
| 169 |
-
### Import Model
|
| 170 |
-
Replace `/absolute/path/to/bf16_weights` with the absolute path to the BF16 model weights directory. The imported model will be named `ling-tiny-bf16`:
|
| 171 |
-
|
| 172 |
-
```bash
|
| 173 |
-
printf 'FROM /absolute/path/to/bf16_weights\n' > /tmp/Modelfile.ling
|
| 174 |
-
./ollama create ling-tiny-bf16 --experimental -f /tmp/Modelfile.ling
|
| 175 |
-
```
|
| 176 |
-
|
| 177 |
-
### Start Service
|
| 178 |
-
Set the default context length to 8192, and then start the Ollama service:
|
| 179 |
-
|
| 180 |
-
```bash
|
| 181 |
-
# The service listens on http://127.0.0.1:11434 by default
|
| 182 |
-
OLLAMA_CONTEXT_LENGTH=8192 ./ollama serve
|
| 183 |
-
```
|
| 184 |
-
|
| 185 |
-
### Call API
|
| 186 |
-
```bash
|
| 187 |
-
curl -sS http://127.0.0.1:11434/api/generate -d '{
|
| 188 |
-
"model": "ling-tiny-bf16",
|
| 189 |
-
"prompt": "<role>SYSTEM</role>detailed thinking on<|role_end|><role>HUMAN</role>Calculate 17 × 23 and output only the number.<|role_end|><role>ASSISTANT</role>\n<think>",
|
| 190 |
-
"raw": true,
|
| 191 |
-
"think": true,
|
| 192 |
-
"stream": false,
|
| 193 |
-
"options": {
|
| 194 |
-
"temperature": 1.0,
|
| 195 |
-
"top_p": 0.95,
|
| 196 |
-
"top_k": 20,
|
| 197 |
-
"num_predict": 2048
|
| 198 |
-
}
|
| 199 |
-
}' | jq -r .response
|
| 200 |
-
```
|
|
|
|
| 1 |
---
|
| 2 |
license: mit
|
| 3 |
---
|
| 4 |
+
|
| 5 |
<p align="center">
|
| 6 |
<img src="https://mdn.alipayobjects.com/huamei_qa8qxu/afts/img/A*4QxcQrBlTiAAAAAAQXAAAAgAemJ7AQ/original" width="100"/>
|
| 7 |
</p>
|
| 8 |
<p align="center">🤗 <a href="https://huggingface.co/inclusionAI">Hugging Face</a> | 🤖 <a href="https://modelscope.cn/organization/inclusionAI">ModelScope </a> | 🐙 <a href="https://openrouter.ai/inclusionai/ling-3.0-tiny:free">OpenRouter </a> </p>
|
| 9 |
|
| 10 |
+
## Introduction
|
| 11 |
+
We have open-sourced the Ling-3.0 series, our most efficient language foundation model family to date. To support research and community-driven innovation, we are releasing **a collection of checkpoints** **during the training process **as following:
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12 |
|
| 13 |
+
| Model | Pre-trained | Mid-trained | Merged (i.e., [WSM](https://arxiv.org/abs/2507.17634)) |
|
| 14 |
+
| --- | --- | --- | --- |
|
| 15 |
+
| Ling-3.0-tiny | [**Ling-3.0-tiny-base-30T**](https://huggingface.co/inclusionAI/Ling-3.0-tiny-base-30T) | [**Ling-3.0-tiny-base-midtrain**](https://huggingface.co/inclusionAI/Ling-3.0-tiny-base-midtrain) | [**Ling-3.0-tiny-base**](https://huggingface.co/inclusionAI/Ling-3.0-tiny-base) |
|
| 16 |
+
| Ling-3.0-flash | [**Ling-3.0-flash-base-30T**](https://huggingface.co/inclusionAI/Ling-3.0-flash-base-30T) | [**Ling-3.0-flash-base-midtrain**](https://huggingface.co/inclusionAI/Ling-3.0-flash-base-midtrain) | [**Ling-3.0-flash-base**](https://huggingface.co/inclusionAI/Ling-3.0-flash-base) |
|
| 17 |
|
|
|
|
|
|
|
| 18 |
|
| 19 |
+
|
| 20 |
+
These checkpoints correspond to different stages of the training process:
|
| 21 |
|
| 22 |
+
+ **Pretrained checkpoint** have completed large-scale pretraining but have not undergone mid-training, WSM merging (or learning-rate decay), or post-training.
|
| 23 |
+
+ **Mid-trained checkpoint** have completed mid-training but have not undergone WSM merging (or learning-rate decay) or post-training.
|
| 24 |
+
+ **Merged checkpoints** have undergone [WSM](https://arxiv.org/abs/2507.17634) merging (or learning-rate decay) based on the mid-training checkpoints but have not undergone post-training.
|
| 25 |
|
| 26 |
+
These checkpoints are released to support continued pretraining, fine-tuning, and further research. For the post-trained model, please see [Ling-3.0-tiny](https://huggingface.co/inclusionAI/Ling-3.0-tiny) and [Ling-3.0-flash](https://huggingface.co/inclusionAI/Ling-3.0-flash).
|
| 27 |
|
| 28 |
+
## Model Overview
|
| 29 |
+
### Key features
|
| 30 |
+
+ **Sparse MoE architecture:** 128 routed experts, with only 8 routed experts and 1 shared expert activated per token. This enables broad model capabilities while activating just 1.3B parameters per token;
|
| 31 |
+
+ **Native hybrid linear attention:** Ling-3.0 series adopt a native hybrid linear attention architecture from the very start of pretraining by combining KDA with Gated MLA to enable efficient processing of long-context inputs.
|
| 32 |
+
+ [**Warmup-Stable and Merge**](https://arxiv.org/abs/2507.17634)**: **We replace conventional learning-rate decay with weighted checkpoint merging. By eliminating the decay phase, our Base Model is better suited for continual pretraining and dynamic data expansion, while enabling offline exploration of different decay profiles without rerunning costly experiments for each strategy.
|
| 33 |
+
+ **Scale Seamlessly:** Ling-3.0-tiny-base and Ling-3.0-flash-base share the same training recipe, enabling community to experiment on the Ling-3.0-tiny-base first and then scale validated training strategies to the larger Ling-3.0-flash-base.
|
| 34 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 35 |
|
| 36 |
+
| Model Type | Base (final checkpoint of pre-training) |
|
| 37 |
+
|---|---|
|
| 38 |
+
| Architecture | Hybrid-linear MoE |
|
| 39 |
+
| Parameter Scale | Totoal 7.9B, Activated 1.3B |
|
| 40 |
+
| Transformer Layers | 18 KDA + 6 Gated MLA (3:1) |
|
| 41 |
+
| Number of Dense Layers | 1 |
|
| 42 |
+
| Number of Routed Experts | 128 |
|
| 43 |
+
| Number of Shared Experts | 1 |
|
| 44 |
+
| Number of Activated Experts | 8 |
|
| 45 |
+
| Attention Heads | 16 |
|
| 46 |
+
| Hidden Size | 1536 |
|
| 47 |
+
| Expert Intermediate Size | 512 |
|
| 48 |
+
| Dense Intermediate Size | 4608 |
|
| 49 |
+
| Vocabulary Size | 157,184 |
|
| 50 |
|
|
|
|
| 51 |
|
| 52 |
+
<img src="https://intranetproxy.alipay.com/skylark/lark/0/2026/png/62256938/1787120625910-bb0c32bd-7e6b-4354-ac65-fa5b747d8bff.png" width="968.5" title="" crop="0,0,1,1" id="ud5147f99" class="ne-image">
|
|
|
|
| 53 |
|
| 54 |
+
## Base Model Evaluation
|
| 55 |
+
To systematically assess the capabilities of the base model, we use a comprehensive benchmark suite covering several key domains, including knowledge, coding, mathematics, reasoning, multilingual understanding, and long-context comprehension. The performance of the pretrained base checkpoint, i.e., `Ling-3.0-tiny-base`, is compared below:
|
|
|
|
| 56 |
|
| 57 |
+
<img src="https://intranetproxy.alipay.com/skylark/lark/0/2026/png/62256938/1787145422924-5c03d4b9-ee56-4d84-8927-58edb24b24c1.png" width="1578.5" title="" crop="0,0,1,1" id="u9090be40" class="ne-image">
|
| 58 |
|
| 59 |
+
## **Intended Use**
|
| 60 |
+
Recommended use cases:
|
| 61 |
|
| 62 |
+
+ Continued pre-training
|
| 63 |
+
+ Mid-training
|
| 64 |
+
+ Supervised fine-tuning for domain adaptation
|
| 65 |
+
+ Preference optimization and RL post-training Distillation research
|
| 66 |
+
+ Long-context and MoE systems research
|
| 67 |
|
| 68 |
+
Not recommended as-is for:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 69 |
|
| 70 |
+
+ Direct end-user chat deployment
|
| 71 |
+
+ Safety-critical applications without additional alignment and evaluation
|
| 72 |
+
+ Production use without post-training and task-specific validation
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 73 |
|
| 74 |
+
## Usage
|
| 75 |
+
For fine-tuning examples, please refer to our [ling-cookbook](https://github.com/inclusionAI/ling-cookbook/).
|
| 76 |
|
| 77 |
+
## FAQ
|
| 78 |
+
If you have any question, please feel free to add a discussion.
|
| 79 |
|
| 80 |
+
## License
|
| 81 |
+
This model is released under the **MIT License**.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|