THUDM / ChatGLM2-6B

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

[BUG/Help] ptuning微调之后向模型提问,返回空 #623

Open 2021QKA opened 10 months ago

2021QKA commented 10 months ago

Is there an existing issue for this?

Current Behavior

在经过Ptuning微调之后,无论是通过ptuning/README.md中给的代码还是直接使用仓库中ptuning/web_demo.sh(代码中的模型和检查点路径都已修改正确),向程序发送提问均无输出,有一条警告消息(Some weights of ChatGLMForConditionalGeneration were not initialized from the model checkpoint at module and are newly initialized: ['transformer.prefix_encoder.embedding.weight'] You should probably TRAIN this model on a down-stream task to be able to use it for predictions and inference.) 图片 图片

Expected Behavior

No response

Steps To Reproduce

train.sh中设置per_device_train_batch_size=4、gradient_accumulation_steps=4、其余均不修改

Environment

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

Anything else?

训练集是在ptuning/README.md中给的生成广告词的训练集前加入了一些我们的个人信息和给模型的自我认知(很少几条,如图),测试集直接用了ptuning/README.md生成广告词的dev.json 图片

helloimcx commented 9 months ago

+1,请问你解决这个问题了吗

Crosser-XDU commented 7 months ago

+1

LeoQianQY commented 7 months ago

我遇到了类似的问题,可以试试卸载gradio,重装3.40.0版本的gradio

Crosser-XDU commented 7 months ago

我遇到了类似的问题,可以试试卸载gradio,重装3.40.0版本的gradio

嗯,我重装了一下后可以运行了

2021QKA commented 7 months ago

我遇到了类似的问题,可以试试卸载gradio,重装3.40.0版本的gradio

非常感谢!