manish commited on
Commit
22aaca8
1 Parent(s): a6c74eb

edit readme to link to source of fork

Browse files
Files changed (1) hide show
  1. README.md +1 -222
README.md CHANGED
@@ -4,228 +4,7 @@ language:
4
  - en
5
  duplicated_from: togethercomputer/GPT-NeoXT-Chat-Base-20B
6
  ---
7
-
8
- ***<p style="font-size: 24px">Feel free to try out our [OpenChatKit feedback app](https://huggingface.co/spaces/togethercomputer/OpenChatKit)!</p>***
9
 
10
  # GPT-NeoXT-Chat-Base-20B-v0.16
11
 
12
- > TLDR: As part of OpenChatKit (codebase available [here](https://github.com/togethercomputer/OpenChaT)),
13
- > GPT-NeoXT-Chat-Base-20B-v0.16 is a 20B parameter language model, fine-tuned from EleutherAI’s GPT-NeoX with over 40 million instructions on 100% carbon negative compute.
14
-
15
- GPT-NeoXT-Chat-Base-20B-v0.16 is based on ElutherAI’s GPT-NeoX model, and is fine-tuned with data focusing on dialog-style interactions.
16
- We focused the tuning on several tasks such as question answering, classification, extraction, and summarization.
17
- We’ve fine-tuned the model with a collection of 43 million high-quality instructions.
18
- Together partnered with LAION and Ontocord.ai, who both helped curate the dataset the model is based on.
19
- You can read more about this process and the availability of this dataset in LAION’s blog post [here](https://laion.ai/blog/oig-dataset/).
20
-
21
- In addition to the aforementioned fine-tuning, GPT-NeoXT-Chat-Base-20B-v0.16 has also undergone further fine-tuning via a small amount of feedback data.
22
- This allows the model to better adapt to human preferences in the conversations.
23
-
24
- ## Model Details
25
- - **Developed by**: Together Computer.
26
- - **Model type**: Language Model
27
- - **Language(s)**: English
28
- - **License**: Apache 2.0
29
- - **Model Description**: A 20B parameter open source chat model, fine-tuned from EleutherAI’s NeoX with over 40M instructions on 100% carbon negative compute
30
- - **Resources for more information**: [GitHub Repository](https://github.com/togethercomputer/OpenChaT).
31
-
32
- # Quick Start
33
-
34
- ## GPU Inference
35
-
36
- This requires a GPU with 48GB memory.
37
- ```python
38
- from transformers import AutoTokenizer, AutoModelForCausalLM
39
- # init
40
- tokenizer = AutoTokenizer.from_pretrained("togethercomputer/GPT-NeoXT-Chat-Base-20B")
41
- model = AutoModelForCausalLM.from_pretrained("togethercomputer/GPT-NeoXT-Chat-Base-20B", torch_dtype=torch.float16)
42
- model = model.to('cuda:0')
43
- # infer
44
- inputs = tokenizer("<human>: Hello!\n<bot>:", return_tensors='pt').to(model.device)
45
- outputs = model.generate(**inputs, max_new_tokens=10, do_sample=True, temperature=0.8)
46
- output_str = tokenizer.decode(outputs[0])
47
- print(output_str)
48
- ```
49
-
50
- ## GPU Inference in Int8
51
-
52
- This requires a GPU with 24GB memory.
53
-
54
- ```python
55
- from transformers import AutoTokenizer, AutoModelForCausalLM
56
- # init
57
- tokenizer = AutoTokenizer.from_pretrained("togethercomputer/GPT-NeoXT-Chat-Base-20B")
58
- model = AutoModelForCausalLM.from_pretrained("togethercomputer/GPT-NeoXT-Chat-Base-20B", device_map="auto", load_in_8bit=True)
59
- # infer
60
- inputs = tokenizer("<human>: Hello!\n<bot>:", return_tensors='pt').to(model.device)
61
- outputs = model.generate(**inputs, max_new_tokens=10, do_sample=True, temperature=0.8)
62
- output_str = tokenizer.decode(outputs[0])
63
- print(output_str)
64
- ```
65
-
66
- ## CPU Inference
67
-
68
- ```python
69
- from transformers import AutoTokenizer, AutoModelForCausalLM
70
- # init
71
- tokenizer = AutoTokenizer.from_pretrained("togethercomputer/GPT-NeoXT-Chat-Base-20B")
72
- model = AutoModelForCausalLM.from_pretrained("togethercomputer/GPT-NeoXT-Chat-Base-20B", torch_dtype=torch.bfloat16)
73
- # infer
74
- inputs = tokenizer("<human>: Hello!\n<bot>:", return_tensors='pt').to(model.device)
75
- outputs = model.generate(**inputs, max_new_tokens=10, do_sample=True, temperature=0.8)
76
- output_str = tokenizer.decode(outputs[0])
77
- print(output_str)
78
- ```
79
-
80
-
81
- ## Strengths of the model
82
-
83
- There are several tasks that OpenChatKit excels at out of the box. This includes:
84
-
85
- - Example 1: Summarization and question answering within context.
86
-
87
- ```markdown
88
- **Summarize a long document into a single sentence and conduct question answering related to the document, with multiple rounds**
89
-
90
- <human>: Last year, the travel industry saw a big rebound in demand — and that demand is showing no signs of slowing down this spring break travel season. Planes and hotels will be full, travelers will likely face long queues, cancellations, massive crowds and plenty of other travel nightmares. But perhaps the most frustrating thing you’ll have to prepare for this spring break is if your luggage goes missing. You’ve got to somehow track down your belongings that were in the airline’s care and then wait to be reunited — all while trying to enjoy the start of your long-awaited vacation. As far as travel nightmares go, lost luggage is up there as one of the worst.
91
-
92
- To be honest up front, I am great at strategically losing things — or rather, losing stuff with style. (I hope you appreciate the “Toy Story” reference.) So when a product comes along that’s a perfect way to keep track of my belongings — especially when traveling — I’m adding it to my travel bag.
93
-
94
- I’ve been a big fan of Apple’s $29 item tracker, dubbed AirTag. The long-rumored AirTag product finally launched in 2021, and while it’s not the first item tracker to exist, it has two key features that set it apart from the rest to make it the ultimate travel companion: access to the Find My network and Precision Finding technology.
95
-
96
- The Federal Aviation Administration has even ruled that having an AirTag in your luggage is permitted and, in fact, not a safety hazard. The devices only contain 0.1 grams of lithium, which falls below the FAA’s limit.
97
-
98
- “Luggage tracking devices powered by lithium metal cells that have 0.3 grams or less of lithium can be used on checked baggage,” the FAA said in a statement. “Apple AirTags meet this threshold; other luggage tracking devices may not.”
99
-
100
- But, you may be wondering what makes them so special and why you should carry one in your checked luggage this spring break? Let’s explain why.
101
-
102
- Summarize the above into a single paragraph.
103
-
104
- <bot>: If you're traveling this spring break, you might want to consider investing in an item tracker to help you find your lost luggage. Apple's AirTag is the best option, according to a new report.
105
-
106
- <human>: But isn't it unsafe to put AirTag in a luggage?
107
-
108
- <bot>: The Federal Aviation Administration has ruled that having an AirTag in your luggage is permitted and, in fact, not a safety hazard.
109
-
110
- <human>: Ah, why is that?
111
-
112
- <bot>: The devices only contain 0.1 grams of lithium, which falls below the FAA’s limit.
113
- ```
114
-
115
- - Example 2: Extraction.
116
-
117
- ```markdown
118
- **Extract structured information from unstructured documents, as illustrated in the following example.**
119
-
120
- <human>: Generate a table summarizing the options outlined in this email.
121
-
122
- Team, we have to make a decision on the product plan for Goocrux v2.
123
-
124
- The first option will take us 3 weeks of development, and will achieve performance of 80ms, but means that the UI has to change.
125
-
126
- The second option will take us 4 weeks of development, and will achieve performance of 60ms, without any UI change.
127
-
128
- The third option will take the longest -- 6 weeks of development, will achieve performance of 30ms, without any UI change.
129
-
130
- A markdown table with four columns: (1) Option ID, (2) Development time, (3) Performance, (4) UI Change:
131
-
132
- <bot>: #.
133
- | ID | Option ID | Development time | Performance | UI Change |
134
- | --------- | --------- | --------- | --------- | --------- |
135
- | 1 | 1 | 3 weeks | 80ms | Yes |
136
- | 2 | 2 | 4 weeks | 60ms | No |
137
- | 3 | 3 | 6 weeks | 30ms | No |
138
- ```
139
-
140
- - Example 3: Classification.
141
-
142
- ```markdown
143
- **Classifying a sentence or paragraph into different categories.**
144
-
145
- <human>: Classify the sentiment of the following sentence into Positive, Neutral, or Negative: Super excited about teaching Stanford’s first course on Large Language Models! Check the syllabus out here
146
- <bot>: Positive
147
-
148
- <human>: Classify the sentiment of the following sentence into Positive, Neutral, or Negative: How about the following sentence: It is raining outside and I feel so blue
149
- <bot>: Negative
150
- ```
151
-
152
- In addition, the model does well on few-shot prompts. For both classification and extraction, the model performs even better with few shots, as in most HELM tasks. [Contact us](https://www.together.xyz/contact) if you’re interested in trying few-shot prompts with the model.
153
-
154
- ## Weaknesses of the model
155
-
156
- That said, there are several areas where we have more work to do, and we need your help! Some of these include:
157
-
158
- - Knowledge-based closed question and answering: The chatbot may hallucinate and give incorrect results. Be sure to fact check, and if possible provide feedback with the corrected information.
159
- - Coding tasks: The chatbot was not trained on a large enough corpus of source code to excel at writing code. We welcome contributions of additional datasets to improve this!
160
- - Repetition: Sometimes the chatbot will repeat its response. We’re working to improve this, but in the meantime you can click the refresh button to start a new conversation.
161
- - Context switching: If you change the topic in the middle of a conversation the chatbot often cannot make the switch automatically and will continue to give answers related to the prior topic.
162
- - Creative writing and longer answers: The chatbot does not generate long, creative text such as an essay or story.
163
-
164
- We are excited to work with you to address these weaknesses by getting your feedback, bolstering data sets, and improving accuracy.
165
-
166
- # Uses
167
-
168
- ## Direct Use
169
-
170
- The model is intended for research purposes. Possible research areas and tasks include
171
-
172
- - Safe deployment of models which have the potential to generate harmful content.
173
- - Probing and understanding the limitations and biases of dialogue models or language models.
174
- - Generation of artworks and use in design and other artistic processes.
175
- - Applications in educational or creative tools.
176
- - Research on dialogue models or language models.
177
-
178
- Excluded uses are described below.
179
-
180
- ### Misuse, Malicious Use, and Out-of-Scope Use
181
-
182
- The OpenChatKit community provides GPT-NeoXT-Chat-Base-20B-v0.16 as an open source tool for building chatbots.
183
- The community is not responsible for any misuse, malicious use, or out-of-scope use of the model.
184
- It is the responsibility of the end user to ensure that the model is used in a responsible and ethical manner.
185
-
186
- #### Out-of-Scope Use
187
-
188
- GPT-NeoXT-Chat-Base-20B-v0.16 is designed for use in chatbot applications and may not perform well for other use cases outside of its intended scope.
189
- 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.
190
- It is important to consider the limitations of the model and to only use it for its intended purpose.
191
-
192
- #### Misuse and Malicious Use
193
-
194
- GPT-NeoXT-Chat-Base-20B-v0.16 is designed for use in chatbot applications and should not be used for any other purpose.
195
- 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.
196
-
197
- Using the model to generate content that is cruel to individuals is a misuse of this model. This includes, but is not limited to:
198
-
199
- - Generating fake news, misinformation, or propaganda
200
- - Promoting hate speech, discrimination, or violence against individuals or groups
201
- - Impersonating individuals or organizations without their consent
202
- - Engaging in cyberbullying or harassment
203
- - Defamatory content
204
- - Spamming or scamming
205
- - Sharing confidential or sensitive information without proper authorization
206
- - Violating the terms of use of the model or the data used to train it
207
- - Creating automated bots for malicious purposes such as spreading malware, phishing scams, or spamming
208
-
209
- ## Limitations
210
-
211
- GPT-NeoXT-Chat-Base-20B-v0.16, like other language model-based chatbots, has limitations that should be taken into consideration.
212
- 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.
213
- We therefore welcome contributions from individuals and organizations, and encourage collaboration towards creating a more robust and inclusive chatbot.
214
-
215
- ## Training
216
-
217
- **Training Data**
218
-
219
- Please refer to [togethercomputer/OpenDataHub](https://github.com/togethercomputer/OpenDataHub)
220
-
221
- **Training Procedure**
222
-
223
- - **Hardware:** 2 x 8 x A100 GPUs
224
- - **Optimizer:** [8bit-AdamW](https://github.com/TimDettmers/bitsandbytes)
225
- - **Gradient Accumulations**: 2
226
- - **Batch:** 2 x 2 x 64 x 2048 = 524288 tokens
227
- - **Learning rate:** warmup to 1e-6 for 100 steps and then kept constant
228
-
229
- ## Community
230
-
231
- Join us on [Together Discord](https://discord.gg/6ZVDU8tTD4)
 
4
  - en
5
  duplicated_from: togethercomputer/GPT-NeoXT-Chat-Base-20B
6
  ---
 
 
7
 
8
  # GPT-NeoXT-Chat-Base-20B-v0.16
9
 
10
+ # Fork of [togethercomputer/GPT-NeoXT-Chat-Base-20B](https://huggingface.co/togethercomputer/GPT-NeoXT-Chat-Base-20B)