[feature] add deepspeed, rallio dialogue dataset and codegen parameters

This commit is contained in:
theblackcat102
2023-01-06 16:47:58 +00:00
parent f2db4220bb
commit b67181776a
8 changed files with 169 additions and 51 deletions
+1 -1
View File
@@ -7,7 +7,7 @@ class CrossEntropyLoss(nn.CrossEntropyLoss):
def forward(self, input, target, mask=None):
if mask is not None:
mask = mask.view(-1)
mask = mask.view(-1).bool()
input = input.view(-1, input.size(-1))
target = target.view(-1)
input = input[mask]