def METHOD_NAME(self, encoder_conf, head=None, freeze_encoder=False, checkpoint=None, override_checkpoint_head=False):
    from torchtext.models import RobertaBundle
    model = RobertaBundle.build_model(
        encoder_conf=encoder_conf,
        head=head,
        freeze_encoder=freeze_encoder,
        checkpoint=checkpoint,
        override_checkpoint_head=override_checkpoint_head,
    )
    model.to(device=self.device, dtype=self.dtype)
    return model