mooumouliu
mooumouliu
按照chatglm-6b的方式ptuning微调 报错了 ChatGLMModel' object has no attribute 'prefix_encoder'
> 解决了吗? 没有
> > 按照chatglm-6b的方式ptuning微调 报错了 ChatGLMModel' object has no attribute 'prefix_encoder' > > 同样问题 解决了吗 没 坐等大佬们更新
> > 按照chatglm-6b的方式ptuning微调 报错了 ChatGLMModel' object has no attribute 'prefix_encoder' > > 在ChatGLM-6b 1代里面这个报错可能是因为微调完推理的时候config里面没有定义pre_seq_len。 > > 但是你确定ptuning可以直接用在2里面吗,modeling_glm.py没有定义self.prefix_encoder,所以这个错误是必然会报的。 好吧 ,谢谢大佬解答,我以为2会兼容一的方式进行微调。想测试他的微调效果。 那大佬你们都用什么方法进行微调的呢 本地两张3060(12G) 。
模型更新了 > > > > 按照chatglm-6b的方式ptuning微调 报错了 ChatGLMModel' object has no attribute 'prefix_encoder' > > > > > > > > > 在ChatGLM-6b 1代里面这个报错可能是因为微调完推理的时候config里面没有定义pre_seq_len。 > > > 但是你确定ptuning可以直接用在2里面吗,modeling_glm.py没有定义self.prefix_encoder,所以这个错误是必然会报的。 > >...
> > 模型更新了 > > > > > > 按照chatglm-6b的方式ptuning微调 报错了 ChatGLMModel' object has no attribute 'prefix_encoder' > > > > > > > > > > > > >...
> > preprocess_function_train > > 改preprocess_function_train就行 ` """ 为了适配ChatGLM1 context_length = input_ids.index(tokenizer.bos_token_id) mask_position = context_length - 1 labels = [-100] * context_length + input_ids[mask_position+1:] """ > > 为了适配ChatGLM2,讲上面的代码改为下面的: context_length =...
> > > preprocess_function_train > > > > > > 改preprocess_function_train就行 ` """ 为了适配ChatGLM1 context_length = input_ids.index(tokenizer.bos_token_id) mask_position = context_length - 1 labels = [-100] * context_length + input_ids[mask_position+1:] """...
chatglm1按照这个方法https://github.com/THUDM/ChatGLM2-6B/issues/53#issuecomment-1619394916微调 问答的效果很好
> 我实现了下,可以参考,有点小改动,适配下就行。这是实现: #51 能用ptuning微调么