Files changed (1) hide show
  1. README.md +41 -20
README.md CHANGED
@@ -24,27 +24,38 @@ It demonstrates competitive performance with GPT-3.5-turbo and llama-3-typhoon-v
24
  constrained generation, and reasoning tasks.is a Thai 🇹🇭 & China 🇨🇳 large language model with 7 billion parameters, and it is based on Qwen2-7B.
25
  ## Introduction
26
 
27
- Qwen2 is the new series of Qwen large language models. For Qwen2, we release a number of base language models and instruction-tuned language models ranging from 0.5 to 72 billion parameters, including a Mixture-of-Experts model. This repo contains the instruction-tuned 7B Qwen2 model.
28
 
29
- Compared with the state-of-the-art opensource language models, including the previous released Qwen1.5, Qwen2 has generally surpassed most opensource models and demonstrated competitiveness against proprietary models across a series of benchmarks targeting for language understanding, language generation, multilingual capability, coding, mathematics, reasoning, etc.
 
 
 
30
 
31
- Qwen2-7B-Instruct supports a context length of up to 131,072 tokens, enabling the processing of extensive inputs. Please refer to [this section](#processing-long-texts) for detailed instructions on how to deploy Qwen2 for handling long texts.
 
 
 
 
 
 
 
 
32
 
33
- For more details, please refer to our [blog](https://qwenlm.github.io/blog/qwen2/), [GitHub](https://github.com/QwenLM/Qwen2), and [Documentation](https://qwen.readthedocs.io/en/latest/).
34
- <br>
35
 
36
- ## Model Details
37
- Qwen2 is a language model series including decoder language models of different model sizes. For each size, we release the base language model and the aligned chat model. It is based on the Transformer architecture with SwiGLU activation, attention QKV bias, group query attention, etc. Additionally, we have an improved tokenizer adaptive to multiple natural languages and codes.
38
 
39
- ## Training details
40
- We pretrained the models with a large amount of data, and we post-trained the models with both supervised finetuning and direct preference optimization.
41
 
 
42
 
43
- ## Requirements
44
- The code of Qwen2 has been in the latest Hugging face transformers and we advise you to install `transformers>=4.37.0`, or you might encounter the following error:
45
  ```
46
  KeyError: 'qwen2'
47
- ```
 
 
 
48
 
49
  ## Implementation
50
 
@@ -82,23 +93,33 @@ response = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0]
82
  print(response)
83
  ```
84
 
85
- ## Evaluation Performance Few-shot (5 shot)
86
  | Model | ONET | IC | TGAT | TPAT-1 | A-Level | Average (ThaiExam) | M3Exam (1 shot) | MMLU |
87
  | :--- | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: |
88
- | DoodNiLT-7B | **0.5185** | **0.6421** | **0.6461** | **0.4224** | **0.3937** | **0.5245** | **0.5355** | 0.6644 |
89
- | llama-3-typhoon-v1.5-8b | 0.3765 | 0.3473 | 0.5538 | 0.4137 | 0.2913 | 0.3965 | 0.6451 | 0.4312 | 0.4125 |
90
- | OpenThaiGPT-1.0.0-7B | 0.3086 | 0.3052 | 0.4153 | 0.3017 | 0.2755 | 0.3213 | 0.3512 | 0.255 | 0.3105 |
91
- | Meta-Llama-3.1-8B | 0.3641 | 0.2631 | 0.2769 | 0.3793 | 0.1811 | 0.2929 | 0.6591 | 0.4239 | 0.3583 |
92
  | SeaLLM-v3-7B | 0.4753 | 0.6421 | 0.6153 | 0.3275 | 0.3464 | 0.4813 | 0.7037 | 0.4907 | 0.4625 |
 
 
 
93
 
94
- ## Evaluation Performance Few-shot (2 shot)
95
 
96
  ## Citation
97
 
98
  If you find our work helpful, feel free to give us a cite.
99
 
100
  ```
 
 
 
 
 
 
 
 
101
  @article{qwen2,
102
- title={Qwen2 Technical Report},
103
- year={2024}
 
 
104
  }
 
 
24
  constrained generation, and reasoning tasks.is a Thai 🇹🇭 & China 🇨🇳 large language model with 7 billion parameters, and it is based on Qwen2-7B.
25
  ## Introduction
26
 
27
+ Qwen2.5 is the latest series of Qwen large language models. For Qwen2.5, we release a number of base language models and instruction-tuned language models ranging from 0.5 to 72 billion parameters. Qwen2.5 brings the following improvements upon Qwen2:
28
 
29
+ - Significantly **more knowledge** and has greatly improved capabilities in **coding** and **mathematics**, thanks to our specialized expert models in these domains.
30
+ - Significant improvements in **instruction following**, **generating long texts** (over 8K tokens), **understanding structured data** (e.g, tables), and **generating structured outputs** especially JSON. **More resilient to the diversity of system prompts**, enhancing role-play implementation and condition-setting for chatbots.
31
+ - **Long-context Support** up to 128K tokens and can generate up to 8K tokens.
32
+ - **Multilingual support** for over 29 languages, including Chinese, English, French, Spanish, Portuguese, German, Italian, Russian, Japanese, Korean, Vietnamese, Thai, Arabic, and more.
33
 
34
+ **This repo contains the base 7B Qwen2.5 model**, which has the following features:
35
+ - Type: Causal Language Models
36
+ - Training Stage: Pretraining
37
+ - Architecture: transformers with RoPE, SwiGLU, RMSNorm, and Attention QKV bias
38
+ - Number of Parameters: 7.61B
39
+ - Number of Paramaters (Non-Embedding): 6.53B
40
+ - Number of Layers: 28
41
+ - Number of Attention Heads (GQA): 28 for Q and 4 for KV
42
+ - Context Length: 131,072 tokens
43
 
44
+ **We do not recommend using base language models for conversations.** Instead, you can apply post-training, e.g., SFT, RLHF, continued pretraining, etc., on this model.
 
45
 
46
+ For more details, please refer to our [blog](https://qwenlm.github.io/blog/qwen2.5/), [GitHub](https://github.com/QwenLM/Qwen2.5), and [Documentation](https://qwen.readthedocs.io/en/latest/).
 
47
 
48
+ ## Requirements
 
49
 
50
+ The code of Qwen2.5 has been in the latest Hugging face `transformers` and we advise you to use the latest version of `transformers`.
51
 
52
+ With `transformers<4.37.0`, you will encounter the following error:
 
53
  ```
54
  KeyError: 'qwen2'
55
+
56
+ ## Training details
57
+
58
+ We pretrained the models with a large amount of data, and we post-trained the models with both supervised finetuning and direct preference optimization.
59
 
60
  ## Implementation
61
 
 
93
  print(response)
94
  ```
95
 
96
+ ## Evaluation Performance
97
  | Model | ONET | IC | TGAT | TPAT-1 | A-Level | Average (ThaiExam) | M3Exam (1 shot) | MMLU |
98
  | :--- | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: |
99
+ | OpenthaiLLM-Prebuilt-7B | **0.5185** | **0.6421** | **0.6461** | **0.4224** | **0.3937** | **0.5245** | **0.5355** | 0.6644 |
 
 
 
100
  | SeaLLM-v3-7B | 0.4753 | 0.6421 | 0.6153 | 0.3275 | 0.3464 | 0.4813 | 0.7037 | 0.4907 | 0.4625 |
101
+ | llama-3-typhoon-v1.5-8B | 0.3765 | 0.3473 | 0.5538 | 0.4137 | 0.2913 | 0.3965 | 0.6451 | 0.4312 | 0.4125 |
102
+ | Qwen-2-7B | 0.4814 | 0.621 | 0.6153 | 0.3448 | 0.3385 | 0.4802 | 0.7073 | 0.4949 | 0.4807 |
103
+ | Meta-Llama-3.1-8B | 0.3641 | 0.2631 | 0.2769 | 0.3793 | 0.1811 | 0.2929 | 0.6591 | 0.4239 | 0.3583 |
104
 
 
105
 
106
  ## Citation
107
 
108
  If you find our work helpful, feel free to give us a cite.
109
 
110
  ```
111
+ @misc{qwen2.5,
112
+ title = {Qwen2.5: A Party of Foundation Models},
113
+ url = {https://qwenlm.github.io/blog/qwen2.5/},
114
+ author = {Qwen Team},
115
+ month = {September},
116
+ year = {2024}
117
+ }
118
+
119
  @article{qwen2,
120
+ title={Qwen2 Technical Report},
121
+ author={An Yang and Baosong Yang and Binyuan Hui and Bo Zheng and Bowen Yu and Chang Zhou and Chengpeng Li and Chengyuan Li and Dayiheng Liu and Fei Huang and Guanting Dong and Haoran Wei and Huan Lin and Jialong Tang and Jialin Wang and Jian Yang and Jianhong Tu and Jianwei Zhang and Jianxin Ma and Jin Xu and Jingren Zhou and Jinze Bai and Jinzheng He and Junyang Lin and Kai Dang and Keming Lu and Keqin Chen and Kexin Yang and Mei Li and Mingfeng Xue and Na Ni and Pei Zhang and Peng Wang and Ru Peng and Rui Men and Ruize Gao and Runji Lin and Shijie Wang and Shuai Bai and Sinan Tan and Tianhang Zhu and Tianhao Li and Tianyu Liu and Wenbin Ge and Xiaodong Deng and Xiaohuan Zhou and Xingzhang Ren and Xinyu Zhang and Xipin Wei and Xuancheng Ren and Yang Fan and Yang Yao and Yichang Zhang and Yu Wan and Yunfei Chu and Yuqiong Liu and Zeyu Cui and Zhenru Zhang and Zhihao Fan},
122
+ journal={arXiv preprint arXiv:2407.10671},
123
+ year={2024}
124
  }
125
+