Skip to content

您好大佬,请问 ”模型计算损失时会忽略标记"##回答:"之前的部分“ 这一块在您哪部分代码实现的?我好像没找到,感谢!! #10

Answered by charent
jackfsuia asked this question in Q&A
Discussion options

You must be logged in to vote

这个是 DataCollatorForCompletionOnlyLM实现的(from trl import DataCollatorForCompletionOnlyLM),你可以看下源码。直接看attention_mask也行。

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@jackfsuia
Comment options

Answer selected by jackfsuia
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants