Skip to content

Commit e4f73bc

Browse files
remove keys to incoporate changes for the trl update (axolotl-ai-cloud#2616)
1 parent bcb59c7 commit e4f73bc

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

src/axolotl/core/trainers/dpo/trainer.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -177,12 +177,8 @@ def tokenize_row(
177177
# dpo trainer may incorrectly prepend the bos_token_id to the dpo outputs
178178
if res["chosen_input_ids"][0] == processing_class.bos_token_id:
179179
res["chosen_input_ids"] = res["chosen_input_ids"][1:]
180-
res["chosen_labels"] = res["chosen_labels"][1:]
181-
res["chosen_attention_mask"] = res["chosen_attention_mask"][1:]
182180
if res["rejected_input_ids"][0] == processing_class.bos_token_id:
183181
res["rejected_input_ids"] = res["rejected_input_ids"][1:]
184-
res["rejected_labels"] = res["rejected_labels"][1:]
185-
res["rejected_attention_mask"] = res["rejected_attention_mask"][1:]
186182

187183
return res
188184

0 commit comments

Comments
 (0)