src/transformers/models/xmod/modeling_xmod.py/XmodAdapter/__init__
class XmodAdapter:    def __init__(self, config):
        super().__init__()
        self.bottleneck_size = config.hidden_size // config.adapter_reduction_factor
        self.dense1 = nn.Linear(config.hidden_size, self.bottleneck_size)
        self.dense2 = nn.Linear(self.bottleneck_size, config.hidden_size)
        if isinstance(config.hidden_act, str):
            self.adapter_act_fn = ACT2FN[config.hidden_act]
        else:
            self.adapter_act_fn = config.hidden_act