Update README.md
Browse files
README.md
CHANGED
@@ -4,4 +4,62 @@ license: apache-2.0
|
|
4 |
|
5 |
Slightly modified mpt-30b, which has some updates to allow gradient checkpointing/etc., to be compatible with qlora training code.
|
6 |
|
7 |
-
Original model: https://huggingface.co/mosaicml/mpt-30b
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
|
5 |
Slightly modified mpt-30b, which has some updates to allow gradient checkpointing/etc., to be compatible with qlora training code.
|
6 |
|
7 |
+
Original model: https://huggingface.co/mosaicml/mpt-30b
|
8 |
+
|
9 |
+
My fork of qlora with mpt-30b support: https://github.com/jondurbin/qlora
|
10 |
+
|
11 |
+
Differences in the qlora scripts:
|
12 |
+
|
13 |
+
- requires adding `--mpt True` for mpt-based models
|
14 |
+
- uses `--num_train_epochs` instead of `--max_steps`
|
15 |
+
- uses airoboros prompt format (mostly 1:1 with vicuna) rather than alpaca, and expects an input file in JSONL format with "instruction" and "response"
|
16 |
+
|
17 |
+
Full example of tuning (used for airoboros-mpt-30b-gpt4-1.4):
|
18 |
+
|
19 |
+
```
|
20 |
+
source /workspace/venv/bin/activate
|
21 |
+
|
22 |
+
export WANDB_API_KEY=[redacted]
|
23 |
+
export WANDB_PROJECT=airoboros-mpt-30b-gpt4-1.4
|
24 |
+
|
25 |
+
python qlora.py \
|
26 |
+
--model_name_or_path ./mpt-30b \
|
27 |
+
--output_dir ./$WANDB_PROJECT-checkpoints \
|
28 |
+
--num_train_epochs 3 \
|
29 |
+
--logging_steps 1 \
|
30 |
+
--save_strategy steps \
|
31 |
+
--data_seed 11422 \
|
32 |
+
--save_steps 75 \
|
33 |
+
--save_total_limit 3 \
|
34 |
+
--evaluation_strategy "no" \
|
35 |
+
--eval_dataset_size 2 \
|
36 |
+
--max_new_tokens 8192 \
|
37 |
+
--dataloader_num_workers 3 \
|
38 |
+
--logging_strategy steps \
|
39 |
+
--remove_unused_columns False \
|
40 |
+
--do_train \
|
41 |
+
--lora_r 64 \
|
42 |
+
--lora_alpha 16 \
|
43 |
+
--lora_modules all \
|
44 |
+
--double_quant \
|
45 |
+
--quant_type nf4 \
|
46 |
+
--bf16 \
|
47 |
+
--bits 4 \
|
48 |
+
--warmup_ratio 0.03 \
|
49 |
+
--lr_scheduler_type constant \
|
50 |
+
--dataset ./instructions.jsonl \
|
51 |
+
--dataset_format airoboros \
|
52 |
+
--model_max_len 8192 \
|
53 |
+
--gradient_checkpointing \
|
54 |
+
--per_device_train_batch_size 6 \
|
55 |
+
--gradient_accumulation_steps 16 \
|
56 |
+
--learning_rate 0.0001 \
|
57 |
+
--adam_beta2 0.999 \
|
58 |
+
--max_grad_norm 0.3 \
|
59 |
+
--lora_dropout 0.05 \
|
60 |
+
--weight_decay 0.0 \
|
61 |
+
--seed 11422 \
|
62 |
+
--trust_remote_code \
|
63 |
+
--mpt True \
|
64 |
+
--report_to wandb
|
65 |
+
```
|