@classmethod
def from_pretrained(cls, vocab, name, **cfg):
    """Create a PyTT_TokenVectorEncoder instance using pre-trained weights
        from a PyTorch Transformer model, even if it's not installed as a
        spaCy package.

        vocab (spacy.vocab.Vocab): The spaCy vocab to use.
        name (unicode): Name of pre-trained model, e.g. 'bert-base-uncased'.
        RETURNS (PyTT_TokenVectorEncoder): The token vector encoder.
        """
    cfg['from_pretrained'] = True
    cfg['pytt_name'] = name
    model = cls.Model(**cfg)
    self = cls(vocab, model=model, **cfg)
    return self
