From 5060a334de16361a9f0da117c9e39162fbcf94c2 Mon Sep 17 00:00:00 2001 From: Cyril Vallez Date: Fri, 13 Dec 2024 14:07:01 +0000 Subject: [PATCH] remove layer_idx --- src/transformers/models/llama/modeling_llama.py | 1 - 1 file changed, 1 deletion(-) diff --git a/src/transformers/models/llama/modeling_llama.py b/src/transformers/models/llama/modeling_llama.py index 0b9897c61..b00c48766 100644 --- a/src/transformers/models/llama/modeling_llama.py +++ b/src/transformers/models/llama/modeling_llama.py @@ -269,7 +269,6 @@ class LlamaAttention(nn.Module): if self.config._attn_implementation != "eager": attention_interface = ALL_ATTENTION_FUNCTIONS[self.config._attn_implementation] - kwargs["layer_idx"] = self.layer_idx attn_output, attn_weights = attention_interface( self, query_states,