Update llama.py
This commit is contained in:
parent
860ba5ff1a
commit
e9fda7ab1d
1 changed files with 4 additions and 4 deletions
|
|
@ -707,9 +707,9 @@ def LlamaModel_fast_forward(
|
|||
# Ignore attention_mask
|
||||
if attention_mask is None:
|
||||
padding_mask = None
|
||||
# elif self.training:
|
||||
# attention_mask = None
|
||||
# padding_mask = None
|
||||
elif self.training:
|
||||
attention_mask = None
|
||||
padding_mask = None
|
||||
else:
|
||||
# if 0 in attention_mask:
|
||||
# padding_mask = attention_mask
|
||||
|
|
@ -1161,7 +1161,7 @@ def CausalLM_fast_forward(fast_forward_inference):
|
|||
if not return_dict:
|
||||
output = (logits,) + outputs[1:]
|
||||
return (loss,) + output if loss is not None else output
|
||||
print("***", logits.dtype, logits.shape)
|
||||
|
||||
return CausalLMOutputWithPast(
|
||||
loss=loss,
|
||||
logits=logits,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue