如何设置多卡训练?
TDlemon-1900 opened this issue · 2 comments
提交前必须检查以下项目
- 请确保使用的是仓库最新代码(git pull)
- 已阅读项目文档和FAQ章节并且已在Issue中对问题进行了搜索,没有找到相似问题和解决方案。
- 第三方插件问题:例如llama.cpp、text-generation-webui等,建议优先去对应的项目中查找解决方案。
问题类型
None
基础模型
None
操作系统
None
详细描述问题
# 请在此处粘贴运行代码(请粘贴在本代码块里)
--model_name_or_path
/home/tdlemon/llama-3-chinese-8b-instruct-v2
--tokenizer_name_or_path
/home/tdlemon/llama-3-chinese-8b-instruct-v2
--dataset_dir
/home/tdlemon/Chinese-LLaMA-Alpaca-3-main/data
--per_device_train_batch_size
1
--per_device_eval_batch_size
1
--do_train
1
--do_eval
1
--seed
42
--bf16
1
--num_train_epochs
3
--lr_scheduler_type
cosine
--learning_rate
1e-4
--warmup_ratio
0.05
--weight_decay
0.1
--logging_strategy
steps
--logging_steps
10
--save_strategy
steps
--save_total_limit
3
--evaluation_strategy
steps
--eval_steps
100
--save_steps
200
--gradient_accumulation_steps
8
--preprocessing_num_workers
8
--max_seq_length
1024
--output_dir
/home/tdlemon/llama3-lora
--overwrite_output_dir
1
--ddp_timeout
30000
--logging_first_step
True
--lora_rank
64
--lora_alpha
128
--trainable
"q_proj,v_proj,k_proj,o_proj,gate_proj,down_proj,up_proj"
--lora_dropout
0.05
--modules_to_save
None
--torch_dtype
bfloat16
--validation_file
/home/tdlemon/Chinese-LLaMA-Alpaca-3-main/eval/ruozhiba_qa2449_gpt4turbo.json
--load_in_kbits
16
依赖情况(代码类问题务必提供)
# 请在此处粘贴依赖情况(请粘贴在本代码块里)
0 NVIDIA TITAN Xp Off | 00000000:02:00.0 Off | N/A |
| 23% 42C P2 79W / 250W | 9754MiB / 12288MiB | 13% Default |
| | | N/A |
+-----------------------------------------+----------------------+----------------------+
| 1 NVIDIA TITAN Xp Off | 00000000:82:00.0 Off | N/A |
| 23% 36C P8 9W / 250W | 8MiB / 12288MiB | 0% Default |
| | | N/A |
运行日志或截图
# 请在此处粘贴运行日志(请粘贴在本代码块里)
torch.cuda.OutOfMemoryError: CUDA out of memory. Tried to allocate 32.00 MiB. GPU
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 consideration.
Closing the issue, since no updates observed. Feel free to re-open if you need any further assistance.