Transformers
chat
ThomasBaruzier lbourdois commited on
Commit
7413df3
·
verified ·
1 Parent(s): 0fb6b4c

Improve language tag (#1)

Browse files

- Improve language tag (f8000238c396a2af3838ccbc2fb4db7387b0254a)


Co-authored-by: Loïck BOURDOIS <[email protected]>

Files changed (1) hide show
  1. README.md +164 -152
README.md CHANGED
@@ -1,153 +1,165 @@
1
- ---
2
- license: apache-2.0
3
- license_link: https://huggingface.co/Qwen/QwQ-32B-Preview/blob/main/LICENSE
4
- language:
5
- - en
6
- base_model: Qwen/Qwen2.5-32B-Instruct
7
- tags:
8
- - chat
9
- library_name: transformers
10
- ---
11
-
12
- <hr>
13
-
14
- # ExllamaV2 quantizations of Qwen/QwQ-32B-Preview
15
-
16
- <img src="https://cdn-uploads.huggingface.co/production/uploads/646410e04bf9122922289dc7/EuI1mJxPIfBW2Dl3GzW6w.jpeg" alt="qwen" width="60%"/>
17
-
18
- Using ExllamaV2 commit [735fa7b](https://github.com/turboderp/exllamav2/commit/735fa7b) for quantization.
19
-
20
- Original model: [Qwen/QwQ-32B-Preview](https://huggingface.co/Qwen/QwQ-32B-Preview)
21
-
22
- All quants were made using the default [calibration files](https://github.com/turboderp/exllamav2/tree/master/exllamav2/conversion/standard_cal_data).
23
-
24
- <hr>
25
-
26
- # Branches
27
-
28
- | Precision | Size |
29
- | -------------------------------------------------------------------------------- | ------- |
30
- | [2.5bpw](https://huggingface.co/ThomasBaruzier/QwQ-32B-Preview-EXL2/tree/2.5bpw) | 11374MB |
31
- | [2.6bpw](https://huggingface.co/ThomasBaruzier/QwQ-32B-Preview-EXL2/tree/2.6bpw) | 11743MB |
32
- | [2.7bpw](https://huggingface.co/ThomasBaruzier/QwQ-32B-Preview-EXL2/tree/2.7bpw) | 12118MB |
33
- | [2.8bpw](https://huggingface.co/ThomasBaruzier/QwQ-32B-Preview-EXL2/tree/2.8bpw) | 12490MB |
34
- | [2.9bpw](https://huggingface.co/ThomasBaruzier/QwQ-32B-Preview-EXL2/tree/2.9bpw) | 12863MB |
35
- | [3.0bpw](https://huggingface.co/ThomasBaruzier/QwQ-32B-Preview-EXL2/tree/3.0bpw) | 13234MB |
36
- | [3.1bpw](https://huggingface.co/ThomasBaruzier/QwQ-32B-Preview-EXL2/tree/3.1bpw) | 13601MB |
37
- | [3.2bpw](https://huggingface.co/ThomasBaruzier/QwQ-32B-Preview-EXL2/tree/3.2bpw) | 13978MB |
38
- | [3.3bpw](https://huggingface.co/ThomasBaruzier/QwQ-32B-Preview-EXL2/tree/3.3bpw) | 14348MB |
39
- | [3.4bpw](https://huggingface.co/ThomasBaruzier/QwQ-32B-Preview-EXL2/tree/3.4bpw) | 14722MB |
40
- | [3.5bpw](https://huggingface.co/ThomasBaruzier/QwQ-32B-Preview-EXL2/tree/3.5bpw) | 15088MB |
41
- | [3.6bpw](https://huggingface.co/ThomasBaruzier/QwQ-32B-Preview-EXL2/tree/3.6bpw) | 15466MB |
42
- | [3.7bpw](https://huggingface.co/ThomasBaruzier/QwQ-32B-Preview-EXL2/tree/3.7bpw) | 15836MB |
43
- | [3.8bpw](https://huggingface.co/ThomasBaruzier/QwQ-32B-Preview-EXL2/tree/3.8bpw) | 16195MB |
44
- | [3.9bpw](https://huggingface.co/ThomasBaruzier/QwQ-32B-Preview-EXL2/tree/3.9bpw) | 16570MB |
45
- | [4.0bpw](https://huggingface.co/ThomasBaruzier/QwQ-32B-Preview-EXL2/tree/4.0bpw) | 16954MB |
46
- | [4.1bpw](https://huggingface.co/ThomasBaruzier/QwQ-32B-Preview-EXL2/tree/4.1bpw) | 17323MB |
47
- | [4.2bpw](https://huggingface.co/ThomasBaruzier/QwQ-32B-Preview-EXL2/tree/4.2bpw) | 17694MB |
48
- | [4.3bpw](https://huggingface.co/ThomasBaruzier/QwQ-32B-Preview-EXL2/tree/4.3bpw) | 18068MB |
49
- | [4.4bpw](https://huggingface.co/ThomasBaruzier/QwQ-32B-Preview-EXL2/tree/4.4bpw) | 18440MB |
50
- | [4.5bpw](https://huggingface.co/ThomasBaruzier/QwQ-32B-Preview-EXL2/tree/4.5bpw) | 18811MB |
51
- | [4.7bpw](https://huggingface.co/ThomasBaruzier/QwQ-32B-Preview-EXL2/tree/4.7bpw) | 19572MB |
52
- | [5.0bpw](https://huggingface.co/ThomasBaruzier/QwQ-32B-Preview-EXL2/tree/5.0bpw) | 20657MB |
53
- | [5.5bpw](https://huggingface.co/ThomasBaruzier/QwQ-32B-Preview-EXL2/tree/5.5bpw) | 22527MB |
54
- | [6.0bpw](https://huggingface.co/ThomasBaruzier/QwQ-32B-Preview-EXL2/tree/6.0bpw) | 24389MB |
55
- | [8.0bpw](https://huggingface.co/ThomasBaruzier/QwQ-32B-Preview-EXL2/tree/8.0bpw) | 30158MB |
56
-
57
- <hr>
58
-
59
- # Perplexity table (the lower the better)
60
-
61
- <hr>
62
-
63
- # QwQ-32B-Preview
64
-
65
- ## Introduction
66
-
67
- **QwQ-32B-Preview** is an experimental research model developed by the Qwen Team, focused on advancing AI reasoning capabilities. As a preview release, it demonstrates promising analytical abilities while having several important limitations:
68
-
69
- 1. **Language Mixing and Code-Switching**: The model may mix languages or switch between them unexpectedly, affecting response clarity.
70
- 2. **Recursive Reasoning Loops**: The model may enter circular reasoning patterns, leading to lengthy responses without a conclusive answer.
71
- 3. **Safety and Ethical Considerations**: The model requires enhanced safety measures to ensure reliable and secure performance, and users should exercise caution when deploying it.
72
- 4. **Performance and Benchmark Limitations**: The model excels in math and coding but has room for improvement in other areas, such as common sense reasoning and nuanced language understanding.
73
-
74
- **Specification**:
75
- - Type: Causal Language Models
76
- - Training Stage: Pretraining & Post-training
77
- - Architecture: transformers with RoPE, SwiGLU, RMSNorm, and Attention QKV bias
78
- - Number of Parameters: 32.5B
79
- - Number of Paramaters (Non-Embedding): 31.0B
80
- - Number of Layers: 64
81
- - Number of Attention Heads (GQA): 40 for Q and 8 for KV
82
- - Context Length: Full 32,768 tokens
83
-
84
- For more details, please refer to our [blog](https://qwenlm.github.io/blog/qwq-32b-preview/). You can also check Qwen2.5 [GitHub](https://github.com/QwenLM/Qwen2.5), and [Documentation](https://qwen.readthedocs.io/en/latest/).
85
-
86
- ## Requirements
87
-
88
- The code of Qwen2.5 has been in the latest Hugging face `transformers` and we advise you to use the latest version of `transformers`.
89
-
90
- With `transformers<4.37.0`, you will encounter the following error:
91
- ```
92
- KeyError: 'qwen2'
93
- ```
94
-
95
- ## Quickstart
96
-
97
- Here provides a code snippet with `apply_chat_template` to show you how to load the tokenizer and model and how to generate contents.
98
-
99
- ```python
100
- from transformers import AutoModelForCausalLM, AutoTokenizer
101
-
102
- model_name = "Qwen/QwQ-32B-Preview"
103
-
104
- model = AutoModelForCausalLM.from_pretrained(
105
- model_name,
106
- torch_dtype="auto",
107
- device_map="auto"
108
- )
109
- tokenizer = AutoTokenizer.from_pretrained(model_name)
110
-
111
- prompt = "How many r in strawberry."
112
- messages = [
113
- {"role": "system", "content": "You are a helpful and harmless assistant. You are Qwen developed by Alibaba. You should think step-by-step."},
114
- {"role": "user", "content": prompt}
115
- ]
116
- text = tokenizer.apply_chat_template(
117
- messages,
118
- tokenize=False,
119
- add_generation_prompt=True
120
- )
121
- model_inputs = tokenizer([text], return_tensors="pt").to(model.device)
122
-
123
- generated_ids = model.generate(
124
- **model_inputs,
125
- max_new_tokens=512
126
- )
127
- generated_ids = [
128
- output_ids[len(input_ids):] for input_ids, output_ids in zip(model_inputs.input_ids, generated_ids)
129
- ]
130
-
131
- response = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0]
132
- ```
133
-
134
- ## Citation
135
-
136
- If you find our work helpful, feel free to give us a cite.
137
-
138
- ```
139
- @misc{qwq-32b-preview,
140
- title = {QwQ: Reflect Deeply on the Boundaries of the Unknown},
141
- url = {https://qwenlm.github.io/blog/qwq-32b-preview/},
142
- author = {Qwen Team},
143
- month = {November},
144
- year = {2024}
145
- }
146
-
147
- @article{qwen2,
148
- title={Qwen2 Technical Report},
149
- 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},
150
- journal={arXiv preprint arXiv:2407.10671},
151
- year={2024}
152
- }
 
 
 
 
 
 
 
 
 
 
 
 
153
  ```
 
1
+ ---
2
+ license: apache-2.0
3
+ license_link: https://huggingface.co/Qwen/QwQ-32B-Preview/blob/main/LICENSE
4
+ language:
5
+ - zho
6
+ - eng
7
+ - fra
8
+ - spa
9
+ - por
10
+ - deu
11
+ - ita
12
+ - rus
13
+ - jpn
14
+ - kor
15
+ - vie
16
+ - tha
17
+ - ara
18
+ base_model: Qwen/Qwen2.5-32B-Instruct
19
+ tags:
20
+ - chat
21
+ library_name: transformers
22
+ ---
23
+
24
+ <hr>
25
+
26
+ # ExllamaV2 quantizations of Qwen/QwQ-32B-Preview
27
+
28
+ <img src="https://cdn-uploads.huggingface.co/production/uploads/646410e04bf9122922289dc7/EuI1mJxPIfBW2Dl3GzW6w.jpeg" alt="qwen" width="60%"/>
29
+
30
+ Using ExllamaV2 commit [735fa7b](https://github.com/turboderp/exllamav2/commit/735fa7b) for quantization.
31
+
32
+ Original model: [Qwen/QwQ-32B-Preview](https://huggingface.co/Qwen/QwQ-32B-Preview)
33
+
34
+ All quants were made using the default [calibration files](https://github.com/turboderp/exllamav2/tree/master/exllamav2/conversion/standard_cal_data).
35
+
36
+ <hr>
37
+
38
+ # Branches
39
+
40
+ | Precision | Size |
41
+ | -------------------------------------------------------------------------------- | ------- |
42
+ | [2.5bpw](https://huggingface.co/ThomasBaruzier/QwQ-32B-Preview-EXL2/tree/2.5bpw) | 11374MB |
43
+ | [2.6bpw](https://huggingface.co/ThomasBaruzier/QwQ-32B-Preview-EXL2/tree/2.6bpw) | 11743MB |
44
+ | [2.7bpw](https://huggingface.co/ThomasBaruzier/QwQ-32B-Preview-EXL2/tree/2.7bpw) | 12118MB |
45
+ | [2.8bpw](https://huggingface.co/ThomasBaruzier/QwQ-32B-Preview-EXL2/tree/2.8bpw) | 12490MB |
46
+ | [2.9bpw](https://huggingface.co/ThomasBaruzier/QwQ-32B-Preview-EXL2/tree/2.9bpw) | 12863MB |
47
+ | [3.0bpw](https://huggingface.co/ThomasBaruzier/QwQ-32B-Preview-EXL2/tree/3.0bpw) | 13234MB |
48
+ | [3.1bpw](https://huggingface.co/ThomasBaruzier/QwQ-32B-Preview-EXL2/tree/3.1bpw) | 13601MB |
49
+ | [3.2bpw](https://huggingface.co/ThomasBaruzier/QwQ-32B-Preview-EXL2/tree/3.2bpw) | 13978MB |
50
+ | [3.3bpw](https://huggingface.co/ThomasBaruzier/QwQ-32B-Preview-EXL2/tree/3.3bpw) | 14348MB |
51
+ | [3.4bpw](https://huggingface.co/ThomasBaruzier/QwQ-32B-Preview-EXL2/tree/3.4bpw) | 14722MB |
52
+ | [3.5bpw](https://huggingface.co/ThomasBaruzier/QwQ-32B-Preview-EXL2/tree/3.5bpw) | 15088MB |
53
+ | [3.6bpw](https://huggingface.co/ThomasBaruzier/QwQ-32B-Preview-EXL2/tree/3.6bpw) | 15466MB |
54
+ | [3.7bpw](https://huggingface.co/ThomasBaruzier/QwQ-32B-Preview-EXL2/tree/3.7bpw) | 15836MB |
55
+ | [3.8bpw](https://huggingface.co/ThomasBaruzier/QwQ-32B-Preview-EXL2/tree/3.8bpw) | 16195MB |
56
+ | [3.9bpw](https://huggingface.co/ThomasBaruzier/QwQ-32B-Preview-EXL2/tree/3.9bpw) | 16570MB |
57
+ | [4.0bpw](https://huggingface.co/ThomasBaruzier/QwQ-32B-Preview-EXL2/tree/4.0bpw) | 16954MB |
58
+ | [4.1bpw](https://huggingface.co/ThomasBaruzier/QwQ-32B-Preview-EXL2/tree/4.1bpw) | 17323MB |
59
+ | [4.2bpw](https://huggingface.co/ThomasBaruzier/QwQ-32B-Preview-EXL2/tree/4.2bpw) | 17694MB |
60
+ | [4.3bpw](https://huggingface.co/ThomasBaruzier/QwQ-32B-Preview-EXL2/tree/4.3bpw) | 18068MB |
61
+ | [4.4bpw](https://huggingface.co/ThomasBaruzier/QwQ-32B-Preview-EXL2/tree/4.4bpw) | 18440MB |
62
+ | [4.5bpw](https://huggingface.co/ThomasBaruzier/QwQ-32B-Preview-EXL2/tree/4.5bpw) | 18811MB |
63
+ | [4.7bpw](https://huggingface.co/ThomasBaruzier/QwQ-32B-Preview-EXL2/tree/4.7bpw) | 19572MB |
64
+ | [5.0bpw](https://huggingface.co/ThomasBaruzier/QwQ-32B-Preview-EXL2/tree/5.0bpw) | 20657MB |
65
+ | [5.5bpw](https://huggingface.co/ThomasBaruzier/QwQ-32B-Preview-EXL2/tree/5.5bpw) | 22527MB |
66
+ | [6.0bpw](https://huggingface.co/ThomasBaruzier/QwQ-32B-Preview-EXL2/tree/6.0bpw) | 24389MB |
67
+ | [8.0bpw](https://huggingface.co/ThomasBaruzier/QwQ-32B-Preview-EXL2/tree/8.0bpw) | 30158MB |
68
+
69
+ <hr>
70
+
71
+ # Perplexity table (the lower the better)
72
+
73
+ <hr>
74
+
75
+ # QwQ-32B-Preview
76
+
77
+ ## Introduction
78
+
79
+ **QwQ-32B-Preview** is an experimental research model developed by the Qwen Team, focused on advancing AI reasoning capabilities. As a preview release, it demonstrates promising analytical abilities while having several important limitations:
80
+
81
+ 1. **Language Mixing and Code-Switching**: The model may mix languages or switch between them unexpectedly, affecting response clarity.
82
+ 2. **Recursive Reasoning Loops**: The model may enter circular reasoning patterns, leading to lengthy responses without a conclusive answer.
83
+ 3. **Safety and Ethical Considerations**: The model requires enhanced safety measures to ensure reliable and secure performance, and users should exercise caution when deploying it.
84
+ 4. **Performance and Benchmark Limitations**: The model excels in math and coding but has room for improvement in other areas, such as common sense reasoning and nuanced language understanding.
85
+
86
+ **Specification**:
87
+ - Type: Causal Language Models
88
+ - Training Stage: Pretraining & Post-training
89
+ - Architecture: transformers with RoPE, SwiGLU, RMSNorm, and Attention QKV bias
90
+ - Number of Parameters: 32.5B
91
+ - Number of Paramaters (Non-Embedding): 31.0B
92
+ - Number of Layers: 64
93
+ - Number of Attention Heads (GQA): 40 for Q and 8 for KV
94
+ - Context Length: Full 32,768 tokens
95
+
96
+ For more details, please refer to our [blog](https://qwenlm.github.io/blog/qwq-32b-preview/). You can also check Qwen2.5 [GitHub](https://github.com/QwenLM/Qwen2.5), and [Documentation](https://qwen.readthedocs.io/en/latest/).
97
+
98
+ ## Requirements
99
+
100
+ The code of Qwen2.5 has been in the latest Hugging face `transformers` and we advise you to use the latest version of `transformers`.
101
+
102
+ With `transformers<4.37.0`, you will encounter the following error:
103
+ ```
104
+ KeyError: 'qwen2'
105
+ ```
106
+
107
+ ## Quickstart
108
+
109
+ Here provides a code snippet with `apply_chat_template` to show you how to load the tokenizer and model and how to generate contents.
110
+
111
+ ```python
112
+ from transformers import AutoModelForCausalLM, AutoTokenizer
113
+
114
+ model_name = "Qwen/QwQ-32B-Preview"
115
+
116
+ model = AutoModelForCausalLM.from_pretrained(
117
+ model_name,
118
+ torch_dtype="auto",
119
+ device_map="auto"
120
+ )
121
+ tokenizer = AutoTokenizer.from_pretrained(model_name)
122
+
123
+ prompt = "How many r in strawberry."
124
+ messages = [
125
+ {"role": "system", "content": "You are a helpful and harmless assistant. You are Qwen developed by Alibaba. You should think step-by-step."},
126
+ {"role": "user", "content": prompt}
127
+ ]
128
+ text = tokenizer.apply_chat_template(
129
+ messages,
130
+ tokenize=False,
131
+ add_generation_prompt=True
132
+ )
133
+ model_inputs = tokenizer([text], return_tensors="pt").to(model.device)
134
+
135
+ generated_ids = model.generate(
136
+ **model_inputs,
137
+ max_new_tokens=512
138
+ )
139
+ generated_ids = [
140
+ output_ids[len(input_ids):] for input_ids, output_ids in zip(model_inputs.input_ids, generated_ids)
141
+ ]
142
+
143
+ response = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0]
144
+ ```
145
+
146
+ ## Citation
147
+
148
+ If you find our work helpful, feel free to give us a cite.
149
+
150
+ ```
151
+ @misc{qwq-32b-preview,
152
+ title = {QwQ: Reflect Deeply on the Boundaries of the Unknown},
153
+ url = {https://qwenlm.github.io/blog/qwq-32b-preview/},
154
+ author = {Qwen Team},
155
+ month = {November},
156
+ year = {2024}
157
+ }
158
+
159
+ @article{qwen2,
160
+ title={Qwen2 Technical Report},
161
+ 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},
162
+ journal={arXiv preprint arXiv:2407.10671},
163
+ year={2024}
164
+ }
165
  ```