You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+27-10Lines changed: 27 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -44,7 +44,16 @@ This update focuses on two main improvements: scaling up the code training data
44
44
> We updates both the special tokens and their corresponding token ids, in order to maintain consistency with Qwen2.5. The new special tokens are as the following:
> **Qwen2.5-Coder-xB-Chat** are instruction models for chatting;
88
+
> **Qwen2.5-Coder-\[1.5-7\]B-Instrcut** are instruction models for chatting;
80
89
>
81
-
> **Qwen2.5-Coder-xB** is a base model typically used for completion, serving as a better starting point for fine-tuning.
90
+
> **Qwen2.5-Coder-\[1.5-7\]B** is a base model typically used for completion, serving as a better starting point for fine-tuning.
82
91
>
83
92
### 👉🏻 Chat with Qwen2.5-Coder-7B-Instruct
84
93
You can just write several lines of code with `transformers` to chat with Qwen2.5-Coder-7B-Instruct. Essentially, we build the tokenizer and the model with `from_pretrained` method, and we use generate method to perform chatting with the help of chat template provided by the tokenizer. Below is an example of how to chat with Qwen2.5-Coder-7B-Instruct:
@@ -152,7 +161,7 @@ The `max_new_tokens` argument is used to set the maximum length of the response.
152
161
The `input_text` could be any text that you would like model to continue with.
153
162
154
163
155
-
#### 2.Processing Long Texts
164
+
#### 2.Processing Long Texts
156
165
157
166
The current `config.json` is set for context length up to 32,768 tokens.
158
167
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.
see blog <ahref="https://qwenlm.github.io/blog/qwen2.5-coder"> 📑 blog</a>.
383
+
see blog first <ahref="https://qwenlm.github.io/blog/qwen2.5-coder"> 📑 blog</a>.
384
+
375
385
376
386
377
387
## Citation
378
388
If you find our work helpful, feel free to give us a cite.
379
389
380
390
```bibtex
381
-
@article{qwen,
382
-
title={Qwen Technical Report},
383
-
author={Jinze Bai and Shuai Bai and Yunfei Chu and Zeyu Cui and Kai Dang and Xiaodong Deng and Yang Fan and Wenbin Ge and Yu Han and Fei Huang and Binyuan Hui and Luo Ji and Mei Li and Junyang Lin and Runji Lin and Dayiheng Liu and Gao Liu and Chengqiang Lu and Keming Lu and Jianxin Ma and Rui Men and Xingzhang Ren and Xuancheng Ren and Chuanqi Tan and Sinan Tan and Jianhong Tu and Peng Wang and Shijie Wang and Wei Wang and Shengguang Wu and Benfeng Xu and Jin Xu and An Yang and Hao Yang and Jian Yang and Shusheng Yang and Yang Yao and Bowen Yu and Hongyi Yuan and Zheng Yuan and Jianwei Zhang and Xingxuan Zhang and Yichang Zhang and Zhenru Zhang and Chang Zhou and Jingren Zhou and Xiaohuan Zhou and Tianhang Zhu},
384
-
journal={arXiv preprint arXiv:2309.16609},
385
-
year={2023}
391
+
@misc{qwen2.5,
392
+
title = {Qwen2.5: A Party of Foundation Models},
393
+
url = {https://qwenlm.github.io/blog/qwen2.5/},
394
+
author = {Qwen Team},
395
+
month = {September},
396
+
year = {2024}
397
+
}
398
+
@article{qwen2,
399
+
title={Qwen2 Technical Report},
400
+
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},
Copy file name to clipboardExpand all lines: examples/Qwen2.5-Coder-Instruct.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,17 +1,17 @@
1
-
# Use CodeQwen1.5-base-chat By transformers
2
-
The most significant but also the simplest usage of CodeQwen1.5-base-chat is using the `transformers` library. In this document, we show how to chat with CodeQwen1.5-base-chat in either streaming mode or not.
1
+
# Use Qwen2.5-Coder-7B-Instruct By transformers
2
+
The most significant but also the simplest usage of Qwen2.5-Coder-7B-Instruct is using the `transformers` library. In this document, we show how to chat with Qwen2.5-Coder-7B-Instruct in either streaming mode or not.
3
3
4
4
## Basic Usage
5
-
You can just write several lines of code with `transformers` to chat with CodeQwen1.5-7B-Chat. Essentially, we build the tokenizer and the model with `from_pretrained` method, and we use generate method to perform chatting with the help of chat template provided by the tokenizer. Below is an example of how to chat with CodeQwen1.5-7B-Chat:
5
+
You can just write several lines of code with `transformers` to chat with Qwen2.5-Coder-7B-Instruct. Essentially, we build the tokenizer and the model with `from_pretrained` method, and we use generate method to perform chatting with the help of chat template provided by the tokenizer. Below is an example of how to chat with Qwen2.5-Coder-7B-Instruct:
6
6
7
7
```python
8
8
from transformers import AutoTokenizer, AutoModelForCausalLM
9
9
10
10
device ="cuda"# the device to load the model onto
11
11
12
12
# Now you do not need to add "trust_remote_code=True"
Copy file name to clipboardExpand all lines: examples/Qwen2.5-Coder.md
+16-16Lines changed: 16 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,11 +1,11 @@
1
-
# Use CodeQwen1.5-base By transformers
2
-
One of the simple but fundamental ways to try CodeQwen1.5-base is to use the `transformers` library. In this document, we show how to use CodeQwen1.5-base in three common scenarios of code generation, respectively.
1
+
# Use Qwen2.5-Coder-7B By transformers
2
+
One of the simple but fundamental ways to try Qwen2.5-Coder-7B is to use the `transformers` library. In this document, we show how to use Qwen2.5-Coder-7B in three common scenarios of code generation, respectively.
3
3
4
4
5
5
## Basic Usage
6
6
The model completes the code snipplets according to the given prompts, without any additional formatting, which is usually termed as `code completion` in the code generation tasks.
7
7
8
-
Essentially, we build the tokenizer and the model with `from_pretrained` method, and we use generate method to perform code completion. Below is an example on how to chat with CodeQwen1.5-base:
8
+
Essentially, we build the tokenizer and the model with `from_pretrained` method, and we use generate method to perform code completion. Below is an example on how to chat with Qwen2.5-Coder-7B:
9
9
```python
10
10
from transformers import AutoTokenizer, AutoModelForCausalLM
As a family member of Qwen1.5, CodeQwen1.5 are supported by vLLM. The detail tutorial could be found in [Qwen tutorial](https://qwen.readthedocs.io/en/latest/deployment/vllm.html).
311
+
# Use Qwen2.5-Coder-7B By vllm
312
+
As a family member of Qwen2.5, Qwen2.5-Coder-7B are supported by vLLM. The detail tutorial could be found in [Qwen tutorial](https://qwen.readthedocs.io/en/latest/deployment/vllm.html).
313
313
Here, we only give you an simple example of offline batched inference in vLLM.
0 commit comments