Shi

Results 4 comments of Shi

> > > > > > > > > 看源码,实现在所有层了。 源码位置在modeling_chatglm.py 136行,和ptuning v2,代码一致。 ![企业微信截图_16844866285937](https://user-images.githubusercontent.com/48375360/239488643-819154ad-ee3e-4b71-899e-5a916e847cf8.png) > > 您好,多问一句,PrefixEncoder的forward函数的输入是什么?我看论文中的图应该指的是pre_seq_len的tokens作为输入? PrefixEncoder的输入是固定的 `torch.arange(self.pre_seq_len).long()`

> 按照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' > > > > > > 在ChatGLM-6b 1代里面这个报错可能是因为微调完推理的时候config里面没有定义pre_seq_len。 > > 但是你确定ptuning可以直接用在2里面吗,modeling_glm.py没有定义self.prefix_encoder,所以这个错误是必然会报的。 > > 好吧 ,谢谢大佬解答,我以为2会兼容一的方式进行微调。想测试他的微调效果。 那大佬你们都用什么方法进行微调的呢 本地两张3060(12G) 。 你可以等等官方代码,我刚看huggingface上已经把modelling_glm的prefix_encoder更新了,估计很快就会把ptuning的代码push上来了吧。

also have the same problem. I also find @lucidrains 's diffusion models have this problem.