Abdurrahmanesc commited on
Commit
21deaae
·
verified ·
1 Parent(s): 79c7df8

Create configuration_tinygpt.py

Browse files
Files changed (1) hide show
  1. configuration_tinygpt.py +22 -0
configuration_tinygpt.py ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from transformers import PretrainedConfig
2
+
3
+ class TinyGPTConfig(PretrainedConfig):
4
+ model_type = "tinygpt"
5
+
6
+ def __init__(
7
+ self,
8
+ vocab_size=30522,
9
+ d_model=256,
10
+ n_heads=4,
11
+ n_layers=4,
12
+ d_ff=1024,
13
+ max_seq_len=256,
14
+ **kwargs
15
+ ):
16
+ super().__init__(**kwargs)
17
+ self.vocab_size = vocab_size
18
+ self.d_model = d_model
19
+ self.n_heads = n_heads
20
+ self.n_layers = n_layers
21
+ self.d_ff = d_ff
22
+ self.max_seq_len = max_seq_len