lbourdois commited on
Commit
a2e83b4
·
verified ·
1 Parent(s): abb95b2

Improve language tag

Browse files

Hi! As the model is multilingual, this is a PR to add other languages than English to the language tag to improve the referencing. Note that 29 languages are announced in the README, but only 13 are explicitly listed. I was therefore only able to add these 13 languages.

Files changed (1) hide show
  1. README.md +233 -224
README.md CHANGED
@@ -1,224 +1,233 @@
1
- ---
2
- license: apache-2.0
3
- language:
4
- - en
5
- - it
6
- - zh
7
- - fr
8
- base_model:
9
- - Qwen/Qwen2.5-1.5B-Instruct
10
- pipeline_tag: text-generation
11
- tags:
12
- - llamafile
13
- - chat
14
- - exe
15
- ---
16
-
17
- # Qwen2.5-1.5B-Instruct-GGUF - llamafile
18
-
19
- The Repo is wrongly named 1.6b, but well at least it will be easier to spot it!
20
-
21
- - Model creator: [Fabio Matricardi](https://huggingface.co/FM-1976)
22
- - Original model: [Qwen/Qwen2.5-1.5B-Instruct-GGUF](https://huggingface.co/Qwen/Qwen2.5-1.5B-Instruct-GGUF)
23
-
24
- Fabio Matricardi packaged the Qwen 2.5 models into executable weights that we
25
- call [llamafiles](https://github.com/Mozilla-Ocho/llamafile). This gives
26
- you the easiest fastest way to use the model on Linux, MacOS, Windows,
27
- FreeBSD, OpenBSD and NetBSD systems you control on both AMD64 and ARM64.
28
-
29
- *Software Last Updated: 2025-03-31*
30
-
31
- *Llamafile Version: 0.9.2*
32
-
33
- *The executable will start with a context window set to 24k tokens*
34
-
35
- ## Quickstart
36
-
37
- To get started, you need both the Qwen 2.5 weights, and the llamafile
38
- software. Both of them are included in a single file, which can be
39
- downloaded and run as follows:
40
-
41
- ```
42
- wget https://huggingface.co/FM-1976/Qwen2.5-1.6b-llamafile/resolve/main/QwenPortable.llamafile
43
- chmod +x QwenPortable.llamafile
44
- ./QwenPortable.llamafile
45
- ```
46
- For Windows user:
47
-
48
- simply rename the extension from `QwenPortable.llamafile` to `QwenPortable.exe`
49
-
50
- The default mode of operation for these llamafiles is our new command
51
- line chatbot interface.
52
- At the same time a Web interface is available at `http://127.0.0.1:8080/` and also exposed to your internal Network.
53
-
54
- An OpenAI compatible API endpoint server will be listening at `http://localhost:8080/v1`
55
-
56
-
57
- ## Usage
58
-
59
- You can use triple quotes to ask questions on multiple lines. You can
60
- pass commands like `/stats` and `/context` to see runtime status
61
- information. You can change the system prompt by passing the `-p "new
62
- system prompt"` flag. You can press CTRL-C to interrupt the model.
63
- Finally CTRL-D may be used to exit.
64
-
65
- If you prefer to use a web GUI, then a `--server` mode is provided, that
66
- will open a tab with a chatbot and completion interface in your browser.
67
- For additional help on how it may be used, pass the `--help` flag. The
68
- server also has an OpenAI API compatible completions endpoint that can
69
- be accessed via Python using the `openai` pip package.
70
-
71
- ```
72
- When you launch the executable the oepnAI API server is started automatically
73
- ```
74
-
75
- An advanced CLI mode is provided that's useful for shell scripting. You
76
- can use it by passing the `--cli` flag. For additional help on how it
77
- may be used, pass the `--help` flag.
78
-
79
-
80
-
81
-
82
- ## Quickstart with python and openAI API endpoint
83
-
84
- Here provides a code snippet with `apply_chat_template` to show you how to load the tokenizer and model and how to generate contents.
85
-
86
- ```python
87
- # Chat with an intelligent assistant in your terminal
88
- from openai import OpenAI
89
- import sys
90
-
91
- # Point to the local server
92
- client = OpenAI(base_url="http://localhost:8080/v1", api_key="not-needed")
93
- history = [
94
- {"role": "system", "content": "You are QWEN-PORTABLE, an intelligent assistant. You always provide well-reasoned answers that are both correct and helpful. Always reply in the language of the instructions."},
95
- {"role": "user", "content": "Hello, introduce yourself to someone opening this program for the first time. Be concise."},
96
- ]
97
- print("\033[92;1m")
98
- while True:
99
- userinput = ""
100
- completion = client.chat.completions.create(
101
- model="local-model", # this field is currently unused
102
- messages=history,
103
- temperature=0.3,
104
- frequency_penalty = 1.4,
105
- max_tokens = 600,
106
- stream=True,
107
- )
108
-
109
- new_message = {"role": "assistant", "content": ""}
110
-
111
- for chunk in completion:
112
- if chunk.choices[0].delta.content:
113
- print(chunk.choices[0].delta.content, end="", flush=True)
114
- new_message["content"] += chunk.choices[0].delta.content
115
-
116
- history.append(new_message)
117
-
118
- print("\033[1;30m") #dark grey
119
- print("Enter your text (end input with Ctrl+D on Unix or Ctrl+Z on Windows) - type quit! to exit the chatroom:")
120
- print("\033[91;1m") #red
121
- lines = sys.stdin.readlines()
122
- for line in lines:
123
- userinput += line + "\n"
124
- if "quit!" in lines[0].lower():
125
- print("\033[0mBYE BYE!")
126
- break
127
- history = [
128
- {"role": "system", "content": "You are an intelligent assistant. You always provide well-reasoned answers that are both correct and helpful."},
129
- ]
130
- history.append({"role": "user", "content": userinput})
131
- print("\033[92;1m")
132
-
133
- ```
134
-
135
-
136
- ## Context Window
137
-
138
- This model has a max context window size of 128k tokens. By default, a
139
- context window size of 8192 tokens is used. You can ask llamafile
140
- to use the maximum context size by passing the `-c 0` flag. That's big
141
- enough for a small book. If you want to be able to have a conversation
142
- with your book, you can use the `-f book.txt` flag.
143
-
144
- ## GPU Acceleration
145
-
146
- On GPUs with sufficient RAM, the `-ngl 999` flag may be passed to use
147
- the system's NVIDIA or AMD GPU(s). On Windows, only the graphics card
148
- driver needs to be installed if you own an NVIDIA GPU. On Windows, if
149
- you have an AMD GPU, you should install the ROCm SDK v6.1 and then pass
150
- the flags `--recompile --gpu amd` the first time you run your llamafile.
151
-
152
- On NVIDIA GPUs, by default, the prebuilt tinyBLAS library is used to
153
- perform matrix multiplications. This is open source software, but it
154
- doesn't go as fast as closed source cuBLAS. If you have the CUDA SDK
155
- installed on your system, then you can pass the `--recompile` flag to
156
- build a GGML CUDA library just for your system that uses cuBLAS. This
157
- ensures you get maximum performance.
158
-
159
- For further information, please see the [llamafile
160
- README](https://github.com/mozilla-ocho/llamafile/).
161
-
162
- ## About llamafile
163
-
164
- llamafile is a new format introduced by Mozilla on Nov 20th 2023. It
165
- uses Cosmopolitan Libc to turn LLM weights into runnable llama.cpp
166
- binaries that run on the stock installs of six OSes for both ARM64 and
167
- AMD64.
168
-
169
- ---
170
-
171
- # Qwen2.5-1.5B-Instruct-GGUF
172
-
173
- ## Introduction
174
-
175
- 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:
176
-
177
- - Significantly **more knowledge** and has greatly improved capabilities in **coding** and **mathematics**, thanks to our specialized expert models in these domains.
178
- - 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.
179
- - **Long-context Support** up to 128K tokens and can generate up to 8K tokens.
180
- - **Multilingual support** for over 29 languages, including Chinese, English, French, Spanish, Portuguese, German, Italian, Russian, Japanese, Korean, Vietnamese, Thai, Arabic, and more.
181
-
182
- **This repo contains the instruction-tuned 1.5B Qwen2.5 model in the GGUF Format**, which has the following features:
183
- - Type: Causal Language Models
184
- - Training Stage: Pretraining & Post-training
185
- - Architecture: transformers with RoPE, SwiGLU, RMSNorm, Attention QKV bias and tied word embeddings
186
- - Number of Parameters: 1.54B
187
- - Number of Paramaters (Non-Embedding): 1.31B
188
- - Number of Layers: 28
189
- - Number of Attention Heads (GQA): 12 for Q and 2 for KV
190
- - Context Length: Full 32,768 tokens and generation 8192 tokens
191
-
192
-
193
- 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/).
194
-
195
-
196
-
197
-
198
- ## Evaluation & Performance
199
-
200
- Detailed evaluation results are reported in this [📑 blog](https://qwenlm.github.io/blog/qwen2.5/).
201
-
202
- For quantized models, the benchmark results against the original bfloat16 models can be found [here](https://qwen.readthedocs.io/en/latest/benchmark/quantization_benchmark.html)
203
-
204
- For requirements on GPU memory and the respective throughput, see results [here](https://qwen.readthedocs.io/en/latest/benchmark/speed_benchmark.html).
205
-
206
- ## Citation
207
-
208
- If you find our work helpful, feel free to give us a cite.
209
-
210
- ```
211
- @misc{qwen2.5,
212
- title = {Qwen2.5: A Party of Foundation Models},
213
- url = {https://qwenlm.github.io/blog/qwen2.5/},
214
- author = {Qwen Team},
215
- month = {September},
216
- year = {2024}
217
- }
218
- @article{qwen2,
219
- title={Qwen2 Technical Report},
220
- 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},
221
- journal={arXiv preprint arXiv:2407.10671},
222
- year={2024}
223
- }
224
- ```
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ language:
4
+ - zho
5
+ - eng
6
+ - fra
7
+ - spa
8
+ - por
9
+ - deu
10
+ - ita
11
+ - rus
12
+ - jpn
13
+ - kor
14
+ - vie
15
+ - tha
16
+ - ara
17
+ base_model:
18
+ - Qwen/Qwen2.5-1.5B-Instruct
19
+ pipeline_tag: text-generation
20
+ tags:
21
+ - llamafile
22
+ - chat
23
+ - exe
24
+ ---
25
+
26
+ # Qwen2.5-1.5B-Instruct-GGUF - llamafile
27
+
28
+ The Repo is wrongly named 1.6b, but well at least it will be easier to spot it!
29
+
30
+ - Model creator: [Fabio Matricardi](https://huggingface.co/FM-1976)
31
+ - Original model: [Qwen/Qwen2.5-1.5B-Instruct-GGUF](https://huggingface.co/Qwen/Qwen2.5-1.5B-Instruct-GGUF)
32
+
33
+ Fabio Matricardi packaged the Qwen 2.5 models into executable weights that we
34
+ call [llamafiles](https://github.com/Mozilla-Ocho/llamafile). This gives
35
+ you the easiest fastest way to use the model on Linux, MacOS, Windows,
36
+ FreeBSD, OpenBSD and NetBSD systems you control on both AMD64 and ARM64.
37
+
38
+ *Software Last Updated: 2025-03-31*
39
+
40
+ *Llamafile Version: 0.9.2*
41
+
42
+ *The executable will start with a context window set to 24k tokens*
43
+
44
+ ## Quickstart
45
+
46
+ To get started, you need both the Qwen 2.5 weights, and the llamafile
47
+ software. Both of them are included in a single file, which can be
48
+ downloaded and run as follows:
49
+
50
+ ```
51
+ wget https://huggingface.co/FM-1976/Qwen2.5-1.6b-llamafile/resolve/main/QwenPortable.llamafile
52
+ chmod +x QwenPortable.llamafile
53
+ ./QwenPortable.llamafile
54
+ ```
55
+ For Windows user:
56
+
57
+ simply rename the extension from `QwenPortable.llamafile` to `QwenPortable.exe`
58
+
59
+ The default mode of operation for these llamafiles is our new command
60
+ line chatbot interface.
61
+ At the same time a Web interface is available at `http://127.0.0.1:8080/` and also exposed to your internal Network.
62
+
63
+ An OpenAI compatible API endpoint server will be listening at `http://localhost:8080/v1`
64
+
65
+
66
+ ## Usage
67
+
68
+ You can use triple quotes to ask questions on multiple lines. You can
69
+ pass commands like `/stats` and `/context` to see runtime status
70
+ information. You can change the system prompt by passing the `-p "new
71
+ system prompt"` flag. You can press CTRL-C to interrupt the model.
72
+ Finally CTRL-D may be used to exit.
73
+
74
+ If you prefer to use a web GUI, then a `--server` mode is provided, that
75
+ will open a tab with a chatbot and completion interface in your browser.
76
+ For additional help on how it may be used, pass the `--help` flag. The
77
+ server also has an OpenAI API compatible completions endpoint that can
78
+ be accessed via Python using the `openai` pip package.
79
+
80
+ ```
81
+ When you launch the executable the oepnAI API server is started automatically
82
+ ```
83
+
84
+ An advanced CLI mode is provided that's useful for shell scripting. You
85
+ can use it by passing the `--cli` flag. For additional help on how it
86
+ may be used, pass the `--help` flag.
87
+
88
+
89
+
90
+
91
+ ## Quickstart with python and openAI API endpoint
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
+ # Chat with an intelligent assistant in your terminal
97
+ from openai import OpenAI
98
+ import sys
99
+
100
+ # Point to the local server
101
+ client = OpenAI(base_url="http://localhost:8080/v1", api_key="not-needed")
102
+ history = [
103
+ {"role": "system", "content": "You are QWEN-PORTABLE, an intelligent assistant. You always provide well-reasoned answers that are both correct and helpful. Always reply in the language of the instructions."},
104
+ {"role": "user", "content": "Hello, introduce yourself to someone opening this program for the first time. Be concise."},
105
+ ]
106
+ print("\033[92;1m")
107
+ while True:
108
+ userinput = ""
109
+ completion = client.chat.completions.create(
110
+ model="local-model", # this field is currently unused
111
+ messages=history,
112
+ temperature=0.3,
113
+ frequency_penalty = 1.4,
114
+ max_tokens = 600,
115
+ stream=True,
116
+ )
117
+
118
+ new_message = {"role": "assistant", "content": ""}
119
+
120
+ for chunk in completion:
121
+ if chunk.choices[0].delta.content:
122
+ print(chunk.choices[0].delta.content, end="", flush=True)
123
+ new_message["content"] += chunk.choices[0].delta.content
124
+
125
+ history.append(new_message)
126
+
127
+ print("\033[1;30m") #dark grey
128
+ print("Enter your text (end input with Ctrl+D on Unix or Ctrl+Z on Windows) - type quit! to exit the chatroom:")
129
+ print("\033[91;1m") #red
130
+ lines = sys.stdin.readlines()
131
+ for line in lines:
132
+ userinput += line + "\n"
133
+ if "quit!" in lines[0].lower():
134
+ print("\033[0mBYE BYE!")
135
+ break
136
+ history = [
137
+ {"role": "system", "content": "You are an intelligent assistant. You always provide well-reasoned answers that are both correct and helpful."},
138
+ ]
139
+ history.append({"role": "user", "content": userinput})
140
+ print("\033[92;1m")
141
+
142
+ ```
143
+
144
+
145
+ ## Context Window
146
+
147
+ This model has a max context window size of 128k tokens. By default, a
148
+ context window size of 8192 tokens is used. You can ask llamafile
149
+ to use the maximum context size by passing the `-c 0` flag. That's big
150
+ enough for a small book. If you want to be able to have a conversation
151
+ with your book, you can use the `-f book.txt` flag.
152
+
153
+ ## GPU Acceleration
154
+
155
+ On GPUs with sufficient RAM, the `-ngl 999` flag may be passed to use
156
+ the system's NVIDIA or AMD GPU(s). On Windows, only the graphics card
157
+ driver needs to be installed if you own an NVIDIA GPU. On Windows, if
158
+ you have an AMD GPU, you should install the ROCm SDK v6.1 and then pass
159
+ the flags `--recompile --gpu amd` the first time you run your llamafile.
160
+
161
+ On NVIDIA GPUs, by default, the prebuilt tinyBLAS library is used to
162
+ perform matrix multiplications. This is open source software, but it
163
+ doesn't go as fast as closed source cuBLAS. If you have the CUDA SDK
164
+ installed on your system, then you can pass the `--recompile` flag to
165
+ build a GGML CUDA library just for your system that uses cuBLAS. This
166
+ ensures you get maximum performance.
167
+
168
+ For further information, please see the [llamafile
169
+ README](https://github.com/mozilla-ocho/llamafile/).
170
+
171
+ ## About llamafile
172
+
173
+ llamafile is a new format introduced by Mozilla on Nov 20th 2023. It
174
+ uses Cosmopolitan Libc to turn LLM weights into runnable llama.cpp
175
+ binaries that run on the stock installs of six OSes for both ARM64 and
176
+ AMD64.
177
+
178
+ ---
179
+
180
+ # Qwen2.5-1.5B-Instruct-GGUF
181
+
182
+ ## Introduction
183
+
184
+ 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:
185
+
186
+ - Significantly **more knowledge** and has greatly improved capabilities in **coding** and **mathematics**, thanks to our specialized expert models in these domains.
187
+ - 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.
188
+ - **Long-context Support** up to 128K tokens and can generate up to 8K tokens.
189
+ - **Multilingual support** for over 29 languages, including Chinese, English, French, Spanish, Portuguese, German, Italian, Russian, Japanese, Korean, Vietnamese, Thai, Arabic, and more.
190
+
191
+ **This repo contains the instruction-tuned 1.5B Qwen2.5 model in the GGUF Format**, which has the following features:
192
+ - Type: Causal Language Models
193
+ - Training Stage: Pretraining & Post-training
194
+ - Architecture: transformers with RoPE, SwiGLU, RMSNorm, Attention QKV bias and tied word embeddings
195
+ - Number of Parameters: 1.54B
196
+ - Number of Paramaters (Non-Embedding): 1.31B
197
+ - Number of Layers: 28
198
+ - Number of Attention Heads (GQA): 12 for Q and 2 for KV
199
+ - Context Length: Full 32,768 tokens and generation 8192 tokens
200
+
201
+
202
+ 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/).
203
+
204
+
205
+
206
+
207
+ ## Evaluation & Performance
208
+
209
+ Detailed evaluation results are reported in this [📑 blog](https://qwenlm.github.io/blog/qwen2.5/).
210
+
211
+ For quantized models, the benchmark results against the original bfloat16 models can be found [here](https://qwen.readthedocs.io/en/latest/benchmark/quantization_benchmark.html)
212
+
213
+ For requirements on GPU memory and the respective throughput, see results [here](https://qwen.readthedocs.io/en/latest/benchmark/speed_benchmark.html).
214
+
215
+ ## Citation
216
+
217
+ If you find our work helpful, feel free to give us a cite.
218
+
219
+ ```
220
+ @misc{qwen2.5,
221
+ title = {Qwen2.5: A Party of Foundation Models},
222
+ url = {https://qwenlm.github.io/blog/qwen2.5/},
223
+ author = {Qwen Team},
224
+ month = {September},
225
+ year = {2024}
226
+ }
227
+ @article{qwen2,
228
+ title={Qwen2 Technical Report},
229
+ 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},
230
+ journal={arXiv preprint arXiv:2407.10671},
231
+ year={2024}
232
+ }
233
+ ```