class composer.models.BERTHparams(initializers=<factory>, num_classes=None, model_config=<factory>, pretrained_model_name=None, use_pretrained=False, tokenizer_name=None, gradient_checkpointing=False)[source]#

YAHP interface for BERTModel.

  • model_config (Dict[str, JSON], optional) โ€“ A dictionary providing a HuggingFace model configuration.

  • pretrained_model_name (str, optional) โ€“ Pretrained model name to pull from Hugging Face Model Hub.

  • use_pretrained (bool, optional) โ€“ Whether to initialize the model with the pretrained weights.

  • tokenizer_name (str, optional) โ€“ The tokenizer used for this model, necessary to assert required model inputs. Default None.

  • gradient_checkpointing (bool, optional) โ€“ Use gradient checkpointing. default: False.