Improve language tag
Browse filesHi! 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.
README.md
CHANGED
@@ -1,224 +1,233 @@
|
|
1 |
-
---
|
2 |
-
license: apache-2.0
|
3 |
-
language:
|
4 |
-
-
|
5 |
-
-
|
6 |
-
-
|
7 |
-
-
|
8 |
-
|
9 |
-
-
|
10 |
-
|
11 |
-
|
12 |
-
-
|
13 |
-
-
|
14 |
-
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
-
|
22 |
-
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
-
|
185 |
-
|
186 |
-
-
|
187 |
-
-
|
188 |
-
-
|
189 |
-
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
For
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
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 |
+
```
|