进行P-Tuning V2微调后推理时出现的问题:ValueError: not enough values to unpack (expected 2, got 1) #291
Closed
LittleGreenYuan
started this conversation in
Bad Case
Replies: 4 comments 2 replies
-
看到有人说 在代码里加一个检查 如果response里没有"\n",就 response = "\n" + response |
Beta Was this translation helpful? Give feedback.
0 replies
-
非常感谢您的建议,我去尝试一些这种方法,同时也对微调的answer进行格式化处理~ |
Beta Was this translation helpful? Give feedback.
0 replies
-
请问你解决了吗? |
Beta Was this translation helpful? Give feedback.
0 replies
-
这种方法是可以的绕过这个错误的,
修改成
相当于对产生的结果进行安全判断一次,但是这种情况出现的原因仍然没办法在微调后解决,即便已经输出的文本前添加了'\n'。 |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
所使用的是官方的微调脚本,在使用带有<|assistant|>和不带的prompt模板微调,在最新的实验中为每一次的回复添加了<|assistant|>\n,但都会在之后推理中出现该问题。
Beta Was this translation helpful? Give feedback.
All reactions