verl
verl copied to clipboard
[Question] Loss calculation on EOS tokens for SFT
We currently do not calculate loss on EOS tokens. Since this may lead to non-stop generation, should we mask out EOS tokens?https://github.com/volcengine/verl/blob/f0e7f9fcbe0126f29efad689690ef570bf8e9a7a/verl/utils/dataset/sft_dataset.py#L166-L167
The last token prediction is actually meaningless. token id [0, 1, 2, ... n-1] -> [1, 2, 3, .. n-1, ?]. The last token is not [EOS]
Oh I see. Thanks!