shibing624 / MedicalGPT

MedicalGPT: Training Your Own Medical GPT Model with ChatGPT Training Pipeline. 训练医疗大模型,实现了包括增量预训练(PT)、有监督微调(SFT)、RLHF、DPO、ORPO。
Apache License 2.0
3.24k stars 492 forks source link

inference.py和gradio_demo.py结果不一致 #238

Closed ozmemory closed 7 months ago

ozmemory commented 11 months ago

Describe the Question

模型:基于Baichuan2-13B-Chat 做qlora SFT并融合后的模型(加载时用了4bit量化) 问题:

  1. 使用inference.py进行推理,微调数据中的一些问题可以正确回答,但是使用gradio_demo.py推理,回答的结果就像完全没微调过一样。请问是有什么配置需要添加吗?
  2. 这个模型使用gradio_demo时,答案只显示了第一个词,然后这个词也消失了,回答的一栏最后就完全没结果。在代码里加log的话,后面的词其实是有正常生成的,只是不知为何没正常显示到web页面。我切换到原版的Baichuan2-13B-Chat也是一样。
shibing624 commented 11 months ago

gradio_demo可能有点问题,我看下

shibing624 commented 11 months ago

fixed. 1. update code;2. pip install gradio>=3.50.2

stale[bot] commented 9 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.(由于长期不活动,机器人自动关闭此问题,如果需要欢迎提问)