shibing624 / MedicalGPT

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

使用Llama-2-13b-hf训练奖励模型报错 #417

Closed cqray1990 closed 2 months ago

cqray1990 commented 2 months ago

代码中已经有设置: if tokenizer.pad_token_id is None: if tokenizer.unk_token_id is not None: tokenizer.pad_token = tokenizer.unk_token else: tokenizer.pad_token = tokenizer.eos_token

则呢蜜还会提示pad_token 未定义呢,issues中每找到相关解决方法

raise ValueError("Cannot handle batch sizes > 1 if no padding token is defined.")

ValueError: Cannot handle batch sizes > 1 if no padding token is defined.

XiaozhuLove commented 2 months ago

403