HenrySentinel commited on
Commit
590734c
·
verified ·
1 Parent(s): a43cd09

Add configuration class

Browse files
Files changed (1) hide show
  1. configuration_tinymind.py +19 -0
configuration_tinymind.py ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """TinyMind configuration."""
2
+ from transformers import PretrainedConfig
3
+
4
+
5
+ class TinyMindConfig(PretrainedConfig):
6
+ model_type = "tiny_smart_llm"
7
+
8
+ def __init__(self, vocab_size=50257, n_embd=256, n_heads=8, n_layers=6, max_seq_len=512, dropout=0.1, **kwargs):
9
+ self.vocab_size = vocab_size
10
+ self.n_embd = n_embd
11
+ self.n_heads = n_heads
12
+ self.n_layers = n_layers
13
+ self.num_hidden_layers = n_layers
14
+ self.hidden_size = n_embd
15
+ self.num_attention_heads = n_heads
16
+ self.max_seq_len = max_seq_len
17
+ self.max_position_embeddings = max_seq_len
18
+ self.dropout = dropout
19
+ super().__init__(**kwargs)