def __init__(self, config, layer_id=0):
    super().__init__()
    self.layer_id = layer_id
    self.attention_layers = config.attention_layers
    self.attention_type = self.attention_layers[layer_id]
    if (self.attention_type in ['global', 'local']):
        self.attention = GPTNeoSelfAttention(self.attention_type, config)
    else:
        raise NotImplementedError(f"Only attn layer types 'global' and 'local' exist, but got `config.attention_layers`: {config.attention_layers}. Select attn layer types from ['global', 'local'] only.")
def __init__(self, config, layer_id=0):
    super().__init__()
    self.layer_id = layer_id
    self.attention_layers = config.attention_layers
    self.attention_type = self.attention_layers[layer_id]
    if (self.attention_type in ['global', 'local']):
        self.attention = GPTNeoSelfAttention(self.attention_type, config)
    else:
        raise NotImplementedError(f"Only attn layer types 'global' and 'local' exist, but got `config.attention_layers`: {config.attention_layers}. Select attn layer types from ['global', 'local'] only.")