Skip to content

Commit

Permalink
Fix BetterTransformer starcoder init (#1254)
Browse files Browse the repository at this point in the history
fix bug
  • Loading branch information
fxmarty authored Aug 4, 2023
1 parent 393113f commit 4189276
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion optimum/bettertransformer/models/decoder_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ class GPTBigCodeAttentionLayerBetterTransformer(BetterTransformerBaseLayer, GPTB

def __init__(self, layer: nn.Module, config: "PretrainedConfig"):
with torch.device("meta"):
super(BetterTransformerBaseLayer, self).__init__(config)
super(BetterTransformerBaseLayer, self).__init__(config, layer.is_cross_attention, layer.layer_idx)

self.module_mapping = None
submodules = ["c_attn", "c_proj"]
Expand Down

0 comments on commit 4189276

Please sign in to comment.