ydshieh
commited on
Commit
·
75b4b63
1
Parent(s):
0f9bf0b
add config
Browse files- my_config.py +13 -0
my_config.py
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from transformers import PretrainedConfig
|
| 2 |
+
|
| 3 |
+
|
| 4 |
+
class MyModelConfig(PretrainedConfig):
|
| 5 |
+
model_type = "my_model"
|
| 6 |
+
|
| 7 |
+
def __init__(
|
| 8 |
+
self,
|
| 9 |
+
n_layers=2,
|
| 10 |
+
**kwargs,
|
| 11 |
+
):
|
| 12 |
+
self.n_layers = n_layers
|
| 13 |
+
super().__init__(**kwargs)
|