shibing624 / MedicalGPT

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

ValueError: The model does not have a language model head, please use a model that has one. #345

Closed cove1011 closed 3 months ago

cove1011 commented 3 months ago

Traceback (most recent call last): File "F:\xiazai\MedicalGPT-main\ppo_training.py", line 516, in main() File "F:\xiazai\MedicalGPT-main\ppo_training.py", line 270, in main model = AutoModelForCausalLMWithValueHead.from_pretrained( File "C:\Users\admin.conda\envs\newrlhf\lib\site-packages\trl\models\modeling_base.py", line 276, in from_pretrained model = cls(pretrained_model, multi_adapter_args, trl_model_args) File "C:\Users\admin.conda\envs\newrlhf\lib\site-packages\trl\models\modeling_value_head.py", line 112, in init raise ValueError("The model does not have a language model head, please use a model that has one.") ValueError: The model does not have a language model head, please use a model that has one.

shibing624 commented 3 months ago

https://github.com/shibing624/MedicalGPT/wiki/FAQ