-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
adalomo在使用chatglm2模型出现错误 #68
Comments
你好,dev分支里chatglm2的646行跟报错信息对不上,请更新到最新的dev分支尝试一下 |
您好,我更新到最新dev分支使用adalomo重新训练chatglm2后,在验证阶段设置max_new_tokens参数进行验证时报错,报错信息: 这是我的generation_config: |
您好,感谢您出色的工作,我在chaglm2模型和adalomo时出现了问题
Traceback (most recent call last):
File "/home/pycharmProjcet/adalomo/instruction-tuning/train_dx_chatglm2.py", line 276, in
train()
File "/home/pycharmProjcet/adalomo/instruction-tuning/train_dx_chatglm2.py", line 259, in train
trainer.train()
File "/home/anaconda3/envs/adalomo/lib/python3.10/site-packages/collie_lm-1.0.5-py3.10.egg/collie/controller/trainer.py", line 364, in train
loss = self.train_fn(self, batch, self.global_batch_idx)
File "/home/anaconda3/envs/adalomo/lib/python3.10/site-packages/collie_lm-1.0.5-py3.10.egg/collie/controller/trainer.py", line 434, in train_fn
outputs = trainer.engine(**batch)
File "/home/anaconda3/envs/adalomo/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1194, in _call_impl
return forward_call(*input, **kwargs)
File "/home/anaconda3/envs/adalomo/lib/python3.10/site-packages/deepspeed-0.11.1-py3.10.egg/deepspeed/utils/nvtx.py", line 15, in wrapped_fn
ret_val = func(*args, **kwargs)
File "/home/anaconda3/envs/adalomo/lib/python3.10/site-packages/deepspeed-0.11.1-py3.10.egg/deepspeed/runtime/engine.py", line 1807, in forward
loss = self.module(*inputs, **kwargs)
File "/home/anaconda3/envs/adalomo/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1212, in _call_impl
result = forward_call(*input, **kwargs)
File "/home/anaconda3/envs/adalomo/lib/python3.10/site-packages/collie_lm-1.0.5-py3.10.egg/collie/models/chatglm2/model.py", line 646, in forward
past_key_values = self._get_past_key_values(self.layers)
File "/home/anaconda3/envs/adalomo/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1269, in getattr
raise AttributeError("'{}' object has no attribute '{}'".format(
AttributeError: 'ChatGLM2ForCausalLM' object has no attribute '_get_past_key_values'
我使用本项目中adalomo的指令微调train.py示例,将模型导入的相关代码改为collie/examples/finetune_chatglm2_for_summary.py中的对应代码
The text was updated successfully, but these errors were encountered: