You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am very confused with this line: input_ids = torch.masked_fill(queries, ~attention_mask, 0)
It seems to replace the pad_token_id with 0, Why is this step necessary?
The text was updated successfully, but these errors were encountered:
luoyingyan
changed the title
confused with https://github.com/huggingface/trl/blob/main/trl/trainer/utils.py#L949
confused with function generation(), https://github.com/huggingface/trl/blob/main/trl/trainer/utils.py#L1323
Jan 17, 2025
I am very confused with this line: input_ids = torch.masked_fill(queries, ~attention_mask, 0)
It seems to replace the pad_token_id with 0, Why is this step necessary?
The text was updated successfully, but these errors were encountered: