ZekeWang commited on
Commit
b16848a
1 Parent(s): fc570d4

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +46 -8
README.md CHANGED
@@ -1,19 +1,48 @@
1
  ---
2
- license: other
3
  language:
4
- - zh
5
  - en
6
- metrics:
7
- - accuracy
8
  library_name: transformers
9
  pipeline_tag: text-generation
 
 
 
 
 
 
 
 
 
 
 
10
  ---
11
 
12
- ## Inference
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
13
 
14
  ```
15
  from transformers import AutoModelForCausalLM, AutoTokenizer
16
-
17
  tokenizer = AutoTokenizer.from_pretrained(
18
  'Nanbeige/Nanbeige2-8B-Chat',
19
  use_fast=False,
@@ -25,7 +54,6 @@ model = AutoModelForCausalLM.from_pretrained(
25
  device_map='auto',
26
  trust_remote_code=True
27
  )
28
-
29
  messages = [
30
  {'role': 'user', 'content': 'Hello'}
31
  ]
@@ -37,7 +65,17 @@ prompt = tokenizer.apply_chat_template(
37
  input_ids = tokenizer(prompt, add_special_tokens=False, return_tensors='pt').input_ids
38
  output_ids = model.generate(input_ids.to('cuda'))
39
  resp = tokenizer.decode(output_ids[0][len(input_ids[0]):], skip_special_tokens=True)
40
-
41
  print(resp)
42
  ```
43
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ license: apache-2.0
3
  language:
 
4
  - en
5
+ - zh
 
6
  library_name: transformers
7
  pipeline_tag: text-generation
8
+ tags:
9
+ - llm
10
+ - nanbeige
11
+ - custom_code
12
+ extra_gated_prompt: "访问此模型需要阅读并同意以下协议[这里](https://github.com/Nanbeige/Nanbeige/blob/main/%E5%8D%97%E5%8C%97%E9%98%81%E5%A4%A7%E8%AF%AD%E8%A8%80%E6%A8%A1%E5%9E%8B%E8%AE%B8%E5%8F%AF%E5%8D%8F%E8%AE%AE.pdf)\nAccess to this model requires reading and agreeing to the following agreement [here](https://github.com/Nanbeige/Nanbeige/blob/main/License_Agreement_for_Large_Language_Models_Nanbeige.pdf)"
13
+ extra_gated_fields:
14
+ Name: text
15
+ Country: text
16
+ Affiliation: text
17
+ Email: text
18
+ I agree to the license terms described in the above agreement: checkbox
19
  ---
20
 
21
+ <!-- markdownlint-disable first-line-h1 -->
22
+
23
+ <!-- markdownlint-disable html -->
24
+
25
+ <div align="center">
26
+ <h1>
27
+ Nanbeige2-8B-Chat
28
+ </h1>
29
+ </div>
30
+
31
+ <p align="center">
32
+ <a href="https://github.com/Nanbeige/Nanbeige" target="_blank">💻Github</a>
33
+ </p>
34
+
35
+
36
+ ## <span id="Introduction">模型介绍(Introduction)</span>
37
+
38
+ Nanbeige2-8B-Chat是南北阁实验室最新研发的80亿参数模型,在预训练中使用4.5T Tokens高质量语料。特别地,我们通过引入大量合成数据来解决中文高质量数据的稀缺问题,并取得了显著收益。
39
+
40
+ The Nanbeige2-8B-Chat is the latest 8B model developed by the Nanbeige Lab, which utilized 4.5T tokens of high-quality training data during its the training phase. Notably, we have introduced synthetic data to address the scarcity of high-quality Chinese data, which proved significant improvement.
41
+
42
+ ## <span id="Inference">模型推理(Inference)</span>
43
 
44
  ```
45
  from transformers import AutoModelForCausalLM, AutoTokenizer
 
46
  tokenizer = AutoTokenizer.from_pretrained(
47
  'Nanbeige/Nanbeige2-8B-Chat',
48
  use_fast=False,
 
54
  device_map='auto',
55
  trust_remote_code=True
56
  )
 
57
  messages = [
58
  {'role': 'user', 'content': 'Hello'}
59
  ]
 
65
  input_ids = tokenizer(prompt, add_special_tokens=False, return_tensors='pt').input_ids
66
  output_ids = model.generate(input_ids.to('cuda'))
67
  resp = tokenizer.decode(output_ids[0][len(input_ids[0]):], skip_special_tokens=True)
 
68
  print(resp)
69
  ```
70
 
71
+ ## <span id="Limitations">局限性(Limitations)</span>
72
+
73
+ 虽然我们在训练过程中非常注重模型的安全性,力求确保其输出符合伦理和法律要求的文本,但由于模型大小和概率生成范式的限制,无法完全避免产生各种不符合预期的输出情况。这些输出可能包含偏见、歧视等有害内容,请勿传播这些内容。我们不承担因传播不良信息而导致的任何后果。
74
+
75
+ While we place great emphasis on the safety of the model during the training process, striving to ensure that its outputs align with ethical and legal requirements, it may not completely avoid generating unexpected outputs due to the model's size and probabilistic nature. These outputs may include harmful content such as bias or discrimination. Please don't propagate such content. We do not assume any responsibility for the consequences resulting from the dissemination of inappropriate information.
76
+
77
+ ## <span id="License">协议(License)</span>
78
+
79
+ 使用 Nanbeige 模型时,您必须遵守 Apache 2.0 许可证和[《南北阁大语言模型许可协议》](https://huggingface.co/Nanbeige/Nanbeige-16B-Base-32k/resolve/main/南北阁大语言模型许可协议.pdf)。如果您打算将 Nanbeige 模型或其衍生产品用于商业目的,请通过以下联系邮箱 [email protected] 提交申请材料,以满足《南北阁大语言模型许可协议》的要求。经过审核后,我们将授予您非排他性、全球范围内、不可转让、不可再许可、可撤销的商业版权许可。
80
+
81
+ When using the Nanbeige models, you must comply with the Apache 2.0 License and the [License Agreement for Large Language Models Nanbeige](https://huggingface.co/Nanbeige/Nanbeige-16B-Base-32k/resolve/main/License_Agreement_for_Large_Language_Models_Nanbeige.pdf). If you intend to use the Nanbeige Models or its derivatives for commercial purposes, please submit application materials to meet the requirements of the Nanbeige Models Community License Agreement by contacting [email protected]. After review, We will grant you a non-exclusive, worldwide, non-transferable, non-sublicensable and revocable commercial copyright license.