Closed sunshineyg2018 closed 7 months ago
单卡能跑吗?是不是显存不够
单卡能跑吗?还不是显着不足
你的意思是显存不足吗?单卡是24g显存 使用lora 和 8int
我测试baichuan2-13b需要25G显存以上才能跑。
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.(由于长期不活动,机器人自动关闭此问题,如果需要欢迎提问)
咋样,解决没,我是80G的,也报这个
用的chatglm2,6b的
CUDA_VISIBLE_DEVICES=0,1,2,3,4,5 torchrun --nproc_per_node 6 pretraining.py \ --model_type baichuan \ --model_name_or_path /root/autodl-tmp/baichuan2_inc_13 \ --train_file_dir /root/autodl-tmp/corpus \ --validation_file_dir /root/autodl-tmp/corpus \ --per_device_train_batch_size 1 \ --per_device_eval_batch_size 1 \ --do_train \ --do_eval \ --use_peft True \ --seed 42 \ --fp16 \ --load_in_8bit True \ --max_train_samples -1 \ --max_eval_samples -1 \ --num_train_epochs 0.5 \ --learning_rate 2e-4 \ --warmup_ratio 0.05 \ --weight_decay 0.01 \ --logging_strategy steps \ --logging_steps 10 \ --eval_steps 50 \ --evaluation_strategy steps \ --save_steps 500 \ --save_strategy steps \ --save_total_limit 3 \ --gradient_accumulation_steps 1 \ --preprocessing_num_workers 1 \ --block_size 1024 \ --output_dir /root/autodl-tmp/outputs_pt_baichuan2_13_v1 \ --overwrite_output_dir \ --ddp_timeout 30000 \ --logging_first_step True \ --target_modules all \ --lora_rank 8 \ --lora_alpha 16 \ --lora_dropout 0.05 \ --torch_dtype float16 \ --device_map auto \ --report_to tensorboard \ --ddp_find_unused_parameters False \ --gradient_checkpointing True \ --cache_dir ./cache
提示如下错误
是不是因为使用baichuan2 的模型?