Upload config
Browse files- config.json +12 -0
- config.py +20 -0
config.json
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"auto_map": {
|
3 |
+
"AutoConfig": "config.CustomAIConfig"
|
4 |
+
},
|
5 |
+
"dropout": 0.2,
|
6 |
+
"model_type": "CustomAI",
|
7 |
+
"n_embd": 384,
|
8 |
+
"n_head": 4,
|
9 |
+
"n_layer": 4,
|
10 |
+
"transformers_version": "4.36.0.dev0",
|
11 |
+
"vocab_size": 1000
|
12 |
+
}
|
config.py
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
from transformers import PretrainedConfig
|
3 |
+
class CustomAIConfig(PretrainedConfig):
|
4 |
+
model_type = "CustomAI" # Change to the appropriate model type name
|
5 |
+
|
6 |
+
def __init__(
|
7 |
+
self,
|
8 |
+
vocab_size:int=1000,
|
9 |
+
n_embd:int=384,
|
10 |
+
n_head:int=4,
|
11 |
+
n_layer:int=4,
|
12 |
+
dropout:float=0.2,
|
13 |
+
**kwargs
|
14 |
+
):
|
15 |
+
self.vocab_size = vocab_size
|
16 |
+
self.n_embd = n_embd
|
17 |
+
self.n_head = n_head
|
18 |
+
self.n_layer = n_layer
|
19 |
+
self.dropout = dropout
|
20 |
+
super().__init__(**kwargs)
|