From 86e223e5a36dbb6fd9673d7d4c2368d181b9061d Mon Sep 17 00:00:00 2001 From: fxmarty <9808326+fxmarty@users.noreply.github.com> Date: Wed, 17 Apr 2024 18:12:25 +0800 Subject: [PATCH] Update src/transformers/models/llama/modeling_llama.py Co-authored-by: Arthur <48595927+ArthurZucker@users.noreply.github.com> --- src/transformers/models/llama/modeling_llama.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/transformers/models/llama/modeling_llama.py b/src/transformers/models/llama/modeling_llama.py index f3204f5aaa8719..0046d9e67d1679 100644 --- a/src/transformers/models/llama/modeling_llama.py +++ b/src/transformers/models/llama/modeling_llama.py @@ -1077,10 +1077,6 @@ def _update_causal_mask( attention_mask, inputs_embeds=input_tensor, past_key_values_length=past_seen_tokens ): return None - - if ignore_causal_mask: - return None - dtype, device = input_tensor.dtype, input_tensor.device min_dtype = torch.finfo(dtype).min sequence_length = input_tensor.shape[1]