AzizBelaweid
commited on
fix labels
Browse files- modeling_pharia.py +1 -1
modeling_pharia.py
CHANGED
@@ -774,7 +774,7 @@ class PhariaForCausalLM(PhariaPreTrainedModel):
|
|
774 |
if self.training and labels is not None:
|
775 |
# Shift logits and labels for causal language modeling
|
776 |
shift_logits = logits[..., :-1, :].contiguous()
|
777 |
-
shift_labels =
|
778 |
|
779 |
# Flatten the tokens
|
780 |
shift_logits = shift_logits.view(-1, shift_logits.size(-1))
|
|
|
774 |
if self.training and labels is not None:
|
775 |
# Shift logits and labels for causal language modeling
|
776 |
shift_logits = logits[..., :-1, :].contiguous()
|
777 |
+
shift_labels = labels[..., 1:].contiguous()
|
778 |
|
779 |
# Flatten the tokens
|
780 |
shift_logits = shift_logits.view(-1, shift_logits.size(-1))
|