def transformer_en_de_512(dataset_name=None, src_vocab=None, tgt_vocab=None, pretrained=False,
                          ctx=cpu(), root=os.path.join(get_home_dir(), 'models'), **kwargs):
    r"""Transformer pretrained model.

    Embedding size is 400, and hidden layer size is 1150.

    Parameters
    ----------
    dataset_name : str or None, default None
    src_vocab : gluonnlp.Vocab or None, default None
    tgt_vocab : gluonnlp.Vocab or None, default None
    pretrained : bool, default False
        Whether to load the pretrained weights for model.
    ctx : Context, default CPU
        The context in which to load the pretrained weights.
    root : str, default '$MXNET_HOME/models'
        Location for keeping the model parameters.
        MXNET_HOME defaults to '~/.mxnet'.

    Returns
    -------
    gluon.Block, gluonnlp.Vocab, gluonnlp.Vocab
    """
    predefined_args = {'num_units': 512,
                       'hidden_size': 2048,
                       'dropout': 0.1,
                       'epsilon': 0.1,
                       'num_layers': 6,
                       'num_heads': 8,
                       'scaled': True,
                       'share_embed': True,
                       'embed_size': 512,
                       'tie_weights': True,
                       'embed_initializer': None}
    mutable_args = frozenset(['num_units', 'hidden_size', 'dropout', 'epsilon', 'num_layers',
                              'num_heads', 'scaled'])
    assert all((k not in kwargs or k in mutable_args) for k in predefined_args), \
           'Cannot override predefined model settings.'
    predefined_args.update(kwargs)
    encoder, decoder = get_transformer_encoder_decoder(units=predefined_args['num_units'],
                                                       hidden_size=predefined_args['hidden_size'],
                                                       dropout=predefined_args['dropout'],
                                                       num_layers=predefined_args['num_layers'],
                                                       num_heads=predefined_args['num_heads'],
                                                       max_src_length=530,
                                                       max_tgt_length=549,
                                                       scaled=predefined_args['scaled'])
    return _get_transformer_model(NMTModel, 'transformer_en_de_512', dataset_name,
                                  src_vocab, tgt_vocab, encoder, decoder,
                                  predefined_args['share_embed'], predefined_args['embed_size'],
                                  predefined_args['tie_weights'],
                                  predefined_args['embed_initializer'], pretrained, ctx, root)
r"""Transformer pretrained model.

    Embedding size is 400, and hidden layer size is 1150.

    Parameters
    ----------
    dataset_name : str or None, default None
    src_vocab : gluonnlp.Vocab or None, default None
    tgt_vocab : gluonnlp.Vocab or None, default None
    pretrained : bool, default False
        Whether to load the pretrained weights for model.
    ctx : Context, default CPU
        The context in which to load the pretrained weights.
    root : str, default '$MXNET_HOME/models'
        Location for keeping the model parameters.
        MXNET_HOME defaults to '~/.mxnet'.

    Returns
    -------
    gluon.Block, gluonnlp.Vocab, gluonnlp.Vocab