FastChat icon indicating copy to clipboard operation
FastChat copied to clipboard

how can I finetune the model with my own dataset on just one GPU?

Open pkachuuK opened this issue 1 year ago • 1 comments

can anyone tell me that how can i finetune the model use just single gpu???

pkachuuK avatar Apr 26 '23 06:04 pkachuuK

The same questions of me, I tried to funetune the mode use just single gpu via following script: torchrun fastchat/train/train_mem.py
--model_name_or_path /home/ubuntu/ChatGPT/llama/llama-7b-hf
--data_path playground/data/dummy.json
--bf16 True
--output_dir output
--num_train_epochs 3
--per_device_train_batch_size 2
--per_device_eval_batch_size 2
--gradient_accumulation_steps 16
--evaluation_strategy "no"
--save_strategy "steps"
--save_steps 1200
--save_total_limit 10
--learning_rate 2e-5
--weight_decay 0.
--warmup_ratio 0.03
--lr_scheduler_type "cosine"
--logging_steps 1
--fsdp "full_shard auto_wrap"
--fsdp_transformer_layer_cls_to_wrap 'LlamaDecoderLayer'
--tf32 True
--model_max_length 2048
--gradient_checkpointing True
--lazy_preprocess True

Where there have following issue: 1683519475948

Should I install the flash_attn via pip? I tried to do this, it have new issue: 1683519524261

My Cuda version is 12.1. 1683519569361

JustinZou1 avatar May 08 '23 04:05 JustinZou1

I had the same flash_attn issue, I solved it by installing python develop version apt-get install python3-dev 3.11 I am using python3.11 version. You must change the version accordingly.

roshan-gopalakrishnan avatar May 11 '23 02:05 roshan-gopalakrishnan

You can try not using flash attention, see https://github.com/lm-sys/FastChat/pull/177, https://github.com/lm-sys/FastChat/pull/1255

merrymercy avatar May 20 '23 14:05 merrymercy