THUDM / ChatGLM2-6B

ChatGLM2-6B: An Open Bilingual Chat LLM | 开源双语对话语言模型
Other
15.73k stars 1.85k forks source link

[BUG/Help] <title>按照P-Tuning v2教程,推理出错 #562

Open tomdog163 opened 1 year ago

tomdog163 commented 1 year ago

Is there an existing issue for this?

Current Behavior

按照P-Tuning教程准备微调本地的chatglm模型,训练的时候没有问题。但是在执行推理的时候出现错误。 RuntimeError: The size of tensor a (192) must match the size of tensor b (64) at non-singleton dimension 3

Expected Behavior

No response

Steps To Reproduce

按照P-Tuning教程执行bash train.sh之后,执行bash evaluate.sh出现问题 image 这里报错,报错信息如下: RuntimeError: The size of tensor a (192) must match the size of tensor b (64) at non-singleton dimension 3 求大佬指导

Environment

- OS:Ubuntu 20.04
- Python:3.11
- Transformers:4.30.2
- PyTorch:2.0.1
- CUDA Support (`python -c "import torch; print(torch.cuda.is_available())"`) :True

Anything else?

No response