Update README.md
Browse files
README.md
CHANGED
@@ -1,3 +1,141 @@
|
|
1 |
---
|
2 |
license: apache-2.0
|
|
|
|
|
3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
---
|
2 |
license: apache-2.0
|
3 |
+
language:
|
4 |
+
- en
|
5 |
---
|
6 |
+
|
7 |
+
# RedPajama-Base-INCITE-6.9B
|
8 |
+
|
9 |
+
TODO:
|
10 |
+
|
11 |
+
> TLDR: RedPajama-Base-INCITE-6.9B is a 6.9B parameter language model.
|
12 |
+
|
13 |
+
RedPajama-Base-INCITE-6.9B is TODO.
|
14 |
+
|
15 |
+
## Model Details
|
16 |
+
- **Developed by**: Together Computer.
|
17 |
+
- **Model type**: Language Model
|
18 |
+
- **Language(s)**: English
|
19 |
+
- **License**: Apache 2.0
|
20 |
+
- **Model Description**: A 6.9B parameter open source language model.
|
21 |
+
- **Resources for more information**: TODO.
|
22 |
+
|
23 |
+
# Quick Start
|
24 |
+
|
25 |
+
## GPU Inference
|
26 |
+
|
27 |
+
This requires a GPU with 8GB memory.
|
28 |
+
```python
|
29 |
+
from transformers import AutoTokenizer, AutoModelForCausalLM
|
30 |
+
# init
|
31 |
+
tokenizer = AutoTokenizer.from_pretrained("togethercomputer/RedPajama-Base-INCITE-6.9B-v1")
|
32 |
+
model = AutoModelForCausalLM.from_pretrained("togethercomputer/RedPajama-Base-INCITE-6.9B-v1", torch_dtype=torch.float16)
|
33 |
+
model = model.to('cuda:0')
|
34 |
+
# infer
|
35 |
+
inputs = tokenizer("Hello", return_tensors='pt').to(model.device)
|
36 |
+
outputs = model.generate(**inputs, max_new_tokens=10, do_sample=True, temperature=0.8)
|
37 |
+
output_str = tokenizer.decode(outputs[0])
|
38 |
+
print(output_str)
|
39 |
+
```
|
40 |
+
|
41 |
+
## GPU Inference in Int8
|
42 |
+
|
43 |
+
This requires a GPU with 6GB memory.
|
44 |
+
|
45 |
+
```python
|
46 |
+
from transformers import AutoTokenizer, AutoModelForCausalLM
|
47 |
+
# init
|
48 |
+
tokenizer = AutoTokenizer.from_pretrained("togethercomputer/RedPajama-Base-INCITE-6.9B-v1")
|
49 |
+
model = AutoModelForCausalLM.from_pretrained("togethercomputer/RedPajama-Base-INCITE-6.9B-v1", device_map="auto", load_in_8bit=True)
|
50 |
+
# infer
|
51 |
+
inputs = tokenizer("Hello", return_tensors='pt').to(model.device)
|
52 |
+
outputs = model.generate(**inputs, max_new_tokens=10, do_sample=True, temperature=0.8)
|
53 |
+
output_str = tokenizer.decode(outputs[0])
|
54 |
+
print(output_str)
|
55 |
+
```
|
56 |
+
|
57 |
+
## CPU Inference
|
58 |
+
|
59 |
+
```python
|
60 |
+
from transformers import AutoTokenizer, AutoModelForCausalLM
|
61 |
+
# init
|
62 |
+
tokenizer = AutoTokenizer.from_pretrained("togethercomputer/RedPajama-Base-INCITE-6.9B-v1")
|
63 |
+
model = AutoModelForCausalLM.from_pretrained("togethercomputer/RedPajama-Base-INCITE-6.9B-v1", torch_dtype=torch.bfloat16)
|
64 |
+
# infer
|
65 |
+
inputs = tokenizer("<human>: Hello!\n<bot>:", return_tensors='pt').to(model.device)
|
66 |
+
outputs = model.generate(**inputs, max_new_tokens=10, do_sample=True, temperature=0.8)
|
67 |
+
output_str = tokenizer.decode(outputs[0])
|
68 |
+
print(output_str)
|
69 |
+
```
|
70 |
+
|
71 |
+
|
72 |
+
# Uses
|
73 |
+
|
74 |
+
## Direct Use
|
75 |
+
|
76 |
+
The model is intended for research purposes. Possible research areas and tasks include
|
77 |
+
|
78 |
+
- Safe deployment of models which have the potential to generate harmful content.
|
79 |
+
- Probing and understanding the limitations and biases of dialogue models or language models.
|
80 |
+
- Generation of artworks and use in design and other artistic processes.
|
81 |
+
- Applications in educational or creative tools.
|
82 |
+
- Research on dialogue models or language models.
|
83 |
+
|
84 |
+
Excluded uses are described below.
|
85 |
+
|
86 |
+
### Misuse, Malicious Use, and Out-of-Scope Use
|
87 |
+
|
88 |
+
TODO:
|
89 |
+
The OpenChatKit community provides RedPajama-Base-INCITE-6.9B as an open source tool for building chatbots.
|
90 |
+
The community is not responsible for any misuse, malicious use, or out-of-scope use of the model.
|
91 |
+
It is the responsibility of the end user to ensure that the model is used in a responsible and ethical manner.
|
92 |
+
|
93 |
+
#### Out-of-Scope Use
|
94 |
+
|
95 |
+
TODO:
|
96 |
+
RedPajama-Base-INCITE-6.9B is designed for use in chatbot applications and may not perform well for other use cases outside of its intended scope.
|
97 |
+
For example, it may not be suitable for use in safety-critical applications or for making decisions that have a significant impact on individuals or society.
|
98 |
+
It is important to consider the limitations of the model and to only use it for its intended purpose.
|
99 |
+
|
100 |
+
#### Misuse and Malicious Use
|
101 |
+
|
102 |
+
TODO:
|
103 |
+
RedPajama-Base-INCITE-6.9B is designed for use in chatbot applications and should not be used for any other purpose.
|
104 |
+
Misuse of the model, such as using it to engage in illegal or unethical activities, is strictly prohibited and goes against the principles of the OpenChatKit community project.
|
105 |
+
|
106 |
+
Using the model to generate content that is cruel to individuals is a misuse of this model. This includes, but is not limited to:
|
107 |
+
|
108 |
+
- Generating fake news, misinformation, or propaganda
|
109 |
+
- Promoting hate speech, discrimination, or violence against individuals or groups
|
110 |
+
- Impersonating individuals or organizations without their consent
|
111 |
+
- Engaging in cyberbullying or harassment
|
112 |
+
- Defamatory content
|
113 |
+
- Spamming or scamming
|
114 |
+
- Sharing confidential or sensitive information without proper authorization
|
115 |
+
- Violating the terms of use of the model or the data used to train it
|
116 |
+
- Creating automated bots for malicious purposes such as spreading malware, phishing scams, or spamming
|
117 |
+
|
118 |
+
## Limitations
|
119 |
+
|
120 |
+
TODO:
|
121 |
+
RedPajama-Base-INCITE-6.9B, like other language model-based chatbots, has limitations that should be taken into consideration.
|
122 |
+
For example, the model may not always provide accurate or relevant answers, particularly for questions that are complex, ambiguous, or outside of its training data.
|
123 |
+
We therefore welcome contributions from individuals and organizations, and encourage collaboration towards creating a more robust and inclusive chatbot.
|
124 |
+
|
125 |
+
## Training
|
126 |
+
|
127 |
+
**Training Data**
|
128 |
+
|
129 |
+
Please refer to [togethercomputer/RedPajama-Data-1T](https://huggingface.co/datasets/togethercomputer/RedPajama-Data-1T)
|
130 |
+
|
131 |
+
**Training Procedure**
|
132 |
+
|
133 |
+
- **Hardware:** TODO @Dan
|
134 |
+
- **Optimizer:**
|
135 |
+
- **Gradient Accumulations**:
|
136 |
+
- **Num of Tokens:** 800B Tokens
|
137 |
+
- **Learning rate:**
|
138 |
+
|
139 |
+
## Community
|
140 |
+
|
141 |
+
Join us on [Together Discord](https://discord.gg/6ZVDU8tTD4)
|