l294265421 / alpaca-rlhf

Finetuning LLaMA with RLHF (Reinforcement Learning with Human Feedback) based on DeepSpeed Chat
https://88aeeb3aef5040507e.gradio.live/
MIT License
103 stars 13 forks source link

Fix pad_token_id bug #10

Closed Ablustrund closed 1 year ago

Ablustrund commented 1 year ago

很感谢您的代码! 关于 alpaca_rlhf/deepspeed_chat/training/utils/data/data_utils.py#DataCollatorRLHF#call Fix pad_token_id bug 有一个疑惑的地方,可以看到data_utils.py中class PromptDataset(Dataset)函数最后一行,step3的return为 self.prompt_dataset[idx]["input_ids"],self.prompt_dataset[idx]["attention_mask"], self.pad_token_id 所以data[-1][-1]应该就是self.pad_token_id,原作者代码应该是没有bug的。 希望作者这里也可以确认一下~是否是我理解的bug

l294265421 commented 1 year ago

ad_token_id

嗯嗯,你是对的,我之前对这儿理解有误。README.MD已修改。

Ablustrund commented 1 year ago

ad_token_id

嗯嗯,你是对的,我之前对这儿理解有误。README.MD已修改。

很感谢您的确认!