anocha-mcomp commited on
Commit
7d09491
·
verified ·
1 Parent(s): 438d760

Update model card from Confluence: Qwen-SEA-LION-v4-32B-IT

Browse files
Files changed (1) hide show
  1. qwen-sea-lion-v4-32b-it.md +208 -0
qwen-sea-lion-v4-32b-it.md ADDED
@@ -0,0 +1,208 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Qwen-SEA-LION-v4-32B-IT (Instruct model)
2
+
3
+ Last update: 2025-10-16
4
+
5
+ SEA-LION is a collection of Large Language Models (LLMs) which have been pretrained and instruct-tuned for the Southeast Asia (SEA) region.
6
+
7
+ **Qwen-SEA-LION-v4-32B-IT** is based on Qwen3, which provides a strong foundation with support for over 100 languages and advanced reasoning capabilities. The model underwent continued pre-training on approximately **100B tokens** sampled from a corpus of over one trillion tokens across 11 SEA languages: Burmese, English, Indonesian, Khmer, Lao, Malay, Mandarin, Tagalog, Tamil, Thai, and Vietnamese. Finally, it was post-trained on a high-quality dataset of approximately **8 million question-and-answer pairs** to create the final instruction-tuned model.
8
+
9
+ Qwen-SEA-LION-v4-32B-IT inherits the following features from Qwen3-32B:
10
+
11
+ - 32,768 of context length natively and 131,072 tokens with YaRN,
12
+ - Uniquely support of seamless switching between thinking mode within single model (Dense) and Expertise in agent capabilities.
13
+
14
+ ## Model Details
15
+
16
+ ### Model Description
17
+
18
+ SEA-LION stands for *Southeast Asian Languages In One Network*.
19
+
20
+ We performed continued pre-training in English and SEA languages on Gemma-3-27B-IT, a decoder model using the Gemma 3 architecture, and post-training to create Qwen-SEA-LION-v4-32B-IT.
21
+
22
+ For tokenization, the model employs the default tokenizer used in Qwen3-32B.
23
+
24
+ - **Developed by:** Products Pillar, AI Singapore
25
+ - **Funded by:** Singapore NRF
26
+ - **Shared by:** Products Pillar, AI Singapore
27
+ - **Model type:** Decoder
28
+ - **Context Length:** 128k tokens
29
+ - **Language(s) (NLP):** Burmese, English, Indonesian, Khmer, Lao, Malay, Mandarin, Tagalog, Tamil, Thai, and Vietnamese
30
+ - **License:** [Qwen Terms of Service](https://qwen.ai/termsservice) / [Qwen Usage Policy](https://qwen.ai/usagepolicy)
31
+ - **Continue pretrained from model:** [Qwen-3-32B](https://huggingface.co/Qwen/Qwen3-32B)
32
+
33
+ ## Uses
34
+
35
+ ### Out-of-Scope Use
36
+
37
+ The model has *not* been aligned for safety. Developers and users should perform their own safety fine-tuning and related security measures. In no event shall the authors be held liable for any claims, damages, or other liabilities arising from the use of the released weights and codes.
38
+
39
+ ## Bias, Risks, and Limitations
40
+
41
+ ### Caveats || Risks
42
+
43
+ *The model was not tested for robustness against adversarial prompting.* It is important for users to be aware that our model exhibits certain limitations that warrant consideration. Like many LLMs, the model can hallucinate and occasionally generates irrelevant content, introducing fictional elements that are not grounded in the provided context. Users should also exercise caution in interpreting and validating the model's responses due to the potential inconsistencies.
44
+
45
+ ## Limitations
46
+
47
+ In terms of vision capability, Qwen-SEA-LION-v4-32B-IT has been trained and fine-tuned exclusively on the text back-end. As a result, its vision capabilities are expected to be comparable to those of Qwen3-32B, and may not exhibit significant improvements or differences in this area. (<https://huggingface.co/Qwen/Qwen3-32B> )
48
+
49
+ ## How to Get Started with the Model
50
+
51
+ Use the code below to get started with the model using the 🤗 Transformers library.
52
+
53
+ > The model defaults to non-thinking mode. To enable thinking mode, please use `enable_thinking=True`.
54
+ >
55
+ >
56
+
57
+ ```
58
+ from transformers import AutoModelForCausalLM, AutoTokenizer
59
+
60
+ model_name = "aisingapore/Qwen-SEA-LION-v4-32B"
61
+
62
+ # load the tokenizer and the model
63
+ tokenizer = AutoTokenizer.from_pretrained(model_name)
64
+ model = AutoModelForCausalLM.from_pretrained(
65
+ model_name,
66
+ torch_dtype="auto",
67
+ device_map="auto"
68
+ )
69
+
70
+ # prepare the model input
71
+ prompt = "Create a poem that captures the seaside scenery across Southeast Asian countries, including transcriptions in their respective languages."
72
+ messages = [
73
+ {"role": "user", "content": prompt}
74
+ ]
75
+ text = tokenizer.apply_chat_template(
76
+ messages,
77
+ tokenize=False,
78
+ add_generation_prompt=True,
79
+ enable_thinking=True # Switches between thinking and non-thinking modes. Default is True.
80
+ )
81
+ model_inputs = tokenizer([text], return_tensors="pt").to(model.device)
82
+
83
+ # conduct text completion
84
+ generated_ids = model.generate(
85
+ **model_inputs,
86
+ max_new_tokens=32768
87
+ )
88
+ output_ids = generated_ids[0][len(model_inputs.input_ids[0]):].tolist()
89
+
90
+ # parsing thinking content
91
+ try:
92
+ # rindex finding 151668 ()
93
+ index = len(output_ids) - output_ids[::-1].index(151668)
94
+ except ValueError:
95
+ index = 0
96
+
97
+ thinking_content = tokenizer.decode(output_ids[:index], skip_special_tokens=True).strip("\n")
98
+ content = tokenizer.decode(output_ids[index:], skip_special_tokens=True).strip("\n")
99
+
100
+ print("thinking content:", thinking_content)
101
+ print("content:", content)
102
+
103
+ ```
104
+ ## Training Details
105
+
106
+ **Training Datasets**
107
+
108
+ The instruction fine-tuning dataset combines our SEA-Instruct, Infinity-Instruct, and OpenMath-Instruct 2 with open-source datasets. For the Online RL datasets, open sourced datasets such as nvidia/Llama-Nemotron-Post-Training-Dataset (RL set) and zwhe99/DeepMath-103K were used.
109
+
110
+ #### Training Procedure
111
+
112
+ **Training regime**
113
+
114
+ Our post-training workflow consists of multiple stages: instruction fine-tuning, model merging, online RL for both instruction following and math using DRGPPO, and then followed by on-policy alignment via APO.
115
+
116
+ ## Uses
117
+
118
+ ### Available Versions
119
+
120
+ - Qwen-SEA-LION-v4-32B-IT
121
+ - Qwen-SEA-LIOn-v4-32B-IT-F16
122
+ - Qwen-SEA-LION-v4-32B-IT-Q8_0
123
+ - Qwen-SEA-LION-v4-32B-IT-Q4_K_M
124
+
125
+ ### Resource Metrics
126
+
127
+ | Quantized Variant | Model Size (GB) | VRAM Required (GB) | Time to First Token (s) | Tokens per Second |
128
+ | --- | --- | --- | --- | --- |
129
+ | BF16 | | | | |
130
+ | Q8_0 | | | | |
131
+ | Q4_K_M | | | | |
132
+
133
+ *Additional Remarks:*
134
+
135
+ - TTFT and Toks per Sec: measured with vLLM on localhost and concurrency = 1.
136
+ - Reported results are the median (p50) values, calculated across 10 requests.
137
+ - Model size taken from vLLM upon loading
138
+ - Input size 4K, output 1K
139
+ - Tests conducted on a system with an NVIDIA H200 GPU
140
+
141
+ ## Evaluation
142
+
143
+ ### Testing Data, Factors & Metrics
144
+
145
+ We evaluated Qwen-SEA-LION-v4-32B-IT on general language, multi-turn chat and instruction-following capabilities.
146
+
147
+ #### Testing Data
148
+
149
+ General language capabilities
150
+
151
+ For the evaluation of general language capabilities, we employed the [SEA-HELM evaluation benchmark](https://arxiv.org/abs/2502.14301) across a variety of tasks. These tasks include Question Answering (QA), Sentiment Analysis (Sentiment), Toxicity Detection (Toxicity), Translation in both directions (Eng>Lang & Lang>Eng), Abstractive Summarisation (Abssum), Causal Reasoning (Causal), Natural Language Inference (NLI), Linguistic Diagnostics (LINDSEA), Cultural Knowledge (Kalahi) and Global MMLU Lite.
152
+
153
+ Instruction-following and Multi-turn Chat
154
+
155
+ We evaluated the models on instruction-following and multi-turn chat capabilities with SEA-IFEval (based on [IFEval](https://arxiv.org/abs/2311.07911)) and SEA-MTBench (based on [MT-Bench](https://arxiv.org/abs/2306.05685)) respectively. The two datasets were originally in English, the linguists and native speakers in the team worked together to filter, localise and translate the datasets into the respective target languages to ensure that the examples remained reasonable, meaningful and natural.
156
+
157
+ #### Factors
158
+
159
+ All evaluations were run with the model specific generation parameters defined in the model config. Each evaluation comprised of 8 runs with different seeds and the final results were averaged across these runs.
160
+
161
+ For all tasks, the model was expected to provide an answer tag from which the answer was automatically extracted. For tasks where options were provided, the answer should comprise one of the pre-defined options.
162
+
163
+ The evaluation was done **zero-shot** with native prompts on a sample of 100-1000 instances for each dataset.
164
+
165
+ SEA-IFEval
166
+
167
+ SEA-IFEval evaluates a model's ability to adhere to constraints provided in the prompt, for example beginning a response with a specific word/phrase or answering with a certain number of sections. Additionally, accuracy is normalised by the proportion of responses in the correct language (if the model performs the task correctly but responds in the wrong language, it is judged to have failed the task).
168
+
169
+ SEA-MTBench
170
+
171
+ SEA-MTBench evaluates a model's ability to engage in multi-turn (2 turns) conversations and respond in ways that align with human needs. We use `gpt-4.1-2025-04-14` as the judge model and compare against `gpt-4.1-2025-04-14` as the baseline model. The metric used is the weighted win rate against the baseline model (i.e. average win rate across each category: Math, Reasoning, STEM, Humanities, Roleplay, Writing, Extraction).
172
+
173
+ #### Metrics
174
+
175
+ The following metrics were used:
176
+
177
+ | **Task** | **Metric** |
178
+ | --- | --- |
179
+ | Sentiment Analysis | Accuracy |
180
+ | Extractive QA (ID, VI, TH, TA) | ChrF++ |
181
+ | MCQ-QA (TL, MY, MS) | Accuracy |
182
+ | Metaphor | Accuracy |
183
+ | Abstractive Summarisation | Rouge-L |
184
+ | Translations | MetricX-24 score (with reference) |
185
+ | Causal Reasoning | Accuracy |
186
+ | Natural Language Inference | Accuracy |
187
+ | LINDSEA | Accuracy |
188
+ | Global MMLU Lite | Accuracy |
189
+ | Kalahi | Accuracy |
190
+ | SEA-IFEval | Accuracy |
191
+ | SEA-MTBench | Win rate against a reference |
192
+ | Toxicity Detection | Accuracy |
193
+
194
+ ### Results
195
+
196
+ <<Leaderboard img>>
197
+
198
+ For details on Qwen-SEA-LION-v4-27B-IT performance, please refer to the SEA-HELM leaderboard, <https://leaderboard.sea-lion.ai/> .
199
+
200
+ ## More Information
201
+
202
+ This is the repository for the commercial instruction-tuned model. The model has *not* been aligned for safety. Developers and users should perform their own safety fine-tuning and related security measures. In no event shall the authors be held liable for any claims, damages, or other liabilities arising from the use of the released weights and codes.
203
+
204
+ For more info, please contact us using this [sealion@aisingapore.org](mailto:sealion@aisingapore.org)
205
+
206
+ ## Team
207
+
208
+ Ahn Jeongmi, Antonyrex Sajeban, Chan Hok Teng Adwin, Cheng Zi Yi Nicholas, Choa Hsueh Mei Esther, Heng Jonathan, Huang Yuli, Hulagadri Adithya Venkatadri, Jann Railey Estrada Montalan, Kang Siow Wei Bryan, Lau Wayne, Lee Chwan Ren, Leong Wai Yi, Leong Wei Qi, Limkonchotiwat Peerat, Muhammad Ridzuan Bin Mokhtar, Nagarajan Karthik, Ng Boon Cheong Raymond, Ngee Chia Tai, Ngui Jian Gang, Nguyen Thanh Ngan, Ong Jin Jie Brandon, Ong Tat-Wee David, Ong Zhi Hao, Pereira Mark, Rengarajan Hamsawardhini, Susanto Yosephine, Sutaveephamochanon Anocha, Tan Choon Meng, Tan Chor Phin Evelyn, Tan Siao Wei Jessica, Tan Yixian, Teng Kok Wai Walter, Teo Eng Sipp Leslie, Tjhi William, Yeo Yeow Tong, Yong Xianbin, Liew Rachel, Liu Bing Jie Darius, Zhou Lin (NCS), Gopalakrishnan Roshan (NCS), Anda Cuahtemoc (NCS), Sri Devi Wijaya (NCS), Nandi Partha (NCS), Elliott Chris (Google), Mohseni Mohammadreza (Google), Sharan Mayank (Google), Wei Fanny (Google), Tang Jiuqiang (Google), Xu Xiang (Google), Yu Ting (Google), Loh Michelle (Google), Mangal Saurabh (Google), Mukherjee Pratyusha (Google), Sim Stephanie (Google)