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

问题请教:将prompt token设置为-100即可不计算loss #268

Open
Xiefeng69 opened this issue Nov 25, 2023 · 0 comments
Open

问题请教:将prompt token设置为-100即可不计算loss #268

Xiefeng69 opened this issue Nov 25, 2023 · 0 comments

Comments

@Xiefeng69
Copy link

finetune.py - line 38:

labels = (
    [-100] * (seq_len - 1) + ids[(seq_len - 1) :] + [-100] * (longest - ids_l)
)

请问这里设置prompt token的label为-100的逻辑是什么呀~

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

1 participant