codefuse-admin commited on
Commit
36d42b4
1 Parent(s): d84b8bd

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +24 -36
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 是一个**开发运维大模型**,主要致力于在 DevOps 领域发挥实际价值。目前,DevOps-Model 能够帮助工程师回答在 DevOps 生命周期中遇到的问题。欢迎访问我们 Github 获取更多信息 [DevOps-Model](https://github.com/codefuse-ai/CodeFuse-DevOps-Model)
16
 
17
- DevOps-Model-7B-Base 是我们经过高质量 DevOps 语料训练基于 Qwen-7B 加训后的 **Base** 模型。我们的 Base 模型在开源和 DevOps 领域相关的评测数据上可以取得同规模模型中的**最佳效果**。同时我们也开源了经过对齐后的 [DevOps-Model-7B-Chat](https://modelscope.cn/models/codefuse-ai/CodeFuse-DevOps-Model-7B-Chat/summary) 模型,和 14B 参数量的[DevOps-Model-14B-Base](https://modelscope.cn/models/codefuse-ai/CodeFuse-DevOps-Model-14B-Base/summary) 和 [DevOps-Model-14B-Chat](https://modelscope.cn/models/codefuse-ai/CodeFuse-DevOps-Model-14B-Chat/summary) 。
18
- <br>
19
- 同时我们也在搭建 DevOps 领域专属的评测基准 [DevOpsEval](https://github.com/luban-agi/DevOps-Eval),用来更好评测 DevOps 领域模型的效果。
20
 
 
 
21
  <br>
22
  <br>
23
 
24
- # 模型评测
25
- 我们先选取了 CMMLU CEval 两个评测数据集中和 DevOps 相关的一共六项考试。总计一共 574 道选择题,具体信息如下:
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
- |模型|模型大小|Zero-shot 得分|Five-shot 得分|
 
 
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
- 我们提供简单的示例来说明如何利用 🤗 Transformers 快速使用 Devops-Model-7B-Base 模型
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 isntall -r requirements.txt
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-7B-Base", trust_remote_code=True)
72
-
73
- model = AutoModelForCausalLM.from_pretrained("path_to_DevOps-Model-7B-Base", device_map="auto", trust_remote_code=True, bf16=True).eval()
74
 
75
- # 指定 generation_config
76
- model.generation_config = GenerationConfig.from_pretrained("path_to_DevOps-Model-7B-Base", trust_remote_code=True)
77
 
78
- inputs = '''Java 中 HashMap 的实现原理是'''
79
- input_ids = tokenizer(inputs, return_tensors='pt')
80
- input_ids = input_ids.to(model.device)
81
- pred = model.generate(**input_ids)
82
 
83
- print(tokenizer.decode(pred[0]))
84
- # Java 中 HashMap 的实现原理是数组 + 链表,数组存放的是链表中的每个节点,链表中的每个节点又存放着下一个节点的地址,从而实现了链表的遍历。当链表长度大于 8 时,链表就会转换成红黑树,从而加快了查询速度。...
85
  ```
86
 
87
 
88
 
89
- # 免责声明
90
- 由于语言模型的特性,模型生成的内容可能包含幻觉或者歧视性言论。请谨慎使用 DevOps-Model 系列模型生成的内容。
91
- 如果要公开使用或商用该模型服务,请注意服务方需承担由此产生的不良影响或有害言论的责任,本项目开发者不承担任何由使用本项目(包括但不限于数据、模型、代码等)导致的危害或损失。
92
 
93
 
94
 
95
- # 致谢
96
- 本项目参考了以下开源项目,在此对相关项目和研究开发人员表示感谢。
97
  - [LLaMA-Efficient-Tuning](https://github.com/hiyouga/LLaMA-Efficient-Tuning)
98
- - [Qwen-7B](https://github.com/QwenLM/Qwen-7B/tree/main)
 
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)