LLM-Tuning
LLM-Tuning copied to clipboard
chatglm2_loar_tuning run raise NotImplementedError
chatglm2_loar运行错误,提示glm2没有实现这个方法 model.enable_input_require_grads() NotImplementedError
完整报错,以及报错对应的代码片段贴一下
119行:model.enable_input_require_grads()
参考一下 https://github.com/THUDM/ChatGLM2-6B/issues/51#issuecomment-1608795977
@ZacharyWaseda 解决了没
@ZacharyWaseda 解决了没
解决了。那俩文件换成最新的就行了
@ZacharyWaseda
model.hf_device_map['transformer.output_layer'] = model.hf_device_map['transformer.embedding']
这行要怎么改,求指教
我最新查了下官方HF上的repo更新,https://huggingface.co/THUDM/chatglm2-6b/commit/189e5df1609cdbd1704e7d0204301ad4c7791f61 看到已经修复了get_input_embeddings 的问题,你下载最新的modeling_chatglm.py 和 config.json 就可以正确运行了,也不需要注释。引用自https://github.com/THUDM/ChatGLM2-6B/issues/51#issuecomment-1608795977