ssbuild / chatglm_finetuning

chatglm 6b finetuning and alpaca finetuning
1.53k stars 175 forks source link

AttributeError: module 'torch.optim' has no attribute 'adam' #258

Open evanweiguohua opened 1 year ago

evanweiguohua commented 1 year ago

PTV2将优化器设置为adam会报AttributeError: module 'torch.optim' has no attribute 'adam'的错误,adamw是好的。 Lora则没有该问题。

evanweiguohua commented 1 year ago

配置如下:

模块配置, 默认启用lora

enable_deepspeed = True enable_ptv2 = True enable_lora = False enable_int8 = False # qlora int8 enable_int4 = False # qlora int4

ssbuild commented 1 year ago

pip list |grep torch

evanweiguohua commented 1 year ago

pytorch-lightning 2.0.4 torch 2.0.1 torchaudio 2.0.2 torchmetrics 1.0.0 torchvision 0.15.2

ssbuild commented 1 year ago

pip uninstall deep_training pip install -U git+https://github.com/ssbuild/deep_training.git

it is bug and fixed , do upgrade can solve.

evanweiguohua commented 1 year ago

Thanks a lot. I'll try it.