Commit
·
36d42b4
1
Parent(s):
d84b8bd
Update README.md
Browse files
README.md
CHANGED
@@ -12,20 +12,20 @@ license: other
|
|
12 |
🤖 <a href="https://modelscope.cn/organization/codefuse-ai" target="_blank">ModelScope</a>
|
13 |
</p>
|
14 |
|
15 |
-
DevOps-Model
|
16 |
|
17 |
-
|
18 |
-
<br>
|
19 |
-
同时我们也在搭建 DevOps 领域专属的评测基准 [DevOpsEval](https://github.com/luban-agi/DevOps-Eval),用来更好评测 DevOps 领域模型的效果。
|
20 |
|
|
|
|
|
21 |
<br>
|
22 |
<br>
|
23 |
|
24 |
-
#
|
25 |
-
|
26 |
|
27 |
-
|
|
28 |
-
|
29 |
| CMMLU | Computer science | 204 |
|
30 |
| CMMLU | Computer security | 171 |
|
31 |
| CMMLU | Machine learning | 122 |
|
@@ -33,9 +33,10 @@ DevOps-Model-7B-Base 是我们经过高质量 DevOps 语料训练基于 Qwen-7B
|
|
33 |
| CEval | Computer architecture | 21 |
|
34 |
| CEval | Computernetwork | 19 |
|
35 |
|
36 |
-
我们分别测试了 Zero-shot 和 Five-shot 的结果,我们的 DevOps-Model-7B-Base 模型可以在测试的同规模的开源 Base 模型中取得最高的成绩,后续我们也会进行更多的测试。
|
37 |
|
38 |
-
|
|
|
|
|
39 |
|--|--|--|--|
|
40 |
|**DevOps-Model-7B-Base**|**7B**|**62.72**|**62.02**|
|
41 |
|Qwen-7B-Base|7B|55.75|56.0|
|
@@ -46,20 +47,14 @@ DevOps-Model-7B-Base 是我们经过高质量 DevOps 语料训练基于 Qwen-7B
|
|
46 |
|
47 |
<br>
|
48 |
|
49 |
-
#
|
50 |
-
|
51 |
-
|
52 |
-
## 要求
|
53 |
-
- python 3.8 及以上版本
|
54 |
-
- pytorch 2.0 及以上版本
|
55 |
-
- 建议使用CUDA 11.4及以上
|
56 |
-
|
57 |
|
58 |
## 依赖项安装
|
59 |
下载模型后,直接通过以下命令安装 requirements.txt 中的包就可以
|
60 |
```bash
|
61 |
cd path_to_download_model
|
62 |
-
pip
|
63 |
```
|
64 |
|
65 |
## 模型推理示例
|
@@ -68,31 +63,24 @@ pip isntall -r requirements.txt
|
|
68 |
from transformers import AutoModelForCausalLM, AutoTokenizer
|
69 |
from transformers.generation import GenerationConfig
|
70 |
|
71 |
-
tokenizer = AutoTokenizer.from_pretrained("path_to_DevOps-Model
|
72 |
-
|
73 |
-
model = AutoModelForCausalLM.from_pretrained("path_to_DevOps-Model-7B-Base", device_map="auto", trust_remote_code=True, bf16=True).eval()
|
74 |
|
75 |
-
|
76 |
-
model.generation_config = GenerationConfig.from_pretrained("path_to_DevOps-Model-7B-Base", trust_remote_code=True)
|
77 |
|
78 |
-
|
79 |
-
input_ids = tokenizer(inputs, return_tensors='pt')
|
80 |
-
input_ids = input_ids.to(model.device)
|
81 |
-
pred = model.generate(**input_ids)
|
82 |
|
83 |
-
|
84 |
-
# Java 中 HashMap 的实现原理是数组 + 链表,数组存放的是链表中的每个节点,链表中的每个节点又存放着下一个节点的地址,从而实现了链表的遍历。当链表长度大于 8 时,链表就会转换成红黑树,从而加快了查询速度。...
|
85 |
```
|
86 |
|
87 |
|
88 |
|
89 |
-
#
|
90 |
-
|
91 |
-
|
92 |
|
93 |
|
94 |
|
95 |
-
#
|
96 |
-
|
97 |
- [LLaMA-Efficient-Tuning](https://github.com/hiyouga/LLaMA-Efficient-Tuning)
|
98 |
-
- [
|
|
|
12 |
🤖 <a href="https://modelscope.cn/organization/codefuse-ai" target="_blank">ModelScope</a>
|
13 |
</p>
|
14 |
|
15 |
+
DevOps-Model is a Chinese **DevOps large model**, mainly dedicated to exerting practical value in the field of DevOps. Currently, DevOps-Model can help engineers answer questions encountered in the all DevOps life cycle.
|
16 |
|
17 |
+
Based on the Qwen series of models, we output the **Base** model after additional training with high-quality Chinese DevOps corpus, and then output the **Chat** model after alignment with DevOps QA data. Our Base model and Chat model can achieve the best results among models of the same scale based on evaluation data related to the DevOps fields.
|
|
|
|
|
18 |
|
19 |
+
<br>
|
20 |
+
At the same time, we are also building an evaluation benchmark [DevOpsEval](https://github.com/codefuse-ai/codefuse-devops-eval) exclusive to the DevOps field to better evaluate the effect of the DevOps field model.
|
21 |
<br>
|
22 |
<br>
|
23 |
|
24 |
+
# Evaluation
|
25 |
+
We first selected a total of six exams related to DevOps in the two evaluation data sets of CMMLU and CEval. There are a total of 574 multiple-choice questions. The specific information is as follows:
|
26 |
|
27 |
+
| Evaluation dataset | Exam subjects | Number of questions |
|
28 |
+
|:-------:|:-------:|:-------:|
|
29 |
| CMMLU | Computer science | 204 |
|
30 |
| CMMLU | Computer security | 171 |
|
31 |
| CMMLU | Machine learning | 122 |
|
|
|
33 |
| CEval | Computer architecture | 21 |
|
34 |
| CEval | Computernetwork | 19 |
|
35 |
|
|
|
36 |
|
37 |
+
We tested the results of Zero-shot and Five-shot respectively. Our 7B and 14B series models can achieve the best results among the tested models. More tests will be released later.
|
38 |
+
|
39 |
+
|Model|Zero-shot Score|Five-shot Score|
|
40 |
|--|--|--|--|
|
41 |
|**DevOps-Model-7B-Base**|**7B**|**62.72**|**62.02**|
|
42 |
|Qwen-7B-Base|7B|55.75|56.0|
|
|
|
47 |
|
48 |
<br>
|
49 |
|
50 |
+
# Quickstart
|
51 |
+
We provide simple examples to illustrate how to quickly use Devops-Model-Chat models with 🤗 Transformers.
|
|
|
|
|
|
|
|
|
|
|
|
|
52 |
|
53 |
## 依赖项安装
|
54 |
下载模型后,直接通过以下命令安装 requirements.txt 中的包就可以
|
55 |
```bash
|
56 |
cd path_to_download_model
|
57 |
+
pip install -r requirements.txt
|
58 |
```
|
59 |
|
60 |
## 模型推理示例
|
|
|
63 |
from transformers import AutoModelForCausalLM, AutoTokenizer
|
64 |
from transformers.generation import GenerationConfig
|
65 |
|
66 |
+
tokenizer = AutoTokenizer.from_pretrained("path_to_DevOps-Model", trust_remote_code=True)
|
|
|
|
|
67 |
|
68 |
+
model = AutoModelForCausalLM.from_pretrained("path_to_DevOps-Model", device_map="auto", trust_remote_code=True, bf16=True).eval()
|
|
|
69 |
|
70 |
+
model.generation_config = GenerationConfig.from_pretrained("path_to_DevOps-Model", trust_remote_code=True)
|
|
|
|
|
|
|
71 |
|
72 |
+
resp2, hist2 = model.chat(query='What is the difference between HashMap and Hashtable in Java', tokenizer=tokenizer, history=hist)
|
|
|
73 |
```
|
74 |
|
75 |
|
76 |
|
77 |
+
# Disclaimer
|
78 |
+
Due to the characteristics of language models, the content generated by the model may contain hallucinations or discriminatory remarks. Please use the content generated by the DevOps-Model family of models with caution.
|
79 |
+
If you want to use this model service publicly or commercially, please note that the service provider needs to bear the responsibility for the adverse effects or harmful remarks caused by it. The developer of this project does not assume any responsibility for any consequences caused by the use of this project (including but not limited to data, models, codes, etc.) ) resulting in harm or loss.
|
80 |
|
81 |
|
82 |
|
83 |
+
# Acknowledgments
|
84 |
+
This project refers to the following open source projects, and I would like to express my gratitude to the relevant projects and research and development personnel.
|
85 |
- [LLaMA-Efficient-Tuning](https://github.com/hiyouga/LLaMA-Efficient-Tuning)
|
86 |
+
- [QwenLM](https://github.com/QwenLM)
|