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

关于模型输入label的问题 #21

Open
shawroad opened this issue Aug 3, 2022 · 2 comments
Open

关于模型输入label的问题 #21

shawroad opened this issue Aug 3, 2022 · 2 comments

Comments

@shawroad
Copy link

shawroad commented Aug 3, 2022

您好,在gpt2这种生成模型中,输入的真实label不应该是和输入的input_ids错位吗?然后进行损失计算。 我看您代码中是没有错位的,因为什么原因呢? 谢谢了~

@syspider
Copy link

他复用了GPT2LMHeadModel这个类里的loss,这里面计算loss的时候已经错位了,你可以看源码

@shawroad
Copy link
Author

OK 我一般是自己实现这个loss,所以没细看

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