File size: 1,475 Bytes
d689ebe
43108a7
d689ebe
30b0f97
d689ebe
43108a7
88071b4
 
cc7773c
ef47142
88071b4
8446ce8
d689ebe
8446ce8
3fc930f
d689ebe
 
 
 
 
 
 
43108a7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
d689ebe
43108a7
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# Stanford Alpaca

This is a replica of Alpaca by Stanford' tatsu

Trained using the original instructions with a minor modification in FSDP mode

# Other versions:
13B: https://huggingface.co/chavinlo/alpaca-13b

13B -> GPT4 : https://huggingface.co/chavinlo/gpt4-x-alpaca

## Compute Used
Trained on 4xA100s for 6H
Donated by redmond.ai

NO LORA HAS BEEN USED, this is a natively-finetuned model, hence "alpaca-native"

If you are interested on more llama-based models, you can check out my profile or search for other models at https://huggingface.co/models?other=llama

This (MIGHT) be a quantized version of this model, but be careful: https://boards.4channel.org/g/thread/92173062#p92182396

CONFIGURATION (default except fsdp):

```shell
torchrun --nproc_per_node=4 --master_port=3045 train.py \
    --model_name_or_path /workspace/llama-7b-hf \
    --data_path ./alpaca_data.json \
    --bf16 True \
    --output_dir /workspace/output \
    --num_train_epochs 3 \
    --per_device_train_batch_size 4 \
    --per_device_eval_batch_size 4 \
    --gradient_accumulation_steps 8 \
    --evaluation_strategy "no" \
    --save_strategy "steps" \
    --save_steps 200 \
    --save_total_limit 1 \
    --learning_rate 2e-5 \
    --weight_decay 0. \
    --warmup_ratio 0.03 \
    --lr_scheduler_type "cosine" \
    --logging_steps 1 \
    --fsdp "shard_grad_op auto_wrap" \
    --fsdp_transformer_layer_cls_to_wrap 'LLaMADecoderLayer' \
    --tf32 True --report_to="wandb"
```