Represents models based on DeBERTa version 2.
References
He, P., Liu, X., Gao, J. & Chen, W. (2020). DeBERTa: Decoding-enhanced BERT with Disentangled Attention. doi:10.48550/arXiv.2006.03654
Super classes
AIFEMaster -> AIFEBaseModel -> BaseModelCore -> BaseModelDebertaV2
Methods
Inherited methods
AIFEMaster$get_all_fields()AIFEMaster$get_documentation_license()AIFEMaster$get_ml_framework()AIFEMaster$get_model_config()AIFEMaster$get_model_description()AIFEMaster$get_model_info()AIFEMaster$get_model_license()AIFEMaster$get_package_versions()AIFEMaster$get_private()AIFEMaster$get_publication_info()AIFEMaster$get_sustainability_data()AIFEMaster$is_configured()AIFEMaster$is_trained()AIFEMaster$set_documentation_license()AIFEMaster$set_model_description()AIFEMaster$set_model_license()BaseModelCore$calc_flops_architecture_based()BaseModelCore$count_parameter()BaseModelCore$create_from_hf()BaseModelCore$estimate_sustainability_inference_fill_mask()BaseModelCore$fill_mask()BaseModelCore$get_final_size()BaseModelCore$get_flops_estimates()BaseModelCore$get_max_seq_len()BaseModelCore$get_model()BaseModelCore$get_model_type()BaseModelCore$get_n_layers()BaseModelCore$get_special_tokens()BaseModelCore$get_tokenizer_statistics()BaseModelCore$load_from_disk()BaseModelCore$plot_training_history()BaseModelCore$print()BaseModelCore$save()BaseModelCore$set_publication_info()BaseModelCore$train()
BaseModelDebertaV2$configure()
Configures a new object of this class. Please ensure that your chosen configuration comply with the following guidelines:
hidden_size is a multiple of num_attention_heads.
Usage
BaseModelDebertaV2$configure(
tokenizer,
max_position_embeddings = 512L,
hidden_size = 768L,
num_hidden_layers = 12L,
num_attention_heads = 12L,
intermediate_size = 3072L,
hidden_act = "GELU",
hidden_dropout_prob = 0.1,
attention_probs_dropout_prob = 0.1
)Arguments
tokenizerTokenizerBaseTokenizer for the model.max_position_embeddingsintNumber of maximum position embeddings. This parameter also determines the maximum length of a sequence which can be processed with the model. Allowed values:\(10 <= x <= 4048\)
hidden_sizeintNumber of neurons in each layer. This parameter determines the dimensionality of the resulting text embedding. Allowed values:\(1 <= x <= 2048\)
num_hidden_layersintNumber of hidden layers. Allowed values:\(1 <= x \)
num_attention_headsintdetermining the number of attention heads for a self-attention layer. Only relevant ifattention_type='MultiHead'Allowed values:\(0 <= x \)
intermediate_sizeintdetermining the size of the projection layer within a each transformer encoder. Allowed values:\(1 <= x \)
hidden_actstringName of the activation function. Allowed values:'GELU'
'relu'
'silu'
'gelu_new'
hidden_dropout_probdoubleRatio of dropout. Allowed values:\(0 <= x <= 0.6\)
attention_probs_dropout_probdoubleRatio of dropout for attention probabilities. Allowed values:\(0 <= x <= 0.6\)