Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

关于rm中lm loss计算的疑问 #48

Open
DZ9 opened this issue Feb 5, 2024 · 1 comment
Open

关于rm中lm loss计算的疑问 #48

DZ9 opened this issue Feb 5, 2024 · 1 comment

Comments

@DZ9
Copy link

DZ9 commented Feb 5, 2024

reward_trainer.py这里,删除了lm_logits中最后一个token的概率分布,但是在下面的label里面是删除了第一个词,想问下这里是怎么对应的呢
image

@refrain-wbh
Copy link
Contributor

这是因为,logit是输出,而label or loss mask是输入。decoder架构(例如llama)预测next token,因此输入的token和输出的next token是对应关系。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants