theblackcat102 commited on
Commit
0a3a3d5
1 Parent(s): ee5b07d

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +254 -0
README.md CHANGED
@@ -1,3 +1,257 @@
1
  ---
2
  license: apache-2.0
 
 
 
 
 
 
 
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  license: apache-2.0
3
+ language:
4
+ - en
5
+ tags:
6
+ - sft
7
+ pipeline_tag: text-generation
8
+ widget:
9
+ - text: <prefix>You are a helpful assistant model trained by LAION called Aki</prefix><human>Hi, how are you?<bot>
10
+ - text: <human>What's the Earth total population<bot>
11
+ - text: <human>Write a story about future of AI development<bot>
12
  ---
13
+
14
+ # Pythia 3B SFT model revision 1
15
+
16
+ <!-- Provide a quick summary of what the model is/does. -->
17
+
18
+
19
+ # Model Details
20
+
21
+ ## Model Description
22
+
23
+ Model was supervised fine tuned on only [Open Assistant](https://open-assistant.io/) crowd souce platform.
24
+
25
+ - **Developed by:** Open Assistant
26
+ - **Model type:** Pythia
27
+ - **Language(s) (NLP):** English
28
+ - **License:** Apache-2.0
29
+
30
+ ## Model Sources [optional]
31
+
32
+ <!-- Provide the basic links for the model. -->
33
+
34
+ - **Repository:** [Open Assistant](https://github.com/LAION-AI/Open-Assistant)
35
+
36
+ # Uses
37
+
38
+ <!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
39
+
40
+
41
+ ## Direct Use
42
+
43
+ <!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
44
+ See the example on the right
45
+
46
+ # Bias, Risks, and Limitations
47
+
48
+ <!-- This section is meant to convey both technical and sociotechnical limitations. -->
49
+
50
+ [just read pythia](https://huggingface.co/EleutherAI/pythia-12b#out-of-scope-use)
51
+
52
+ ## Recommendations
53
+
54
+ <!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
55
+
56
+ Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
57
+
58
+ ## How to Get Started with the Model
59
+
60
+ Use the code below to get started with the model.
61
+
62
+ ```python
63
+ from transformers import AutoModelForCausalLM, AutoTokenizer
64
+
65
+ model_name = "theblackcat102/pythia-3b-deduped-sft-r1"
66
+
67
+ tokenizer = AutoTokenizer.from_pretrained(model_name)
68
+ model = AutoModelForCausalLM.from_pretrained(model_name).half().eval().cuda()
69
+
70
+ input_text = "<human>What's the earth population?<bot>"
71
+ inputs = tokenizer(input_text, return_tensors="pt", padding=True).to(0)
72
+ outputs = model.generate(
73
+ **inputs,
74
+ early_stopping=True,
75
+ max_new_tokens=args.max_new_tokens,
76
+ do_sample=True,
77
+ top_k=args.top_k,
78
+ temperature=args.temperature,
79
+ pad_token_id=tokenizer.eos_token_id,
80
+ # dialogue_collator.py line 36
81
+ )
82
+ output = tokenizer.decode(outputs[0], truncate_before_pattern=[r"\n\n^#", "^'''", "\n\n\n"])
83
+ print(output)
84
+ ```
85
+
86
+ # Training Details
87
+
88
+ ## Training Data
89
+
90
+ <!-- This should link to a Data Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. -->
91
+
92
+ ## Training Procedure
93
+
94
+ ```
95
+ deepspeed trainer_sft.py --configs defaults pythia-1-4b-ost --deepspeed
96
+ ```
97
+
98
+ This model was trained for 200 iterations. After 200 iterations the accuracy started to drop and loss increasing which is a sign of overfitting.
99
+
100
+ ### Training Hyperparameters
101
+
102
+ ```
103
+ defaults:
104
+ learning_rate: 1e-5
105
+ gradient_checkpointing: false
106
+ gradient_accumulation_steps: 32
107
+ per_device_train_batch_size: 2
108
+ per_device_eval_batch_size: 2
109
+ weight_decay: 0.00
110
+ warmup_steps: 600
111
+ eval_steps: 250
112
+ save_steps: 250
113
+ max_length: 512
114
+ num_train_epochs: 2
115
+ logging_steps: 10
116
+ max_grad_norm: 2.0
117
+ save_total_limit: 4
118
+ fp16: true
119
+ eval_accumulation_steps:
120
+ freeze_layer:
121
+ datasets:
122
+ - oa_private:
123
+ data_path: .cache
124
+ split: sft
125
+ val_split: 0.01
126
+ fraction: 1
127
+ file: 2023-02-26_oasst_default.jsonl
128
+ cache_dir: .cache
129
+ loss_fn: CrossEntropyLoss
130
+ eval_size:
131
+ log_dir: "base"
132
+ quantization: false
133
+ seq2seqmodel: false
134
+ poly_eps: 1.0
135
+ fuse_gelu: false
136
+ log_wandb: true
137
+ samples_mixing: true # uses collator that mixes samples in the batch to create a single sample with possible multiple tasks within
138
+ verbose: false
139
+
140
+
141
+ pythia-1-4b-ost:
142
+ learning_rate: 1e-6
143
+ model_name: EleutherAI/pythia-1.4b-deduped
144
+ weight_decay: 0.01
145
+ max_length: 1024
146
+ warmup_steps: 100
147
+ gradient_checkpointing: false
148
+ gradient_accumulation_steps: 12
149
+ per_device_train_batch_size: 5
150
+ per_device_eval_batch_size: 6
151
+ eval_steps: 100
152
+ save_steps: 100
153
+ num_train_epochs: 50
154
+ save_total_limit: 4
155
+ ```
156
+
157
+
158
+ # Evaluation
159
+
160
+ <!-- This section describes the evaluation protocols and provides the results. -->
161
+
162
+ ## Testing Data, Factors & Metrics
163
+
164
+ ### Testing Data
165
+
166
+ <!-- This should link to a Data Card if possible. -->
167
+
168
+ [More Information Needed]
169
+
170
+ ### Factors
171
+
172
+ <!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
173
+
174
+ [More Information Needed]
175
+
176
+ ### Metrics
177
+
178
+ <!-- These are the evaluation metrics being used, ideally with a description of why. -->
179
+
180
+ [More Information Needed]
181
+
182
+ ## Results
183
+
184
+
185
+
186
+ ### Summary
187
+
188
+
189
+
190
+ # Model Examination [optional]
191
+
192
+ <!-- Relevant interpretability work for the model goes here -->
193
+
194
+ [More Information Needed]
195
+
196
+ # Environmental Impact
197
+
198
+ <!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
199
+
200
+ Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700).
201
+
202
+ - **Hardware Type:** [More Information Needed]
203
+ - **Hours used:** [More Information Needed]
204
+ - **Cloud Provider:** [More Information Needed]
205
+ - **Compute Region:** [More Information Needed]
206
+ - **Carbon Emitted:** [More Information Needed]
207
+
208
+ # Technical Specifications [optional]
209
+
210
+ ## Model Architecture and Objective
211
+
212
+ [More Information Needed]
213
+
214
+ ## Compute Infrastructure
215
+
216
+ [More Information Needed]
217
+
218
+ ### Hardware
219
+
220
+ [More Information Needed]
221
+
222
+ ### Software
223
+
224
+ [More Information Needed]
225
+
226
+ # Citation [optional]
227
+
228
+ <!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
229
+
230
+ **BibTeX:**
231
+
232
+ [More Information Needed]
233
+
234
+ **APA:**
235
+
236
+ [More Information Needed]
237
+
238
+ # Glossary [optional]
239
+
240
+ <!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
241
+
242
+ [More Information Needed]
243
+
244
+ # Acknowledgements
245
+
246
+ - [LAION](https://laion.ai/) & EleutherAI
247
+ - [Stability.ai](https://stability.ai/) : this project wouldn't be possible without their compute resource
248
+ - [Teams and contributors at Open Assistant](https://github.com/LAION-AI/Open-Assistant/graphs/contributors) : who put their time after their day job or whatever into this project
249
+ - [Huggingface](https://huggingface.co/) : For the storage and spaces here
250
+
251
+ # Model Card Authors [optional]
252
+
253
+ [More Information Needed]
254
+
255
+ # Model Card Contact
256
+
257
+ [More Information Needed]