Skip to content

Commit

Permalink
address copy mechanism
Browse files Browse the repository at this point in the history
  • Loading branch information
bytebarde committed Jan 28, 2024
1 parent e47ef13 commit 0c31cb3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/transformers/models/codegen/modeling_codegen.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0c31cb3

Please sign in to comment.