Update llama.py
This commit is contained in:
parent
08ccd63882
commit
a2faeabb26
1 changed files with 4 additions and 1 deletions
|
|
@ -1055,7 +1055,10 @@ def CausalLM_fast_forward(fast_forward_inference):
|
|||
self.extra_ignored_labels = torch.full((self.max_seq_length, 1), -100, device = "cuda:0")
|
||||
pass
|
||||
|
||||
print(kwargs.get("num_items_in_batch", None) or kwargs.get("n_items", None))
|
||||
print(locals())
|
||||
print(args)
|
||||
print(kwargs)
|
||||
raise
|
||||
shift_labels = torch.hstack((labels[..., 1:], self.extra_ignored_labels[:labels.shape[0]]))
|
||||
loss = fast_cross_entropy_loss(
|
||||
logits = shift_logits,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue