Update README.md
Browse files
README.md
CHANGED
|
@@ -21,7 +21,8 @@ base_model:
|
|
| 21 |
Ring-lite is a lightweight, fully open-sourced MoE (Mixture of Experts) LLM designed for complex reasoning tasks. It is built upon the publicly available [Ling-lite-1.5](https://huggingface.co/inclusionAI/Ling-lite-1.5) model, which has 16.8B parameters with 2.75B activated parameters.. We use a joint training pipeline combining knowledge distillation with reinforcement learning, achieving performance comparable to state-of-the-art (SOTA) small-size reasoning models on challenging benchmarks (AIME, LiveCodeBench, and GPQA-Diamond) while activating only one-third of their parameters.
|
| 22 |
|
| 23 |
|
| 24 |
-
|
|
|
|
| 25 |
## Model Downloads
|
| 26 |
|
| 27 |
<div align="center">
|
|
@@ -39,6 +40,20 @@ For a comprehensive evaluation of the quality of our reasoning models, we implem
|
|
| 39 |
<img src="https://huggingface.co/inclusionAI/Ring-lite/resolve/main/performance.png" width="1000"/>
|
| 40 |
<p>
|
| 41 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 42 |
|
| 43 |
|
| 44 |
More details are reported in our [technical report](https://arxiv.org/abs/2506.14731).
|
|
@@ -46,6 +61,12 @@ More details are reported in our [technical report](https://arxiv.org/abs/2506.1
|
|
| 46 |
## Quickstart
|
| 47 |
|
| 48 |
### 🤗 Hugging Face Transformers
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 49 |
Here is a code snippet to show you how to use the chat model with `transformers`:
|
| 50 |
|
| 51 |
```python
|
|
@@ -68,7 +89,45 @@ messages = [
|
|
| 68 |
text = tokenizer.apply_chat_template(
|
| 69 |
messages,
|
| 70 |
tokenize=False,
|
| 71 |
-
add_generation_prompt=True
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 72 |
)
|
| 73 |
model_inputs = tokenizer([text], return_tensors="pt").to(model.device)
|
| 74 |
|
|
|
|
| 21 |
Ring-lite is a lightweight, fully open-sourced MoE (Mixture of Experts) LLM designed for complex reasoning tasks. It is built upon the publicly available [Ling-lite-1.5](https://huggingface.co/inclusionAI/Ling-lite-1.5) model, which has 16.8B parameters with 2.75B activated parameters.. We use a joint training pipeline combining knowledge distillation with reinforcement learning, achieving performance comparable to state-of-the-art (SOTA) small-size reasoning models on challenging benchmarks (AIME, LiveCodeBench, and GPQA-Diamond) while activating only one-third of their parameters.
|
| 22 |
|
| 23 |
|
| 24 |
+
## News
|
| 25 |
+
[20250704] Ring-lite-0704: we update Ring-lite model, which supports two distinct reasoning modes: "**thinking on**" and "**thinking off**".
|
| 26 |
## Model Downloads
|
| 27 |
|
| 28 |
<div align="center">
|
|
|
|
| 40 |
<img src="https://huggingface.co/inclusionAI/Ring-lite/resolve/main/performance.png" width="1000"/>
|
| 41 |
<p>
|
| 42 |
|
| 43 |
+
To compare the performance of Ring-lite-0704 and Ring-lite-0616, we evaluate the two models on a broader range of reasoning and general-purpose benchmarks, including instruction following, function calling, and creative writing.
|
| 44 |
+
| **Dataset** | **Ring-lite-0616** | **Ring-lite-0704** |
|
| 45 |
+
| :---------: | :----------------: | :----------------: |
|
| 46 |
+
| AIME 2024 | 76.6 | 79.0 |
|
| 47 |
+
| AIME 2025 | 69.1 | 69.5 |
|
| 48 |
+
| LiveCodeBench | 60.7 | 61.4 |
|
| 49 |
+
| Codeforces (percentile) | 86.5 | 88.0 |
|
| 50 |
+
| GPQA Diamond | 61.1 | 63.2 |
|
| 51 |
+
| C-Eval | 59.0 | 65.4 |
|
| 52 |
+
| MMLU-Pro | 60.0 | 63.0 |
|
| 53 |
+
| ArenaHard | 27.8 | 62.7 |
|
| 54 |
+
| IF-Eval | 51.6 | 54.3 |
|
| 55 |
+
| BFCL_Live | 78.3 | 84.4 |
|
| 56 |
+
| Creative Writing | 6.7 | 60.2 |
|
| 57 |
|
| 58 |
|
| 59 |
More details are reported in our [technical report](https://arxiv.org/abs/2506.14731).
|
|
|
|
| 61 |
## Quickstart
|
| 62 |
|
| 63 |
### 🤗 Hugging Face Transformers
|
| 64 |
+
The newly updated **Ring-lite** model now supports two distinct reasoning modes: "**thinking on**" and "**thinking off**". These modes are controlled by the `enable_thinking` parameter in the `tokenizer.apply_chat_template()` function.
|
| 65 |
+
* When `enable_thinking` is set to `True` (or omitted), the model operates in "**thinking on**" mode, where it generates and outputs the internal reasoning process.
|
| 66 |
+
* When `enable_thinking` is explicitly set to `False`, the model runs in "**thinking off**" mode, skipping the reasoning step entirely and directly producing the final answer.
|
| 67 |
+
This feature allows users to choose between detailed reasoning and concise output based on their specific needs.
|
| 68 |
+
|
| 69 |
+
#### Thinking on
|
| 70 |
Here is a code snippet to show you how to use the chat model with `transformers`:
|
| 71 |
|
| 72 |
```python
|
|
|
|
| 89 |
text = tokenizer.apply_chat_template(
|
| 90 |
messages,
|
| 91 |
tokenize=False,
|
| 92 |
+
add_generation_prompt=True,
|
| 93 |
+
enable_thinking=True
|
| 94 |
+
)
|
| 95 |
+
model_inputs = tokenizer([text], return_tensors="pt").to(model.device)
|
| 96 |
+
|
| 97 |
+
generated_ids = model.generate(
|
| 98 |
+
**model_inputs,
|
| 99 |
+
max_new_tokens=8192
|
| 100 |
+
)
|
| 101 |
+
generated_ids = [
|
| 102 |
+
output_ids[len(input_ids):] for input_ids, output_ids in zip(model_inputs.input_ids, generated_ids)
|
| 103 |
+
]
|
| 104 |
+
|
| 105 |
+
response = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0]
|
| 106 |
+
```
|
| 107 |
+
|
| 108 |
+
#### Thinking off
|
| 109 |
+
```python
|
| 110 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 111 |
+
|
| 112 |
+
model_name = "inclusionAI/Ring-lite"
|
| 113 |
+
|
| 114 |
+
model = AutoModelForCausalLM.from_pretrained(
|
| 115 |
+
model_name,
|
| 116 |
+
torch_dtype="auto",
|
| 117 |
+
device_map="auto"
|
| 118 |
+
)
|
| 119 |
+
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
| 120 |
+
|
| 121 |
+
prompt = "Give me a short introduction to large language models."
|
| 122 |
+
messages = [
|
| 123 |
+
{"role": "system", "content": "You are Ring, an assistant created by inclusionAI"},
|
| 124 |
+
{"role": "user", "content": prompt}
|
| 125 |
+
]
|
| 126 |
+
text = tokenizer.apply_chat_template(
|
| 127 |
+
messages,
|
| 128 |
+
tokenize=False,
|
| 129 |
+
add_generation_prompt=True,
|
| 130 |
+
enable_thinking=False
|
| 131 |
)
|
| 132 |
model_inputs = tokenizer([text], return_tensors="pt").to(model.device)
|
| 133 |
|