Skip to content

Commit

Permalink
fix to float32
Browse files Browse the repository at this point in the history
  • Loading branch information
Малахов Алексей Павлович committed Oct 21, 2024
1 parent 34e2895 commit 85d5045
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion turbo_alignment/dataset/chat/chat.py
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ def _encode(

encoded_record: dict[str, Any] = {
# 'id': record.id, FIXME: dont work with collators
'input_ids': torch.LongTensor(input_ids.astype(np.int64)),
'input_ids': torch.LongTensor(input_ids.astype(np.float32)),
'labels': torch.LongTensor(labels),
'attention_mask': torch.ones(input_ids.shape, dtype=torch.int64),
}
Expand Down

0 comments on commit 85d5045

Please sign in to comment.