From 0c31cb3fd8a1d9d08e218550c5f93ed128702c9c Mon Sep 17 00:00:00 2001 From: bytebarde <154845754+bytebarde@users.noreply.github.com> Date: Sat, 27 Jan 2024 21:54:47 -0700 Subject: [PATCH] address copy mechanism --- src/transformers/models/codegen/modeling_codegen.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/transformers/models/codegen/modeling_codegen.py b/src/transformers/models/codegen/modeling_codegen.py index 1d3569feffa3e8..b73e5718ef5f84 100644 --- a/src/transformers/models/codegen/modeling_codegen.py +++ b/src/transformers/models/codegen/modeling_codegen.py @@ -264,7 +264,9 @@ def forward(self, hidden_states: Optional[torch.FloatTensor]) -> torch.FloatTens return hidden_states +# Copied from transformers.models.gptj.modeling_gptj.GPTJBlock with GPTJ->CodeGen class CodeGenBlock(nn.Module): + # Ignore copy def __init__(self, config): super().__init__() inner_dim = config.n_inner if config.n_inner is not None else 4 * config.n_embd