beyondguo / LLM-Tuning

Tuning LLMs with no tears💦; Sample Design Engineering (SDE) for more efficient downstream-tuning.
965 stars 99 forks source link

chatglm2_loar_tuning run raise NotImplementedError #11

Open xieyongshuai opened 1 year ago

xieyongshuai commented 1 year ago

chatglm2_loar运行错误,提示glm2没有实现这个方法 model.enable_input_require_grads() NotImplementedError

beyondguo commented 1 year ago

完整报错,以及报错对应的代码片段贴一下

ZacharyWaseda commented 1 year ago

119行:model.enable_input_require_grads()

image
beyondguo commented 1 year ago

参考一下 https://github.com/THUDM/ChatGLM2-6B/issues/51#issuecomment-1608795977

xieyongshuai commented 1 year ago

@ZacharyWaseda 解决了没

ZacharyWaseda commented 1 year ago

@ZacharyWaseda 解决了没

解决了。那俩文件换成最新的就行了

xieyongshuai commented 1 year ago

@ZacharyWaseda
model.hf_device_map['transformer.output_layer'] = model.hf_device_map['transformer.embedding'] 这行要怎么改,求指教

hanyi-zou commented 1 year ago

我最新查了下官方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