[docs]defget_human_config(bert_type:Literal['tiny','small','base']="small",vocab_size:int=None,alibi_starting_size:int=512,)->BertConfig:""" Get the configuration for the human TCR BERT :param bert_type: The size of the BERT model. Must be one of 'tiny', 'small', or 'base' :param vocab_size: The size of the vocabulary :param alibi_starting_size: The size of the input sequence :return: The configuration for the human TCR BERT """ifbert_type=="tiny":config=get_config(**BERT_TINY)elifbert_type=="small":config=get_config(**BERT_SMALL)elifbert_type=="base":config=get_config()else:raiseValueError("bert_type must be one of 'tiny', 'small', or 'base'")ifvocab_sizeisnotNone:config["vocab_size"]=vocab_sizeconfig['alibi_starting_size']=alibi_starting_sizeconfig['attention_probs_dropout_prob']=0.0returnBertConfig.from_dict(config)
defget_mouse_config(bert_type:Literal['tiny','small','base']="small",vocab_size:int=None,alibi_starting_size:int=512,)->BertConfig:""" Get the configuration for the mouse TCR BERT :param bert_type: The size of the BERT model. Must be one of 'tiny', 'small', or 'base' :param vocab_size: The size of the vocabulary :param alibi_starting_size: The size of the input sequence :return: The configuration for the mouse TCR BERT """ifbert_type=="tiny":returnBertConfig.from_dict(get_config(extra_vocab_size=213,**BERT_TINY,))elifbert_type=="small":returnBertConfig.from_dict(get_config(extra_vocab_size=213,**BERT_SMALL))elifbert_type=="base":returnBertConfig.from_dict(get_config(extra_vocab_size=213))else:raiseValueError("bert_type must be one of 'tiny', 'small', or 'base'")