KhaldiAbderrhmane's picture
Upload config
981cfb7 verified
raw
history blame contribute delete
778 Bytes
from transformers import PretrainedConfig, AutoConfig
class BERTMultiGATAttentionConfig(PretrainedConfig):
model_type = "deberta_semantic_similarity"
def __init__(
self,
transformer_model='microsoft/deberta-v3-base',
hidden_size=768,
num_heads=8,
dropout=0.07,
gnn_input_dim=768,
gnn_hidden_dim=768,
**kwargs
):
super().__init__(**kwargs)
self.transformer_model = transformer_model
self.hidden_size = hidden_size
self.num_heads = num_heads
self.dropout = dropout
self.gnn_input_dim = gnn_input_dim
self.gnn_hidden_dim = gnn_hidden_dim
AutoConfig.register("deberta_semantic_similarity", BERTMultiGATAttentionConfig)