Upload configuration_ltgbert.py with huggingface_hub
Browse files- configuration_ltgbert.py +36 -0
    	
        configuration_ltgbert.py
    ADDED
    
    | @@ -0,0 +1,36 @@ | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | 
|  | |
| 1 | 
            +
            from transformers.configuration_utils import PretrainedConfig
         | 
| 2 | 
            +
             | 
| 3 | 
            +
             | 
| 4 | 
            +
            class LtgbertConfig(PretrainedConfig):
         | 
| 5 | 
            +
                """Configuration class to store the configuration of a `LtgbertModel`.
         | 
| 6 | 
            +
                """
         | 
| 7 | 
            +
                def __init__(
         | 
| 8 | 
            +
                    self,
         | 
| 9 | 
            +
                    vocab_size=32768,
         | 
| 10 | 
            +
                    attention_probs_dropout_prob=0.1,
         | 
| 11 | 
            +
                    hidden_dropout_prob=0.1,
         | 
| 12 | 
            +
                    hidden_size=768,
         | 
| 13 | 
            +
                    intermediate_size=2048,
         | 
| 14 | 
            +
                    max_position_embeddings=512,
         | 
| 15 | 
            +
                    position_bucket_size=32,
         | 
| 16 | 
            +
                    num_attention_heads=12,
         | 
| 17 | 
            +
                    num_hidden_layers=12,
         | 
| 18 | 
            +
                    layer_norm_eps=1.0e-7,
         | 
| 19 | 
            +
                    output_all_encoded_layers=True,
         | 
| 20 | 
            +
                    temperature=1.0,
         | 
| 21 | 
            +
                    **kwargs,
         | 
| 22 | 
            +
                ):
         | 
| 23 | 
            +
                    super().__init__(**kwargs)
         | 
| 24 | 
            +
             | 
| 25 | 
            +
                    self.vocab_size = vocab_size
         | 
| 26 | 
            +
                    self.hidden_size = hidden_size
         | 
| 27 | 
            +
                    self.num_hidden_layers = num_hidden_layers
         | 
| 28 | 
            +
                    self.num_attention_heads = num_attention_heads
         | 
| 29 | 
            +
                    self.intermediate_size = intermediate_size
         | 
| 30 | 
            +
                    self.hidden_dropout_prob = hidden_dropout_prob
         | 
| 31 | 
            +
                    self.attention_probs_dropout_prob = attention_probs_dropout_prob
         | 
| 32 | 
            +
                    self.max_position_embeddings = max_position_embeddings
         | 
| 33 | 
            +
                    self.output_all_encoded_layers = output_all_encoded_layers
         | 
| 34 | 
            +
                    self.position_bucket_size = position_bucket_size
         | 
| 35 | 
            +
                    self.layer_norm_eps = layer_norm_eps
         | 
| 36 | 
            +
                    self.temperature = temperature
         | 
