Text Generation
Transformers
Safetensors
qwen3_moe
conversational
File size: 7,014 Bytes
941485b
 
bf59985
 
941485b
bf59985
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
---

license: apache-2.0
pipeline_tag: text-generation
library_name: transformers
---


# <img src="assets/ali.webp" alt="Ali" style="height: 1.2em; vertical-align: middle; margin-right: 0.4em;"> Apsara-Reason: Distribution-Aligned Sequence Distillation Enabling Superior Long-CoT Reasoning

<!-- <p align="center">
<img src="assets/ali.webp" alt="Alibaba-Apsara" style="height: 1em; vertical-align: middle;"> <a href="https://huggingface.co/Alibaba-Apsara">Alibaba-Apsara</a>&nbsp&nbsp | &nbsp&nbsp 📑 <a href="https://arxiv.org/abs/2506.xxxxx">Paper</a> &nbsp&nbsp | &nbsp&nbsp 📂 <a href="https://apsara-reason.github.io">Data</a> &nbsp&nbsp
</p> -->


[![GitHub](https://img.shields.io/badge/GitHub-Apsara--Reason-181717?logo=github&logoColor=white)](https://github.com/D2I-ai/apsara-reason)&#160;
<a href="https://arxiv.org/abs/2511.xx" target="_blank"><img src="https://img.shields.io/badge/Report-b5212f.svg?logo=arxiv" height="21px"></a>



[![Hugging Face](https://img.shields.io/badge/%F0%9F%A4%97%20Checkpoint-Apsara--Reason--4B-yellow)](https://huggingface.co/Alibaba-Apsara/Apsara-Reason-4B)&#160;
[![ModelScope Model](https://img.shields.io/badge/🤖%20Checkpoint-Apsara--Reason--4B-624aff)](https://www.modelscope.cn/models/Alibaba-Apsara/Apsara-Reason-4B)&#160;


[![Hugging Face](https://img.shields.io/badge/%F0%9F%A4%97%20Checkpoint-Apsara--Reason--30B--A3B--Preview-yellow)](https://huggingface.co/Alibaba-Apsara/Alibaba-Apsara/Apsara-Reason-30B-A3B-Preview)&#160;
[![ModelScope Model](https://img.shields.io/badge/🤖%20Checkpoint-Apsara--Reason--30B--A3B--Preview-624aff)](https://www.modelscope.cn/models/Alibaba-Apsara/Apsara-Reason-30B-A3B-Preview)&#160;



[![Hugging Face](https://img.shields.io/badge/%F0%9F%A4%97%20Dataset-Apsara--Reason--v1--SFT-red)](https://huggingface.co/datasets/Alibaba-Apsara/Apsara-Reason-v1-SFT)&#160;
[![ModelScope Model](https://img.shields.io/badge/🤖%20Dataset-Apsara--Reason--v1--SFT-124aff)](https://www.modelscope.cn/datasets/Alibaba-Apsara/Apsara-Reason-v1-SFT)&#160;



## 🚀 Introduction

We release Apsara-Reason-30B-A3B-Preview, a highly capable 30B Mixture-of-Experts (MoE) language model specialized in long chain-of-thought (Long-CoT) reasoning across mathematics, code generation, and scientific reasoning. Apsara-Reason-30B-A3B-Preview is post-trained from **Qwen3-30B-A3B-Instruct-2507** (non-thinking student) and distilled from **gpt-oss-120b** (teacher) via our distribution-aligned sequence distillation pipeline.

> Note1: To demonstrate the scalability and efficiency of our data recipe, this preview model was trained only on the first-stage (Low-Temperature) dataset (~105K samples) derived from our 4B pipeline, without any re-curation or additional RL. Even with this lightweight recipe, it achieves excellent performance among open MoE models.

> Note2: This model (Apsara-Reason-30B-A3B-Preview) is a preliminary research artifact trained only on the first stage (Low-Temperature Sampling) of our pipeline to demonstrate the scalability of our data recipe. For the fully trained model and complete methodology, please refer to [Apsara-Reason-4B](https://huggingface.co/Alibaba-Apsara/Apsara-Reason-4B) and our Technical Report.



<div style="text-align: center;">
  <img src="assets/size_30b_a3b-performance.png" alt="benchmark" style="width: 90%;">
</div>


---


## ⚡ Quick Start


```python

from transformers import AutoModelForCausalLM, AutoTokenizer



model_name = "Alibaba-Apsara/Apsara-Reason-30B-A3B-Preview"



tokenizer = AutoTokenizer.from_pretrained(model_name, trust_remote_code=True)

model = AutoModelForCausalLM.from_pretrained(

    model_name,

    torch_dtype="auto",

    device_map="auto",

    trust_remote_code=True,

)



prompt = "Natalia sold clips to 48 of her friends in April, and then she sold half as many clips in May. How many clips did Natalia sell altogether in April and May?"

messages = [

  {"role": "system", "content": "You are a helpful assistant."},

  {"role": "user", "content": prompt}

]



text = tokenizer.apply_chat_template(

    messages,

    tokenize=False,

    add_generation_prompt=True,

)



model_inputs = tokenizer([text], return_tensors="pt").to(model.device)



generated_ids = model.generate(

    **model_inputs,

    max_new_tokens=81920,

)



output_ids = generated_ids[0][len(model_inputs.input_ids[0]):].tolist()

content = tokenizer.decode(output_ids, skip_special_tokens=True)

print(content)

```


> Note: We include the system prompt, as it was used during all training stages. To ensure consistent output quality, we recommend including the same system prompt during actual usage; otherwise, the model's responses may be significantly affected.

For deployment, you can use sglang>=0.4.6.post1 or vllm>=0.8.5 or to create an OpenAI-compatible API endpoint:

- SGLang:

```

python -m sglang.launch_server --model-path Alibaba-Apsara/Apsara-Reason-30B-A3B-Preview --context-length 262144

```

- vLLM:
```

vllm serve Alibaba-Apsara/Apsara-Reason-30B-A3B-Preview --max-model-len 262144

```






## 💡Best Practices

To achieve optimal performance, we suggest using **Temperature=1.0, TopP=1.0, TopK=-1, and MinP=0**.


## 📜 Licence

The model weights are licensed under Apache 2.0 License.


## ⚠️ Limitation

While Apsara-Reason-30B-A3B-Preview demonstrates remarkable performance across mathematical, scientific, and coding benchmarks, **it is currently limited by the absence of tool integration and function calling capabilities.** Operating strictly within the text space, the model cannot interact with external interfaces such as code executors or APIs, which constrains its utility in agent-based workflows; however, future iterations aim to bridge this gap by integrating capabilities like knowledge retrieval and tool invocation to support more complex, interactive reasoning tasks.

## 📚 Citation

Apsara-Reason is developed by the **Apsara Lab** at Alibaba Cloud, as part of our mission to advance open, efficient, and trustworthy reasoning systems. If you find this work useful in your research or applications, please cite our technical report:


```bibtex

@misc{apsara2025reason,

  title={Apsara-Reason: Distribution-Aligned Sequence Distillation Enabling Superior Long-CoT Reasoning},

  author={Apsara Team},

  year={2025},

  eprint={2506.xxxxx},

  archivePrefix={arXiv},

  primaryClass={cs.CL},

  url={https://arxiv.org/abs/2506.xxxxx}

}



@article{liu2025where,

  title={Where Did This Sentence Come From? Tracing Provenance in LLM Reasoning Distillation},

  author={Liu, Kaiyuan and Yan, Shaotian and Miao, Rui and Wang, Bing and Shen, Chen and Zhang, Jun and Ye, Jieping},

  journal={arXiv preprint arXiv:2512.20908},

  year={2025}

}

```

We welcome collaboration, feedback, and community contributions to push the boundaries of what small models can reason about—transparently and responsibly.