ChatGLM-Tuning
ChatGLM-Tuning copied to clipboard
训练速度

![]()
我这个训练速度正常吗,18w的数据,batch_size=64, 2轮,居然要32个小时,V100 80GGPU,合着一秒钟才5条文本?
A100才有80g吧。。。这个速度似乎是正常的。
写错了,是A100,这可真慢啊,我发现增加batchsize对于加速一点用没有
写错了,是A100,这可真慢啊,我发现增加batchsize对于加速一点用没有
你的代码里batchsize大了,max_steps是会按照比例下调是吧。
对啊,总共就是18w数据跑2个epoch,batch_size等于1的时候时间也一样呢
to adjust the transformer trainning parameters, you can refer to '[Benchmark] HF Trainer on A100 #15026'
对啊,总共就是18w数据跑2个epoch,batch_size等于1的时候时间也一样呢
拉新的代码,包括官方预训练文件。之前batch training不生效应该
资源没利用起来,很多你定义的参数其实是无效的,这里推荐一篇blog: Efficient Training on a Single GPU
另外可以改进的包括但不限于:
bf16 = True
tf32 = True
optim = “adamw_torch_fused” # 或者安装apex后 "adamw_apex_fused"
gradient_accumulation_steps = 16 #对应调整 per_device_train_batch_size
gradient_checkpointing = True
资源没利用起来,很多你定义的参数其实是无效的,这里推荐一篇blog: Efficient Training on a Single GPU
另外可以改进的包括但不限于:
bf16 = True tf32 = True optim = “adamw_torch_fused” # 或者安装apex后 "adamw_apex_fused" gradient_accumulation_steps = 16 #对应调整 per_device_train_batch_size gradient_checkpointing = True
学习了
建议如果显存够用,不要设置gradient_checkpointing,这个是牺牲时间复杂度换空间复杂度