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

data_collator有问题? #242

Open
applepieiris opened this issue Jun 19, 2023 · 2 comments
Open

data_collator有问题? #242

applepieiris opened this issue Jun 19, 2023 · 2 comments

Comments

@applepieiris
Copy link

在finetune.py内,def data_collator的第38行生成labels时,作者的做法是:
labels = ( [-100] * (seq_len - 1) + ids[(seq_len - 1) :] + [-100] * (longest - ids_l) )
我怎么觉得这里有点问题?labels不应该是target_sequence[start+1:]吗,我理解这里ids[seq_len-1]还属于source sequence的最后一个token,其实更应该是target sequence的第二个字符?
有人觉得这里会有疑问吗?

@annw0922
Copy link

请假一个问题,data_collator里不需要实现attention mask么?

@zzy347964399
Copy link

请假一个问题,data_collator里不需要实现attention mask么?

大佬您好,请问您解决了吗?我也想不明白

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

3 participants