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

bug 计算sft损失的时候 #48

Open
shyoulala opened this issue Nov 24, 2023 · 2 comments
Open

bug 计算sft损失的时候 #48

shyoulala opened this issue Nov 24, 2023 · 2 comments

Comments

@shyoulala
Copy link

计算sft损失的时候label和logits貌似没有shift,是我理解有问题吗?
应该是new_logits = logits[:,:-1,:]

image

@shyoulala
Copy link
Author

这样:
image

@GanjinZero
Copy link
Owner

labels在DataCollatorForSupervisedDataset里shift过了

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