trl icon indicating copy to clipboard operation
trl copied to clipboard

packing = true ,sfttrainer ,how are the labels constructed now?

Open zhanglv0209 opened this issue 1 year ago • 1 comments

image

Without passing data_collator, there won't be DataCollatorForCompletionOnlyLM. Additionally, due to packing=True, data_collator won't default to DataCollatorForLanguageModeling, hence _prepare_dataset returns directly. Since it inherits from transformers Trainer, it's observed that data_collator=default_data_collator, thus ignoring label processing. Did I misunderstand?

QA:The typical input-output data for conventional sequence-to-sequence tasks are as follows: input_ids = input + output, labels = ignore + output. However, with packing=True, how are the labels constructed now?

zhanglv0209 avatar Feb 27 '24 03:02 zhanglv0209