From 40ae4fb9594bfcc02a942ac3420858094d87413f Mon Sep 17 00:00:00 2001 From: u010280923 Date: Fri, 10 Mar 2023 17:34:59 +0800 Subject: [PATCH] bug fixed --- src/dataset.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dataset.py b/src/dataset.py index 001424c..e65c312 100644 --- a/src/dataset.py +++ b/src/dataset.py @@ -305,7 +305,7 @@ class RMDataset(Dataset): def __getitem__(self, index): ctx_len = self.args.ctx_len - req_len = ctx_len + 1 + req_len = ctx_len prompt_prefer_idx, prompt_alter_idx, prompt_prefer_mask, prompt_alter_mask = self.data[index] prompt_prefer_idx = prompt_prefer_idx[: req_len] -- GitLab