LORA微调GLM-4问题

LORA微调GLM-4问题

使用lora进行GLM4-9b-chat的微调,使用单机多卡的命令如下:

OMP_NUM_THREADS=1 torchrun --standalone --nnodes=1 --nproc_per_node=4 finetune.py data/finna/  /key_lab/glm-4-9b-chat  configs/lora.yaml

微调的过程中,loss和grad_norm一直为0,而且epoch从0.0开始增加,这是为啥吖,求助!!!数据是没有问题的。

  0%|                                                                                          | 0/3000 [00:00<?, ?it/s][rank2]:[W reducer.cpp:1360] Warning: find_unused_parameters=True was specified in DDP constructor, but did not find any unused parameters in the forward pass. This flag results in an extra traversal of the autograd graph every iteration,  which can adversely affect performance. If your model indeed never has any unused parameters in the forward pass, consider turning this flag off. Note that this warning may be a false positive if your model has flow control causing later iterations to have unused parameters. (function operator())
[rank1]:[W reducer.cpp:1360] Warning: find_unused_parameters=True was specified in DDP constructor, but did not find any unused parameters in the forward pass. This flag results in an extra traversal of the autograd graph every iteration,  which can adversely affect performance. If your model indeed never has any unused parameters in the forward pass, consider turning this flag off. Note that this warning may be a false positive if your model has flow control causing later iterations to have unused parameters. (function operator())
[rank3]:[W reducer.cpp:1360] Warning: find_unused_parameters=True was specified in DDP constructor, but did not find any unused parameters in the forward pass. This flag results in an extra traversal of the autograd graph every iteration,  which can adversely affect performance. If your model indeed never has any unused parameters in the forward pass, consider turning this flag off. Note that this warning may be a false positive if your model has flow control causing later iterations to have unused parameters. (function operator())
[rank0]:[W reducer.cpp:1360] Warning: find_unused_parameters=True was specified in DDP constructor, but did not find any unused parameters in the forward pass. This flag results in an extra traversal of the autograd graph every iteration,  which can adversely affect performance. If your model indeed never has any unused parameters in the forward pass, consider turning this flag off. Note that this warning may be a false positive if your model has flow control causing later iterations to have unused parameters. (function operator())
{'loss': 0.0, 'grad_norm': 0.0, 'learning_rate': 0.0004983333333333334, 'epoch': 0.0}
{'loss': 0.0, 'grad_norm': 0.0, 'learning_rate': 0.0004966666666666666, 'epoch': 0.0}
{'loss': 0.0, 'grad_norm': 0.0, 'learning_rate': 0.000495, 'epoch': 0.0}
{'loss': 0.0, 'grad_norm': 0.0, 'learning_rate': 0.0004933333333333334, 'epoch': 0.01}
{'loss': 0.0, 'grad_norm': 0.0, 'learning_rate': 0.0004916666666666666, 'epoch': 0.01}
{'loss': 0.0, 'grad_norm': 0.0, 'learning_rate': 0.00049, 'epoch': 0.01}
{'loss': 0.0, 'grad_norm': 0.0, 'learning_rate': 0.0004883333333333333, 'epoch': 0.01}
{'loss': 0.0, 'grad_norm': 0.0, 'learning_rate': 0.0004866666666666667, 'epoch': 0.01}
{'loss': 0.0, 'grad_norm': 0.0, 'learning_rate': 0.00048499999999999997, 'epoch': 0.01}
{'loss': 0.0, 'grad_norm': 0.0, 'learning_rate': 0.00048333333333333334, 'epoch': 0.01}
{'loss': 0.0, 'grad_norm': 0.0, 'learning_rate': 0.0004816666666666667, 'epoch': 0.02}
{'loss': 0.0, 'grad_norm': 0.0, 'learning_rate': 0.00048, 'epoch': 0.02}
{'loss': 0.0, 'grad_norm': 0.0, 'learning_rate': 0.0004783333333333333, 'epoch': 0.02}
{'loss': 0.0, 'grad_norm': 0.0, 'learning_rate': 0.0004766666666666667, 'epoch': 0.02}
{'loss': 0.0, 'grad_norm': 0.0, 'learning_rate': 0.000475, 'epoch': 0.02}
{'loss': 0.0, 'grad_norm': 0.0, 'learning_rate': 0.00047333333333333336, 'epoch': 0.02}
{'loss': 0.0, 'grad_norm': 0.0, 'learning_rate': 0.0004716666666666667, 'epoch': 0.02}
{'loss': 0.0, 'grad_norm': 0.0, 'learning_rate': 0.00047, 'epoch': 0.03}
{'loss': 0.0, 'grad_norm': 0.0, 'learning_rate': 0.00046833333333333335, 'epoch': 0.03}
{'loss': 0.0, 'grad_norm': 0.0, 'learning_rate': 0.00046666666666666666, 'epoch': 0.03}
{'loss': 0.0, 'grad_norm': 0.0, 'learning_rate': 0.000465, 'epoch': 0.03}
{'loss': 0.0, 'grad_norm': 0.0, 'learning_rate': 0.00046333333333333334, 'epoch': 0.03}
{'loss': 0.0, 'grad_norm': 0.0, 'learning_rate': 0.0004616666666666667, 'epoch': 0.03}
{'loss': 0.0, 'grad_norm': 0.0, 'learning_rate': 0.00046, 'epoch': 0.03}
{'loss': 0.0, 'grad_norm': 0.0, 'learning_rate': 0.0004583333333333333, 'epoch': 0.03}
{'loss': 0.0, 'grad_norm': 0.0, 'learning_rate': 0.0004566666666666667, 'epoch': 0.04}
{'loss': 0.0, 'grad_norm': 0.0, 'learning_rate': 0.000455, 'epoch': 0.04}
{'loss': 0.0, 'grad_norm': 0.0, 'learning_rate': 0.0004533333333333333, 'epoch': 0.04}
{'loss': 0.0, 'grad_norm': 0.0, 'learning_rate': 0.0004516666666666667, 'epoch': 0.04}
{'loss': 0.0, 'grad_norm': 0.0, 'learning_rate': 0.00045000000000000004, 'epoch': 0.04}
{'loss': 0.0, 'grad_norm': 0.0, 'learning_rate': 0.0004483333333333333, 'epoch': 0.04}
{'loss': 0.0, 'grad_norm': 0.0, 'learning_rate': 0.00044666666666666666, 'epoch': 0.04}
{'loss': 0.0, 'grad_norm': 0.0, 'learning_rate': 0.00044500000000000003, 'epoch': 0.05}
{'loss': 0.0, 'grad_norm': 0.0, 'learning_rate': 0.00044333333333333334, 'epoch': 0.05}
{'loss': 0.0, 'grad_norm': 0.0, 'learning_rate': 0.00044166666666666665, 'epoch': 0.05}
{'loss': 0.0, 'grad_norm': 0.0, 'learning_rate': 0.00044, 'epoch': 0.05}
{'loss': 0.0, 'grad_norm': 0.0, 'learning_rate': 0.0004383333333333334, 'epoch': 0.05}
{'loss': 0.0, 'grad_norm': 0.0, 'learning_rate': 0.00043666666666666664, 'epoch': 0.05}
{'loss': 0.0, 'grad_norm': 0.0, 'learning_rate': 0.000435, 'epoch': 0.05}
{'loss': 0.0, 'grad_norm': 0.0, 'learning_rate': 0.00043333333333333337, 'epoch': 0.06}
{'loss': 0.0, 'grad_norm': 0.0, 'learning_rate': 0.0004316666666666667, 'epoch': 0.06}
{'loss': 0.0, 'grad_norm': 0.0, 'learning_rate': 0.00043, 'epoch': 0.06}
{'loss': 0.0, 'grad_norm': 0.0, 'learning_rate': 0.00042833333333333335, 'epoch': 0.06}
{'loss': 0.0, 'grad_norm': 0.0, 'learning_rate': 0.0004266666666666667, 'epoch': 0.06}
{'loss': 0.0, 'grad_norm': 0.0, 'learning_rate': 0.000425, 'epoch': 0.06}
{'loss': 0.0, 'grad_norm': 0.0, 'learning_rate': 0.00042333333333333334, 'epoch': 0.06}
{'loss': 0.0, 'grad_norm': 0.0, 'learning_rate': 0.0004216666666666667, 'epoch': 0.07}
{'loss': 0.0, 'grad_norm': 0.0, 'learning_rate': 0.00042, 'epoch': 0.07}
{'loss': 0.0, 'grad_norm': 0.0, 'learning_rate': 0.00041833333333333333, 'epoch': 0.07}
{'loss': 0.0, 'grad_norm': 0.0, 'learning_rate': 0.0004166666666666667, 'epoch': 0.07}
  • 2
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值