JustinLin610
commited on
Commit
•
379d674
1
Parent(s):
231cf87
Update README.md
Browse files
README.md
CHANGED
@@ -16,7 +16,7 @@ inference: false
|
|
16 |
<br>
|
17 |
|
18 |
<p align="center">
|
19 |
-
🤗 <a href="https://huggingface.co/Qwen">Hugging Face</a>   |   🤖 <a href="https://modelscope.cn/
|
20 |
<br>
|
21 |
<a href="https://github.com/QwenLM/Qwen/blob/main/assets/wechat.png">WeChat (微信)</a>   |    DingTalk (钉钉)    |   <a href="https://discord.gg/z3GAxXZ9Ce">Discord</a>  
|
22 |
</p>
|
@@ -26,11 +26,11 @@ inference: false
|
|
26 |
|
27 |
**通义千问-14B(Qwen-14B)**是阿里云研发的通义千问大模型系列的140亿参数规模的模型。Qwen-14B是基于Transformer的大语言模型, 在超大规模的预训练数据上进行训练得到。预训练数据类型多样,覆盖广泛,包括大量网络文本、专业书籍、代码等。同时,在Qwen-14B的基础上,我们使用对齐机制打造了基于大语言模型的AI助手Qwen-14B-Chat。本仓库为Qwen-14B-Chat的仓库。
|
28 |
|
29 |
-
如果您想了解更多关于通义千问-14B开源模型的细节,我们建议您参阅[
|
30 |
|
31 |
**Qwen-14B** is the 14B-parameter version of the large language model series, Qwen (abbr. Tongyi Qianwen), proposed by Alibaba Cloud. Qwen-14B is a Transformer-based large language model, which is pretrained on a large volume of data, including web texts, books, codes, etc. Additionally, based on the pretrained Qwen-14B, we release Qwen-14B-Chat, a large-model-based AI assistant, which is trained with alignment techniques. This repository is the one for Qwen-14B-Chat.
|
32 |
|
33 |
-
For more details about the open-source model of Qwen-14B, please refer to the [
|
34 |
<br>
|
35 |
|
36 |
## 要求(Requirements)
|
@@ -53,15 +53,14 @@ To run Qwen-14B-Chat, please make sure you meet the above requirements, and then
|
|
53 |
pip install transformers==4.32.0 accelerate tiktoken einops scipy transformers_stream_generator==0.0.4 peft deepspeed
|
54 |
```
|
55 |
|
56 |
-
另外,推荐安装`flash-attention
|
57 |
|
58 |
-
In addition, it is recommended to install the `flash-attention` library for higher efficiency and lower memory usage.
|
59 |
|
60 |
```bash
|
61 |
-
git clone
|
62 |
cd flash-attention && pip install .
|
63 |
# 下方安装可选,安装可能比较缓慢。
|
64 |
-
# Below are optional. Installing them might be slow.
|
65 |
# pip install csrc/layer_norm
|
66 |
# pip install csrc/rotary
|
67 |
```
|
@@ -89,8 +88,8 @@ tokenizer = AutoTokenizer.from_pretrained("Qwen/Qwen-14B-Chat", trust_remote_cod
|
|
89 |
# use auto mode, automatically select precision based on the device.
|
90 |
model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen-14B-Chat", device_map="auto", trust_remote_code=True).eval()
|
91 |
|
92 |
-
# Specify hyperparameters for generation
|
93 |
-
model.generation_config = GenerationConfig.from_pretrained("Qwen/Qwen-14B-Chat", trust_remote_code=True) # 可指定不同的生成长度、top_p等相关超参
|
94 |
|
95 |
# 第一轮对话 1st dialogue turn
|
96 |
response, history = model.chat(tokenizer, "你好", history=None)
|
@@ -113,9 +112,9 @@ print(response)
|
|
113 |
# 《奋斗创业:一个年轻人的成功之路》
|
114 |
```
|
115 |
|
116 |
-
关于更多的使用说明,请参考我们的[
|
117 |
|
118 |
-
For more information, please refer to our [
|
119 |
<br>
|
120 |
|
121 |
|
@@ -604,6 +603,22 @@ Qwen-Chat also has the capability to be used as a [HuggingFace Agent](https://hu
|
|
604 |
If you meet problems, please refer to [FAQ](https://github.com/QwenLM/Qwen/blob/main/FAQ.md) and the issues first to search a solution before you launch a new issue.
|
605 |
<br>
|
606 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
607 |
## 使用协议(License Agreement)
|
608 |
|
609 |
我们的代码和模型权重对学术研究完全开放,并支持商用。请查看[LICENSE](https://github.com/QwenLM/Qwen/blob/main/LICENSE)了解具体的开源协议细节。如需商用,欢迎填写[问卷](https://dashscope.console.aliyun.com/openModelApply/qianwen)申请。
|
|
|
16 |
<br>
|
17 |
|
18 |
<p align="center">
|
19 |
+
🤗 <a href="https://huggingface.co/Qwen">Hugging Face</a>   |   🤖 <a href="https://modelscope.cn/organization/qwen">ModelScope</a>   |    📑 <a href="https://arxiv.org/abs/2309.16609">Paper</a>   |   🖥️ <a href="https://modelscope.cn/studios/qwen/Qwen-7B-Chat-Demo/summary">Demo</a>
|
20 |
<br>
|
21 |
<a href="https://github.com/QwenLM/Qwen/blob/main/assets/wechat.png">WeChat (微信)</a>   |    DingTalk (钉钉)    |   <a href="https://discord.gg/z3GAxXZ9Ce">Discord</a>  
|
22 |
</p>
|
|
|
26 |
|
27 |
**通义千问-14B(Qwen-14B)**是阿里云研发的通义千问大模型系列的140亿参数规模的模型。Qwen-14B是基于Transformer的大语言模型, 在超大规模的预训练数据上进行训练得到。预训练数据类型多样,覆盖广泛,包括大量网络文本、专业书籍、代码等。同时,在Qwen-14B的基础上,我们使用对齐机制打造了基于大语言模型的AI助手Qwen-14B-Chat。本仓库为Qwen-14B-Chat的仓库。
|
28 |
|
29 |
+
如果您想了解更多关于通义千问-14B开源模型的细节,我们建议您参阅[GitHub代码库](https://github.com/QwenLM/Qwen)。
|
30 |
|
31 |
**Qwen-14B** is the 14B-parameter version of the large language model series, Qwen (abbr. Tongyi Qianwen), proposed by Alibaba Cloud. Qwen-14B is a Transformer-based large language model, which is pretrained on a large volume of data, including web texts, books, codes, etc. Additionally, based on the pretrained Qwen-14B, we release Qwen-14B-Chat, a large-model-based AI assistant, which is trained with alignment techniques. This repository is the one for Qwen-14B-Chat.
|
32 |
|
33 |
+
For more details about the open-source model of Qwen-14B, please refer to the [GitHub](https://github.com/QwenLM/Qwen) code repository.
|
34 |
<br>
|
35 |
|
36 |
## 要求(Requirements)
|
|
|
53 |
pip install transformers==4.32.0 accelerate tiktoken einops scipy transformers_stream_generator==0.0.4 peft deepspeed
|
54 |
```
|
55 |
|
56 |
+
另外,推荐安装`flash-attention`库(**当前已支持flash attention 2**),以实现更高的效率和更低的显存占用。
|
57 |
|
58 |
+
In addition, it is recommended to install the `flash-attention` library (**we support flash attention 2 now.**) for higher efficiency and lower memory usage.
|
59 |
|
60 |
```bash
|
61 |
+
git clone https://github.com/Dao-AILab/flash-attention
|
62 |
cd flash-attention && pip install .
|
63 |
# 下方安装可选,安装可能比较缓慢。
|
|
|
64 |
# pip install csrc/layer_norm
|
65 |
# pip install csrc/rotary
|
66 |
```
|
|
|
88 |
# use auto mode, automatically select precision based on the device.
|
89 |
model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen-14B-Chat", device_map="auto", trust_remote_code=True).eval()
|
90 |
|
91 |
+
# Specify hyperparameters for generation. But if you use transformers>=4.32.0, there is no need to do this.
|
92 |
+
# model.generation_config = GenerationConfig.from_pretrained("Qwen/Qwen-14B-Chat", trust_remote_code=True) # 可指定不同的生成长度、top_p等相关超参
|
93 |
|
94 |
# 第一轮对话 1st dialogue turn
|
95 |
response, history = model.chat(tokenizer, "你好", history=None)
|
|
|
112 |
# 《奋斗创业:一个年轻人的成功之路》
|
113 |
```
|
114 |
|
115 |
+
关于更多的使用说明,请参考我们的[GitHub repo](https://github.com/QwenLM/Qwen)获取更多信息。
|
116 |
|
117 |
+
For more information, please refer to our [GitHub repo](https://github.com/QwenLM/Qwen) for more information.
|
118 |
<br>
|
119 |
|
120 |
|
|
|
603 |
If you meet problems, please refer to [FAQ](https://github.com/QwenLM/Qwen/blob/main/FAQ.md) and the issues first to search a solution before you launch a new issue.
|
604 |
<br>
|
605 |
|
606 |
+
## 引用 (Citation)
|
607 |
+
|
608 |
+
如果你觉得我们的工作对你有帮助,欢迎引用!
|
609 |
+
|
610 |
+
If you find our work helpful, feel free to give us a cite.
|
611 |
+
|
612 |
+
```
|
613 |
+
@article{qwen,
|
614 |
+
title={Qwen Technical Report},
|
615 |
+
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},
|
616 |
+
journal={arXiv preprint arXiv:2309.16609},
|
617 |
+
year={2023}
|
618 |
+
}
|
619 |
+
```
|
620 |
+
<br>
|
621 |
+
|
622 |
## 使用协议(License Agreement)
|
623 |
|
624 |
我们的代码和模型权重对学术研究完全开放,并支持商用。请查看[LICENSE](https://github.com/QwenLM/Qwen/blob/main/LICENSE)了解具体的开源协议细节。如需商用,欢迎填写[问卷](https://dashscope.console.aliyun.com/openModelApply/qianwen)申请。
|