请尝试将模型的per_device_train_batch_size
和per_device_eval_batch_size
设置为更大的值,例如:
{
"model_name_or_path": "/home/duyi/paddle",
"dataset_name_or_path": "/home/duyi/ChatGLM2-6B/ptuning/AdvertiseGen",
"output_dir": "./checkpoints/chatglm2_sft_ckpts",
"per_device_train_batch_size": 16,
"gradient_accumulation_steps": 4,
"per_device_eval_batch_size": 16,
"eval_accumulation_steps":16,
"num_train_epochs": 3,
"learning_rate": 3e-05,
"warmup_steps": 30,
"logging_steps": 1,
"evaluation_strategy": "epoch",
"save_strategy": "epoch",
"src_length": 1024,
"max_length": 2048,
"fp16": true,
"fp16_opt_level": "O2",
"do_train": true,
"do_eval": true,
"disable_tqdm": true,
"load_best_model_at_end": true,
"eval_with_do_generation": false,
"metric_for_best_model": "accuracy",
"recompute": true,
"save_total_limit": 1,
"sharding_parallel_degree": 4,
"sharding": "stage3",
"zero_padding": false,
"use_flash_attention": false
}
如果问题仍然存在,请检查是否有其他进程在使用GPU 0。如果有,请停止它们或在另一个GPU上运行PaddlePaddle。
6条答案
按热度按时间bweufnob1#
本地相同环境,尝试多次无法复现问题。复现命令如下:
建议尝试以下操作后再运行:
如仍存在问题,辛苦上传完整日志和复现命令,方便我们进行调试。
pvcm50d12#
本地相同环境,尝试多次无法复现问题。复现命令如下:
建议尝试以下操作后再运行:
如仍存在问题,辛苦上传完整日志和复现命令,方便我们进行调试。
我用的是run_finetune.py,没有在llm目录下找到 finetune_generation 这个文件。 同时我尝试用多卡跑,但是会出现连不上端口的情况:
之后一直无响应
我的启动命令:
python -u -m paddle.distributed.launch --gpus "0,1,2,3,4,5,6,7" run_finetune.py config/chatglm2/sft_argument.json
完整日志:
72qzrwbm3#
我发现在运行 run_check() 时,可以成功连接到 127.0.0.1,但是一旦运行训练脚本,就会产生寻找另一个地址并无法连接的情况:
I0715 07:52:00.361024 2696 tcp_utils.cc:107] Retry to connect to 172.31.3.19:46524 while the server is not yet listening. I0715 07:54:13.480999 2696 tcp_utils.cc:107] Retry to connect to 172.31.3.19:46524 while the server is not yet listening.
tjvv9vkg4#
在运行
run_check()
时,可以成功连接到127.0.0.1,但是一旦运行训练脚本,就会产生寻找另一个地址并无法连接的情况。PaddlePaddle中是否有将此手动更改为127.0.0.1的地方?
uttx8gqw5#
或者
daolsyd06#
我发现在运行 run_check() 时,可以成功连接到 127.0.0.1,但是一旦运行训练脚本,就会产生寻找另一个地址并无法连接的情况:
I0715 07:52:00.361024 2696 tcp_utils.cc:107] Retry to connect to 172.31.3.19:46524 while the server is not yet listening. I0715 07:54:13.480999 2696 tcp_utils.cc:107] Retry to connect to 172.31.3.19:46524 while the server is not yet listening.
。如果
172.31.3.19
不是本机的 IP,建议检查机器环境。Paddle 在启动时会拉取环境变量,通过本机 IP 启动。