ThomasBaruzier lbourdois commited on
Commit
4957f9a
·
verified ·
1 Parent(s): 3a4cfce

Improve language tag (#1)

Browse files

- Improve language tag (01eae2a11722d8c02afbaef748426de292c05798)


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

Files changed (1) hide show
  1. README.md +188 -176
README.md CHANGED
@@ -1,177 +1,189 @@
1
- ---
2
- license: other
3
- license_name: qwen
4
- license_link: https://huggingface.co/Qwen/Qwen2.5-72B-Instruct/blob/main/LICENSE
5
- language:
6
- - en
7
- pipeline_tag: text-generation
8
- base_model: Qwen/Qwen2.5-72B
9
- tags:
10
- - chat
11
- ---
12
-
13
- <br><img src="https://cdn-uploads.huggingface.co/production/uploads/646410e04bf9122922289dc7/gDUbZOu1ND0j-th4Q6tep.jpeg" width="720"><br>
14
-
15
- # Llama.cpp imatrix quantizations of [Qwen/Qwen2.5-72B-Instruct](https://huggingface.co/Qwen/Qwen2.5-72B-Instruct)
16
-
17
- Using llama.cpp commit [3ad5451](https://github.com/ggerganov/llama.cpp/commit/3ad5451) for quantization.
18
-
19
- All quants were made using the imatrix option and Bartowski's [calibration file](https://gist.github.com/bartowski1182/eb213dccb3571f863da82e99418f81e8).
20
-
21
- <hr>
22
-
23
- # Perplexity table (the lower the better)
24
-
25
- | Quant | Size (MB) | PPL | Size (%) | Accuracy (%) | PPL error rate |
26
- | ---------------------------------------------------------------------------------------------------------------------- | --------- | --------- | -------- | ------------ | -------------- |
27
- | [IQ1_S](https://huggingface.co/ThomasBaruzier/Qwen2.5-72B-Instruct-GGUF/blob/main/Qwen2.5-72B-Instruct-IQ1_S.gguf) | 21639 | 7.6552 | 15.60 | 67.82 | 0.11 |
28
- | [IQ1_M](https://huggingface.co/ThomasBaruzier/Qwen2.5-72B-Instruct-GGUF/blob/main/Qwen2.5-72B-Instruct-IQ1_M.gguf) | 22640 | 7.2982 | 16.32 | 71.14 | 0.10 |
29
- | [IQ2_XXS](https://huggingface.co/ThomasBaruzier/Qwen2.5-72B-Instruct-GGUF/blob/main/Qwen2.5-72B-Instruct-IQ2_XXS.gguf) | 24309 | 6.3958 | 17.53 | 81.18 | 0.09 |
30
- | [IQ2_XS](https://huggingface.co/ThomasBaruzier/Qwen2.5-72B-Instruct-GGUF/blob/main/Qwen2.5-72B-Instruct-IQ2_XS.gguf) | 25804 | 6.0909 | 18.61 | 85.25 | 0.08 |
31
- | [IQ2_S](https://huggingface.co/ThomasBaruzier/Qwen2.5-72B-Instruct-GGUF/blob/main/Qwen2.5-72B-Instruct-IQ2_S.gguf) | 26644 | 6.0318 | 19.21 | 86.08 | 0.08 |
32
- | [IQ2_M](https://huggingface.co/ThomasBaruzier/Qwen2.5-72B-Instruct-GGUF/blob/main/Qwen2.5-72B-Instruct-IQ2_M.gguf) | 27979 | 5.7589 | 20.17 | 90.16 | 0.08 |
33
- | [Q2_K_S](https://huggingface.co/ThomasBaruzier/Qwen2.5-72B-Instruct-GGUF/blob/main/Qwen2.5-72B-Instruct-Q2_K_S.gguf) | 28199 | 5.9731 | 20.33 | 86.93 | 0.08 |
34
- | [Q2_K](https://huggingface.co/ThomasBaruzier/Qwen2.5-72B-Instruct-GGUF/blob/main/Qwen2.5-72B-Instruct-Q2_K.gguf) | 28430 | 5.9188 | 20.50 | 87.72 | 0.08 |
35
- | [IQ3_XXS](https://huggingface.co/ThomasBaruzier/Qwen2.5-72B-Instruct-GGUF/blob/main/Qwen2.5-72B-Instruct-IQ3_XXS.gguf) | 30369 | 5.5227 | 21.90 | 94.01 | 0.07 |
36
- | [IQ3_XS](https://huggingface.co/ThomasBaruzier/Qwen2.5-72B-Instruct-GGUF/blob/main/Qwen2.5-72B-Instruct-IQ3_XS.gguf) | 31320 | 5.4357 | 22.58 | 95.52 | 0.07 |
37
- | [IQ3_S](https://huggingface.co/ThomasBaruzier/Qwen2.5-72B-Instruct-GGUF/blob/main/Qwen2.5-72B-Instruct-IQ3_S.gguf) | 32890 | 5.3782 | 23.72 | 96.54 | 0.07 |
38
- | [Q3_K_S](https://huggingface.co/ThomasBaruzier/Qwen2.5-72B-Instruct-GGUF/blob/main/Qwen2.5-72B-Instruct-Q3_K_S.gguf) | 32890 | 5.4492 | 23.72 | 95.28 | 0.07 |
39
- | [IQ3_M](https://huggingface.co/ThomasBaruzier/Qwen2.5-72B-Instruct-GGUF/blob/main/Qwen2.5-72B-Instruct-IQ3_M.gguf) | 33858 | 5.3550 | 24.41 | 96.96 | 0.07 |
40
- | [Q3_K_M](https://huggingface.co/ThomasBaruzier/Qwen2.5-72B-Instruct-GGUF/blob/main/Qwen2.5-72B-Instruct-Q3_K_M.gguf) | 35952 | 5.4069 | 25.92 | 96.03 | 0.07 |
41
- | [Q3_K_L](https://huggingface.co/ThomasBaruzier/Qwen2.5-72B-Instruct-GGUF/blob/main/Qwen2.5-72B-Instruct-Q3_K_L.gguf) | 37675 | 5.4116 | 27.17 | 95.94 | 0.07 |
42
- | [IQ4_XS](https://huggingface.co/ThomasBaruzier/Qwen2.5-72B-Instruct-GGUF/blob/main/Qwen2.5-72B-Instruct-IQ4_XS.gguf) | 37869 | 5.2776 | 27.31 | 98.38 | 0.07 |
43
- | [IQ4_NL](https://huggingface.co/ThomasBaruzier/Qwen2.5-72B-Instruct-GGUF/blob/main/Qwen2.5-72B-Instruct-IQ4_NL.gguf) | 39401 | 5.2747 | 28.41 | 98.43 | 0.07 |
44
- | [Q4_0](https://huggingface.co/ThomasBaruzier/Qwen2.5-72B-Instruct-GGUF/blob/main/Qwen2.5-72B-Instruct-Q4_0.gguf) | 39466 | 5.2998 | 28.46 | 97.97 | 0.07 |
45
- | [Q4_K_S](https://huggingface.co/ThomasBaruzier/Qwen2.5-72B-Instruct-GGUF/blob/main/Qwen2.5-72B-Instruct-Q4_K_S.gguf) | 41856 | 5.2535 | 30.18 | 98.83 | 0.07 |
46
- | [Q4_1](https://huggingface.co/ThomasBaruzier/Qwen2.5-72B-Instruct-GGUF/blob/main/Qwen2.5-72B-Instruct-Q4_1.gguf) | 43580 | 5.2801 | 31.42 | 98.33 | 0.07 |
47
- | [Q4_K_M](https://huggingface.co/ThomasBaruzier/Qwen2.5-72B-Instruct-GGUF/blob/main/Qwen2.5-72B-Instruct-Q4_K_M.gguf) | 45219 | 5.2478 | 32.60 | 98.94 | 0.07 |
48
- | [Q5_0](https://huggingface.co/ThomasBaruzier/Qwen2.5-72B-Instruct-GGUF/blob/main/Qwen2.5-72B-Instruct-Q5_0.gguf) | 47984 | 5.2160 | 34.60 | 99.54 | 0.07 |
49
- | [Q5_K_S](https://huggingface.co/ThomasBaruzier/Qwen2.5-72B-Instruct-GGUF/blob/main/Qwen2.5-72B-Instruct-Q5_K_S.gguf) | 48995 | 5.2242 | 35.33 | 99.39 | 0.07 |
50
- | [Q5_K_M](https://huggingface.co/ThomasBaruzier/Qwen2.5-72B-Instruct-GGUF/blob/main/Qwen2.5-72B-Instruct-Q5_K_M.gguf) | 51925 | 5.2182 | 37.44 | 99.50 | 0.07 |
51
- | [Q5_1](https://huggingface.co/ThomasBaruzier/Qwen2.5-72B-Instruct-GGUF/tree/main/Qwen2.5-72B-Instruct-Q5_1) | 52099 | 5.2212 | 37.57 | 99.44 | 0.07 |
52
- | [Q6_K](https://huggingface.co/ThomasBaruzier/Qwen2.5-72B-Instruct-GGUF/tree/main/Qwen2.5-72B-Instruct-Q6_K) | 61366 | 5.1952 | 44.25 | 99.94 | 0.07 |
53
- | [Q8_0](https://huggingface.co/ThomasBaruzier/Qwen2.5-72B-Instruct-GGUF/tree/main/Qwen2.5-72B-Instruct-Q8_0) | 73683 | 5.1944 | 53.13 | 99.96 | 0.07 |
54
- | [F16](https://huggingface.co/ThomasBaruzier/Qwen2.5-72B-Instruct-GGUF/tree/main/Qwen2.5-72B-Instruct-F16) | 138685 | 5.1922 | 100 | 100 | 0.07 |
55
-
56
- <hr>
57
-
58
- # Qwen2.5-72B-Instruct
59
-
60
- ## Introduction
61
-
62
- 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:
63
-
64
- - Significantly **more knowledge** and has greatly improved capabilities in **coding** and **mathematics**, thanks to our specialized expert models in these domains.
65
- - 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.
66
- - **Long-context Support** up to 128K tokens and can generate up to 8K tokens.
67
- - **Multilingual support** for over 29 languages, including Chinese, English, French, Spanish, Portuguese, German, Italian, Russian, Japanese, Korean, Vietnamese, Thai, Arabic, and more.
68
-
69
- **This repo contains the instruction-tuned 72B Qwen2.5 model**, which has the following features:
70
- - Type: Causal Language Models
71
- - Training Stage: Pretraining & Post-training
72
- - Architecture: transformers with RoPE, SwiGLU, RMSNorm, and Attention QKV bias
73
- - Number of Parameters: 72.7B
74
- - Number of Paramaters (Non-Embedding): 70.0B
75
- - Number of Layers: 80
76
- - Number of Attention Heads (GQA): 64 for Q and 8 for KV
77
- - Context Length: Full 131,072 tokens and generation 8192 tokens
78
- - Please refer to [this section](#processing-long-texts) for detailed instructions on how to deploy Qwen2.5 for handling long texts.
79
-
80
- 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/).
81
-
82
- ## Requirements
83
-
84
- The code of Qwen2.5 has been in the latest Hugging face `transformers` and we advise you to use the latest version of `transformers`.
85
-
86
- With `transformers<4.37.0`, you will encounter the following error:
87
- ```
88
- KeyError: 'qwen2'
89
- ```
90
-
91
- ## Quickstart
92
-
93
- Here provides a code snippet with `apply_chat_template` to show you how to load the tokenizer and model and how to generate contents.
94
-
95
- ```python
96
- from transformers import AutoModelForCausalLM, AutoTokenizer
97
-
98
- model_name = "Qwen/Qwen2.5-72B-Instruct"
99
-
100
- model = AutoModelForCausalLM.from_pretrained(
101
- model_name,
102
- torch_dtype="auto",
103
- device_map="auto"
104
- )
105
- tokenizer = AutoTokenizer.from_pretrained(model_name)
106
-
107
- prompt = "Give me a short introduction to large language model."
108
- messages = [
109
- {"role": "system", "content": "You are Qwen, created by Alibaba Cloud. You are a helpful assistant."},
110
- {"role": "user", "content": prompt}
111
- ]
112
- text = tokenizer.apply_chat_template(
113
- messages,
114
- tokenize=False,
115
- add_generation_prompt=True
116
- )
117
- model_inputs = tokenizer([text], return_tensors="pt").to(model.device)
118
-
119
- generated_ids = model.generate(
120
- **model_inputs,
121
- max_new_tokens=512
122
- )
123
- generated_ids = [
124
- output_ids[len(input_ids):] for input_ids, output_ids in zip(model_inputs.input_ids, generated_ids)
125
- ]
126
-
127
- response = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0]
128
- ```
129
-
130
- ### Processing Long Texts
131
-
132
- The current `config.json` is set for context length up to 32,768 tokens.
133
- To handle extensive inputs exceeding 32,768 tokens, we utilize [YaRN](https://arxiv.org/abs/2309.00071), a technique for enhancing model length extrapolation, ensuring optimal performance on lengthy texts.
134
-
135
- For supported frameworks, you could add the following to `config.json` to enable YaRN:
136
- ```json
137
- {
138
- ...,
139
- "rope_scaling": {
140
- "factor": 4.0,
141
- "original_max_position_embeddings": 32768,
142
- "type": "yarn"
143
- }
144
- }
145
- ```
146
-
147
- For deployment, we recommend using vLLM.
148
- Please refer to our [Documentation](https://qwen.readthedocs.io/en/latest/deployment/vllm.html) for usage if you are not familar with vLLM.
149
- Presently, vLLM only supports static YARN, which means the scaling factor remains constant regardless of input length, **potentially impacting performance on shorter texts**.
150
- We advise adding the `rope_scaling` configuration only when processing long contexts is required.
151
-
152
- ## Evaluation & Performance
153
-
154
- Detailed evaluation results are reported in this [📑 blog](https://qwenlm.github.io/blog/qwen2.5/).
155
-
156
- For requirements on GPU memory and the respective throughput, see results [here](https://qwen.readthedocs.io/en/latest/benchmark/speed_benchmark.html).
157
-
158
- ## Citation
159
-
160
- If you find our work helpful, feel free to give us a cite.
161
-
162
- ```
163
- @misc{qwen2.5,
164
- title = {Qwen2.5: A Party of Foundation Models},
165
- url = {https://qwenlm.github.io/blog/qwen2.5/},
166
- author = {Qwen Team},
167
- month = {September},
168
- year = {2024}
169
- }
170
-
171
- @article{qwen2,
172
- title={Qwen2 Technical Report},
173
- 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},
174
- journal={arXiv preprint arXiv:2407.10671},
175
- year={2024}
176
- }
 
 
 
 
 
 
 
 
 
 
 
 
177
  ```
 
1
+ ---
2
+ license: other
3
+ license_name: qwen
4
+ license_link: https://huggingface.co/Qwen/Qwen2.5-72B-Instruct/blob/main/LICENSE
5
+ language:
6
+ - zho
7
+ - eng
8
+ - fra
9
+ - spa
10
+ - por
11
+ - deu
12
+ - ita
13
+ - rus
14
+ - jpn
15
+ - kor
16
+ - vie
17
+ - tha
18
+ - ara
19
+ pipeline_tag: text-generation
20
+ base_model: Qwen/Qwen2.5-72B
21
+ tags:
22
+ - chat
23
+ ---
24
+
25
+ <br><img src="https://cdn-uploads.huggingface.co/production/uploads/646410e04bf9122922289dc7/gDUbZOu1ND0j-th4Q6tep.jpeg" width="720"><br>
26
+
27
+ # Llama.cpp imatrix quantizations of [Qwen/Qwen2.5-72B-Instruct](https://huggingface.co/Qwen/Qwen2.5-72B-Instruct)
28
+
29
+ Using llama.cpp commit [3ad5451](https://github.com/ggerganov/llama.cpp/commit/3ad5451) for quantization.
30
+
31
+ All quants were made using the imatrix option and Bartowski's [calibration file](https://gist.github.com/bartowski1182/eb213dccb3571f863da82e99418f81e8).
32
+
33
+ <hr>
34
+
35
+ # Perplexity table (the lower the better)
36
+
37
+ | Quant | Size (MB) | PPL | Size (%) | Accuracy (%) | PPL error rate |
38
+ | ---------------------------------------------------------------------------------------------------------------------- | --------- | --------- | -------- | ------------ | -------------- |
39
+ | [IQ1_S](https://huggingface.co/ThomasBaruzier/Qwen2.5-72B-Instruct-GGUF/blob/main/Qwen2.5-72B-Instruct-IQ1_S.gguf) | 21639 | 7.6552 | 15.60 | 67.82 | 0.11 |
40
+ | [IQ1_M](https://huggingface.co/ThomasBaruzier/Qwen2.5-72B-Instruct-GGUF/blob/main/Qwen2.5-72B-Instruct-IQ1_M.gguf) | 22640 | 7.2982 | 16.32 | 71.14 | 0.10 |
41
+ | [IQ2_XXS](https://huggingface.co/ThomasBaruzier/Qwen2.5-72B-Instruct-GGUF/blob/main/Qwen2.5-72B-Instruct-IQ2_XXS.gguf) | 24309 | 6.3958 | 17.53 | 81.18 | 0.09 |
42
+ | [IQ2_XS](https://huggingface.co/ThomasBaruzier/Qwen2.5-72B-Instruct-GGUF/blob/main/Qwen2.5-72B-Instruct-IQ2_XS.gguf) | 25804 | 6.0909 | 18.61 | 85.25 | 0.08 |
43
+ | [IQ2_S](https://huggingface.co/ThomasBaruzier/Qwen2.5-72B-Instruct-GGUF/blob/main/Qwen2.5-72B-Instruct-IQ2_S.gguf) | 26644 | 6.0318 | 19.21 | 86.08 | 0.08 |
44
+ | [IQ2_M](https://huggingface.co/ThomasBaruzier/Qwen2.5-72B-Instruct-GGUF/blob/main/Qwen2.5-72B-Instruct-IQ2_M.gguf) | 27979 | 5.7589 | 20.17 | 90.16 | 0.08 |
45
+ | [Q2_K_S](https://huggingface.co/ThomasBaruzier/Qwen2.5-72B-Instruct-GGUF/blob/main/Qwen2.5-72B-Instruct-Q2_K_S.gguf) | 28199 | 5.9731 | 20.33 | 86.93 | 0.08 |
46
+ | [Q2_K](https://huggingface.co/ThomasBaruzier/Qwen2.5-72B-Instruct-GGUF/blob/main/Qwen2.5-72B-Instruct-Q2_K.gguf) | 28430 | 5.9188 | 20.50 | 87.72 | 0.08 |
47
+ | [IQ3_XXS](https://huggingface.co/ThomasBaruzier/Qwen2.5-72B-Instruct-GGUF/blob/main/Qwen2.5-72B-Instruct-IQ3_XXS.gguf) | 30369 | 5.5227 | 21.90 | 94.01 | 0.07 |
48
+ | [IQ3_XS](https://huggingface.co/ThomasBaruzier/Qwen2.5-72B-Instruct-GGUF/blob/main/Qwen2.5-72B-Instruct-IQ3_XS.gguf) | 31320 | 5.4357 | 22.58 | 95.52 | 0.07 |
49
+ | [IQ3_S](https://huggingface.co/ThomasBaruzier/Qwen2.5-72B-Instruct-GGUF/blob/main/Qwen2.5-72B-Instruct-IQ3_S.gguf) | 32890 | 5.3782 | 23.72 | 96.54 | 0.07 |
50
+ | [Q3_K_S](https://huggingface.co/ThomasBaruzier/Qwen2.5-72B-Instruct-GGUF/blob/main/Qwen2.5-72B-Instruct-Q3_K_S.gguf) | 32890 | 5.4492 | 23.72 | 95.28 | 0.07 |
51
+ | [IQ3_M](https://huggingface.co/ThomasBaruzier/Qwen2.5-72B-Instruct-GGUF/blob/main/Qwen2.5-72B-Instruct-IQ3_M.gguf) | 33858 | 5.3550 | 24.41 | 96.96 | 0.07 |
52
+ | [Q3_K_M](https://huggingface.co/ThomasBaruzier/Qwen2.5-72B-Instruct-GGUF/blob/main/Qwen2.5-72B-Instruct-Q3_K_M.gguf) | 35952 | 5.4069 | 25.92 | 96.03 | 0.07 |
53
+ | [Q3_K_L](https://huggingface.co/ThomasBaruzier/Qwen2.5-72B-Instruct-GGUF/blob/main/Qwen2.5-72B-Instruct-Q3_K_L.gguf) | 37675 | 5.4116 | 27.17 | 95.94 | 0.07 |
54
+ | [IQ4_XS](https://huggingface.co/ThomasBaruzier/Qwen2.5-72B-Instruct-GGUF/blob/main/Qwen2.5-72B-Instruct-IQ4_XS.gguf) | 37869 | 5.2776 | 27.31 | 98.38 | 0.07 |
55
+ | [IQ4_NL](https://huggingface.co/ThomasBaruzier/Qwen2.5-72B-Instruct-GGUF/blob/main/Qwen2.5-72B-Instruct-IQ4_NL.gguf) | 39401 | 5.2747 | 28.41 | 98.43 | 0.07 |
56
+ | [Q4_0](https://huggingface.co/ThomasBaruzier/Qwen2.5-72B-Instruct-GGUF/blob/main/Qwen2.5-72B-Instruct-Q4_0.gguf) | 39466 | 5.2998 | 28.46 | 97.97 | 0.07 |
57
+ | [Q4_K_S](https://huggingface.co/ThomasBaruzier/Qwen2.5-72B-Instruct-GGUF/blob/main/Qwen2.5-72B-Instruct-Q4_K_S.gguf) | 41856 | 5.2535 | 30.18 | 98.83 | 0.07 |
58
+ | [Q4_1](https://huggingface.co/ThomasBaruzier/Qwen2.5-72B-Instruct-GGUF/blob/main/Qwen2.5-72B-Instruct-Q4_1.gguf) | 43580 | 5.2801 | 31.42 | 98.33 | 0.07 |
59
+ | [Q4_K_M](https://huggingface.co/ThomasBaruzier/Qwen2.5-72B-Instruct-GGUF/blob/main/Qwen2.5-72B-Instruct-Q4_K_M.gguf) | 45219 | 5.2478 | 32.60 | 98.94 | 0.07 |
60
+ | [Q5_0](https://huggingface.co/ThomasBaruzier/Qwen2.5-72B-Instruct-GGUF/blob/main/Qwen2.5-72B-Instruct-Q5_0.gguf) | 47984 | 5.2160 | 34.60 | 99.54 | 0.07 |
61
+ | [Q5_K_S](https://huggingface.co/ThomasBaruzier/Qwen2.5-72B-Instruct-GGUF/blob/main/Qwen2.5-72B-Instruct-Q5_K_S.gguf) | 48995 | 5.2242 | 35.33 | 99.39 | 0.07 |
62
+ | [Q5_K_M](https://huggingface.co/ThomasBaruzier/Qwen2.5-72B-Instruct-GGUF/blob/main/Qwen2.5-72B-Instruct-Q5_K_M.gguf) | 51925 | 5.2182 | 37.44 | 99.50 | 0.07 |
63
+ | [Q5_1](https://huggingface.co/ThomasBaruzier/Qwen2.5-72B-Instruct-GGUF/tree/main/Qwen2.5-72B-Instruct-Q5_1) | 52099 | 5.2212 | 37.57 | 99.44 | 0.07 |
64
+ | [Q6_K](https://huggingface.co/ThomasBaruzier/Qwen2.5-72B-Instruct-GGUF/tree/main/Qwen2.5-72B-Instruct-Q6_K) | 61366 | 5.1952 | 44.25 | 99.94 | 0.07 |
65
+ | [Q8_0](https://huggingface.co/ThomasBaruzier/Qwen2.5-72B-Instruct-GGUF/tree/main/Qwen2.5-72B-Instruct-Q8_0) | 73683 | 5.1944 | 53.13 | 99.96 | 0.07 |
66
+ | [F16](https://huggingface.co/ThomasBaruzier/Qwen2.5-72B-Instruct-GGUF/tree/main/Qwen2.5-72B-Instruct-F16) | 138685 | 5.1922 | 100 | 100 | 0.07 |
67
+
68
+ <hr>
69
+
70
+ # Qwen2.5-72B-Instruct
71
+
72
+ ## Introduction
73
+
74
+ 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:
75
+
76
+ - Significantly **more knowledge** and has greatly improved capabilities in **coding** and **mathematics**, thanks to our specialized expert models in these domains.
77
+ - 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.
78
+ - **Long-context Support** up to 128K tokens and can generate up to 8K tokens.
79
+ - **Multilingual support** for over 29 languages, including Chinese, English, French, Spanish, Portuguese, German, Italian, Russian, Japanese, Korean, Vietnamese, Thai, Arabic, and more.
80
+
81
+ **This repo contains the instruction-tuned 72B Qwen2.5 model**, which has the following features:
82
+ - Type: Causal Language Models
83
+ - Training Stage: Pretraining & Post-training
84
+ - Architecture: transformers with RoPE, SwiGLU, RMSNorm, and Attention QKV bias
85
+ - Number of Parameters: 72.7B
86
+ - Number of Paramaters (Non-Embedding): 70.0B
87
+ - Number of Layers: 80
88
+ - Number of Attention Heads (GQA): 64 for Q and 8 for KV
89
+ - Context Length: Full 131,072 tokens and generation 8192 tokens
90
+ - Please refer to [this section](#processing-long-texts) for detailed instructions on how to deploy Qwen2.5 for handling long texts.
91
+
92
+ 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/).
93
+
94
+ ## Requirements
95
+
96
+ The code of Qwen2.5 has been in the latest Hugging face `transformers` and we advise you to use the latest version of `transformers`.
97
+
98
+ With `transformers<4.37.0`, you will encounter the following error:
99
+ ```
100
+ KeyError: 'qwen2'
101
+ ```
102
+
103
+ ## Quickstart
104
+
105
+ Here provides a code snippet with `apply_chat_template` to show you how to load the tokenizer and model and how to generate contents.
106
+
107
+ ```python
108
+ from transformers import AutoModelForCausalLM, AutoTokenizer
109
+
110
+ model_name = "Qwen/Qwen2.5-72B-Instruct"
111
+
112
+ model = AutoModelForCausalLM.from_pretrained(
113
+ model_name,
114
+ torch_dtype="auto",
115
+ device_map="auto"
116
+ )
117
+ tokenizer = AutoTokenizer.from_pretrained(model_name)
118
+
119
+ prompt = "Give me a short introduction to large language model."
120
+ messages = [
121
+ {"role": "system", "content": "You are Qwen, created by Alibaba Cloud. You are a helpful assistant."},
122
+ {"role": "user", "content": prompt}
123
+ ]
124
+ text = tokenizer.apply_chat_template(
125
+ messages,
126
+ tokenize=False,
127
+ add_generation_prompt=True
128
+ )
129
+ model_inputs = tokenizer([text], return_tensors="pt").to(model.device)
130
+
131
+ generated_ids = model.generate(
132
+ **model_inputs,
133
+ max_new_tokens=512
134
+ )
135
+ generated_ids = [
136
+ output_ids[len(input_ids):] for input_ids, output_ids in zip(model_inputs.input_ids, generated_ids)
137
+ ]
138
+
139
+ response = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0]
140
+ ```
141
+
142
+ ### Processing Long Texts
143
+
144
+ The current `config.json` is set for context length up to 32,768 tokens.
145
+ To handle extensive inputs exceeding 32,768 tokens, we utilize [YaRN](https://arxiv.org/abs/2309.00071), a technique for enhancing model length extrapolation, ensuring optimal performance on lengthy texts.
146
+
147
+ For supported frameworks, you could add the following to `config.json` to enable YaRN:
148
+ ```json
149
+ {
150
+ ...,
151
+ "rope_scaling": {
152
+ "factor": 4.0,
153
+ "original_max_position_embeddings": 32768,
154
+ "type": "yarn"
155
+ }
156
+ }
157
+ ```
158
+
159
+ For deployment, we recommend using vLLM.
160
+ Please refer to our [Documentation](https://qwen.readthedocs.io/en/latest/deployment/vllm.html) for usage if you are not familar with vLLM.
161
+ Presently, vLLM only supports static YARN, which means the scaling factor remains constant regardless of input length, **potentially impacting performance on shorter texts**.
162
+ We advise adding the `rope_scaling` configuration only when processing long contexts is required.
163
+
164
+ ## Evaluation & Performance
165
+
166
+ Detailed evaluation results are reported in this [📑 blog](https://qwenlm.github.io/blog/qwen2.5/).
167
+
168
+ For requirements on GPU memory and the respective throughput, see results [here](https://qwen.readthedocs.io/en/latest/benchmark/speed_benchmark.html).
169
+
170
+ ## Citation
171
+
172
+ If you find our work helpful, feel free to give us a cite.
173
+
174
+ ```
175
+ @misc{qwen2.5,
176
+ title = {Qwen2.5: A Party of Foundation Models},
177
+ url = {https://qwenlm.github.io/blog/qwen2.5/},
178
+ author = {Qwen Team},
179
+ month = {September},
180
+ year = {2024}
181
+ }
182
+
183
+ @article{qwen2,
184
+ title={Qwen2 Technical Report},
185
+ 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},
186
+ journal={arXiv preprint arXiv:2407.10671},
187
+ year={2024}
188
+ }
189
  ```