suayptalha commited on
Commit
0ff2ef1
·
verified ·
1 Parent(s): beb125c

Create configuration_minGRU.py

Browse files
Files changed (1) hide show
  1. configuration_minGRU.py +35 -0
configuration_minGRU.py ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from transformers import PretrainedConfig
2
+
3
+ class MinGRUConfig(PretrainedConfig):
4
+ model_type = "mingru"
5
+
6
+ def __init__(
7
+ self,
8
+ vocab_size=30522,
9
+ d_model=512,
10
+ ff_mult=4,
11
+ expansion_factor=2, # Bu parametreyi ihtiyaca göre değiştirebilirsiniz
12
+ depth=12,
13
+ n_layer=12,
14
+ pad_vocab_size_multiple=8,
15
+ initializer_range=0.02,
16
+ hidden_size=512,
17
+ hidden_dropout_prob=0.1,
18
+ num_labels=2,
19
+ **kwargs,
20
+ ):
21
+ self.vocab_size = vocab_size
22
+ self.d_model = d_model
23
+ self.ff_mult = ff_mult
24
+ self.expansion_factor = expansion_factor
25
+ self.depth = depth
26
+ self.n_layer = n_layer
27
+ self.hidden_size = hidden_size
28
+ self.pad_vocab_size_multiple = pad_vocab_size_multiple
29
+ self.initializer_range = initializer_range
30
+ self.hidden_dropout_prob = hidden_dropout_prob
31
+ self.num_labels = num_labels
32
+
33
+ # Yine, yukarıdaki parametreler dışında başka bir parametre eklemek isterseniz,
34
+ # kwargs ile eklemeyi unutmayın.
35
+ super().__init__(**kwargs)