jondurbin commited on
Commit
9a3051b
1 Parent(s): 518471b

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +57 -0
README.md CHANGED
@@ -1,3 +1,60 @@
1
  ---
2
  license: other
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  license: other
3
  ---
4
+
5
+ # Overview
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
+ ### Training data
10
+
11
+ 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.
12
+
13
+ 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
14
+
15
+ 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.
16
+
17
+ Both the initial instructions and final-pass fine-tuning instructions will be published soon.
18
+
19
+ ### Fine-tuning method
20
+
21
+ I used the excellent [FastChat](https://github.com/lm-sys/FastChat) module, running with:
22
+
23
+ ```
24
+ source /workspace/venv/bin/activate
25
+
26
+ export NCCL_P2P_DISABLE=1
27
+ export NCCL_P2P_LEVEL=LOC
28
+
29
+ torchrun --nproc_per_node=8 --master_port=20001 /workspace/FastChat/fastchat/train/train_mem.py \
30
+ --model_name_or_path /workspace/llama-13b \
31
+ --data_path /workspace/as_conversations.json \
32
+ --bf16 True \
33
+ --output_dir /workspace/airoboros-uncensored-13b \
34
+ --num_train_epochs 3 \
35
+ --per_device_train_batch_size 20 \
36
+ --per_device_eval_batch_size 20 \
37
+ --gradient_accumulation_steps 2 \
38
+ --evaluation_strategy "steps" \
39
+ --eval_steps 500 \
40
+ --save_strategy "steps" \
41
+ --save_steps 500 \
42
+ --save_total_limit 10 \
43
+ --learning_rate 2e-5 \
44
+ --weight_decay 0. \
45
+ --warmup_ratio 0.04 \
46
+ --lr_scheduler_type "cosine" \
47
+ --logging_steps 1 \
48
+ --fsdp "full_shard auto_wrap offload" \
49
+ --fsdp_transformer_layer_cls_to_wrap 'LlamaDecoderLayer' \
50
+ --tf32 True \
51
+ --model_max_length 2048 \
52
+ --gradient_checkpointing True \
53
+ --lazy_preprocess True
54
+ ```
55
+
56
+ This ran on 8x nvidia 80gb a100's for about 40 hours.
57
+
58
+
59
+ ### License
60
+ The model is licensed under the LLaMA model, and the dataset is licensed under the terms of OpenAI because it uses ChatGPT. Everything else is free.