jondurbin commited on
Commit
5b1a4ea
1 Parent(s): 44830f9

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +19 -59
README.md CHANGED
@@ -6,6 +6,10 @@ license: cc-by-nc-4.0
6
 
7
  This is a fine-tuned 13b parameter LlaMa model, using completely synthetic training data created by https://github.com/jondurbin/airoboros
8
 
 
 
 
 
9
  ### Eval (gpt4 judging)
10
 
11
  ![chart](meta-chart.png)
@@ -230,85 +234,41 @@ This is a fine-tuned 13b parameter LlaMa model, using completely synthetic train
230
  </details>
231
 
232
 
233
- ### Training data
234
-
235
- I used a jailbreak prompt to generate the synthetic instructions, which resulted in some training data that would likely be censored by other models, such as how-to prompts about synthesizing drugs, making homemade flamethrowers, etc. Mind you, this is all generated by ChatGPT, not me. My goal was to simply test some of the capabilities of ChatGPT when unfiltered (as much as possible), and not to intentionally produce any harmful/dangerous/etc. content.
236
-
237
- The jailbreak prompt I used is the default prompt in the python code when using the `--uncensored` flag: https://github.com/jondurbin/airoboros/blob/main/airoboros/self_instruct.py#L39
238
-
239
- I also did a few passes of manually cleanup to remove some bad prompts, but mostly I left the data as-is. Initially, the model was fairly bad at math/extrapolation, closed question-answering (heavy hallucination), and coding, so I did one more fine tuning pass with additional synthetic instructions aimed at those types of problems.
240
-
241
- Both the initial instructions and final-pass fine-tuning instructions will be published soon.
242
-
243
- ### Fine-tuning method
244
-
245
- I used the excellent [FastChat](https://github.com/lm-sys/FastChat) module, running with:
246
 
247
- ```
248
- source /workspace/venv/bin/activate
249
 
250
- export NCCL_P2P_DISABLE=1
251
- export NCCL_P2P_LEVEL=LOC
252
 
253
- torchrun --nproc_per_node=8 --master_port=20001 /workspace/FastChat/fastchat/train/train_mem.py \
254
- --model_name_or_path /workspace/llama-13b \
255
- --data_path /workspace/as_conversations.json \
256
- --bf16 True \
257
- --output_dir /workspace/airoboros-uncensored-13b \
258
- --num_train_epochs 3 \
259
- --per_device_train_batch_size 20 \
260
- --per_device_eval_batch_size 20 \
261
- --gradient_accumulation_steps 2 \
262
- --evaluation_strategy "steps" \
263
- --eval_steps 500 \
264
- --save_strategy "steps" \
265
- --save_steps 500 \
266
- --save_total_limit 10 \
267
- --learning_rate 2e-5 \
268
- --weight_decay 0. \
269
- --warmup_ratio 0.04 \
270
- --lr_scheduler_type "cosine" \
271
- --logging_steps 1 \
272
- --fsdp "full_shard auto_wrap offload" \
273
- --fsdp_transformer_layer_cls_to_wrap 'LlamaDecoderLayer' \
274
- --tf32 True \
275
- --model_max_length 2048 \
276
- --gradient_checkpointing True \
277
- --lazy_preprocess True
278
- ```
279
 
280
- This ran on 8x nvidia 80gb a100's for about 40 hours.
281
 
282
- ![train/loss](IMG_0128.jpeg)
283
 
284
- ![eval/loss](IMG_0130.jpeg)
285
 
 
286
 
287
  ### Prompt format
288
 
289
  The prompt should be 1:1 compatible with the FastChat/vicuna format, e.g.:
290
 
291
- With a preamble:
292
  ```
293
- A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.
294
-
295
- USER: [prompt]
296
- <\s>
297
-
298
- ASSISTANT:
299
  ```
300
 
301
- Or just:
302
  ```
303
- USER: [prompt]
304
- <\s>
305
-
306
- ASSISTANT:
307
  ```
308
 
309
  ### Usage and License Notices
310
 
311
- All airoboros models and datasets are intended and licensed for research use only. I've used the 'cc-nc-4.0' license, but really it is subject to a custom/special license because:
312
 
313
  - the base model is LLaMa, which has it's own special research license
314
  - the dataset(s) were generated with OpenAI (gpt-4 and/or gpt-3.5-turbo), which has a clausing saying the data can't be used to create models to compete with openai
 
6
 
7
  This is a fine-tuned 13b parameter LlaMa model, using completely synthetic training data created by https://github.com/jondurbin/airoboros
8
 
9
+ __*I don't recommend using this model! The outputs aren't particularly great, and it may contain "harmful" data due to jailbreak*__
10
+
11
+ Please see one of the updated airoboros models for a much better experience.
12
+
13
  ### Eval (gpt4 judging)
14
 
15
  ![chart](meta-chart.png)
 
234
  </details>
235
 
236
 
237
+ ---
238
+ license: cc-by-nc-4.0
239
+ ---
 
 
 
 
 
 
 
 
 
 
240
 
241
+ # Overview
 
242
 
243
+ This is a fine-tuned 7b parameter LlaMa model, using completely synthetic training data created by https://github.com/jondurbin/airoboros
 
244
 
245
+ __*I don't recommend using this model! The outputs aren't particularly great, and it may contain "harmful" data due to jailbreak*__
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
246
 
247
+ Please see one of the updated airoboros models for a much better experience.
248
 
249
+ ### Training data
250
 
251
+ This was an experiment to see if a "jailbreak" prompt could be used to generate a broader range of data that would otherwise have been filtered by OpenAI's alignment efforts.
252
 
253
+ The jailbreak did indeed work with a high success rate, and caused OpenAI to generate a broader range of topics and fewer refusals to answer questions/instructions of sensitive topics.
254
 
255
  ### Prompt format
256
 
257
  The prompt should be 1:1 compatible with the FastChat/vicuna format, e.g.:
258
 
259
+ With a system prompt:
260
  ```
261
+ A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions. USER: [prompt] ASSISTANT:
 
 
 
 
 
262
  ```
263
 
264
+ Or without a system prompt:
265
  ```
266
+ USER: [prompt] ASSISTANT:
 
 
 
267
  ```
268
 
269
  ### Usage and License Notices
270
 
271
+ The model and dataset are intended and licensed for research use only. I've used the 'cc-nc-4.0' license, but really it is subject to a custom/special license because:
272
 
273
  - the base model is LLaMa, which has it's own special research license
274
  - the dataset(s) were generated with OpenAI (gpt-4 and/or gpt-3.5-turbo), which has a clausing saying the data can't be used to create models to compete with openai