Aobangaming commited on
Commit
7c837d7
·
verified ·
1 Parent(s): c2f0c02

Update configuration_lightning.py

Browse files
Files changed (1) hide show
  1. configuration_lightning.py +27 -23
configuration_lightning.py CHANGED
@@ -1,27 +1,31 @@
1
  from transformers import PretrainedConfig
2
 
3
 
4
- class LightningConfig(PretrainedConfig):
5
- model_type = "lightning"
6
-
7
- def __init__(
8
- self,
9
- vocab_size=50000,
10
- d_model=256,
11
- nhead=4,
12
- num_layers=4,
13
- dropout=0.1,
14
- max_seq_len=160,
15
- **kwargs
16
- ):
17
- super().__init__(
18
- tie_word_embeddings=False,
19
- **kwargs
20
- )
21
-
22
- self.vocab_size = vocab_size
23
- self.d_model = d_model
24
- self.nhead = nhead
25
- self.num_layers = num_layers
26
- self.dropout = dropout
 
 
 
 
27
  self.max_seq_len = max_seq_len
 
1
  from transformers import PretrainedConfig
2
 
3
 
4
+ lass LightningConfig(PretrainedConfig):
5
+
6
+ model_type = "lightning"
7
+
8
+ def __init__(
9
+ self,
10
+ vocab_size=50000,
11
+ d_model=256,
12
+ nhead=4,
13
+ num_layers=4,
14
+ dropout=0.1,
15
+ max_seq_len=160,
16
+ **kwargs
17
+ ):
18
+ super().__init__(
19
+ tie_word_embeddings=False,
20
+ **kwargs
21
+ )
22
+
23
+ self.vocab_size = vocab_size
24
+ self.d_model = d_model
25
+ self.nhead = nhead
26
+ self.num_layers = num_layers
27
+ self.dropout = dropout
28
+ self.num_hidden_layers = num_layers
29
+ self.num_attention_heads = nhead
30
+ self.hidden_size = d_model
31
  self.max_seq_len = max_seq_len