yangwang825
commited on
Commit
·
251c86c
1
Parent(s):
69a6b04
Upload config
Browse files- config.json +12 -6
- configuration_bert.py +25 -2
config.json
CHANGED
@@ -1,13 +1,14 @@
|
|
1 |
{
|
2 |
-
"
|
3 |
-
|
4 |
-
],
|
5 |
"attention_probs_dropout_prob": 0.1,
|
6 |
"auto_map": {
|
7 |
-
"AutoConfig": "configuration_bert.BertConfig"
|
8 |
-
"AutoModelForSequenceClassification": "modeling_bert.BertForSequenceClassification"
|
9 |
},
|
|
|
10 |
"classifier_dropout": null,
|
|
|
|
|
11 |
"hidden_act": "gelu",
|
12 |
"hidden_dropout_prob": 0.1,
|
13 |
"hidden_size": 768,
|
@@ -16,11 +17,16 @@
|
|
16 |
"layer_norm_eps": 1e-12,
|
17 |
"max_position_embeddings": 512,
|
18 |
"model_type": "bert",
|
|
|
19 |
"num_attention_heads": 12,
|
20 |
"num_hidden_layers": 12,
|
|
|
21 |
"pad_token_id": 0,
|
22 |
"position_embedding_type": "absolute",
|
23 |
-
"
|
|
|
|
|
|
|
24 |
"transformers_version": "4.33.3",
|
25 |
"type_vocab_size": 2,
|
26 |
"use_cache": true,
|
|
|
1 |
{
|
2 |
+
"affine": false,
|
3 |
+
"alpha": 1,
|
|
|
4 |
"attention_probs_dropout_prob": 0.1,
|
5 |
"auto_map": {
|
6 |
+
"AutoConfig": "configuration_bert.BertConfig"
|
|
|
7 |
},
|
8 |
+
"center": false,
|
9 |
"classifier_dropout": null,
|
10 |
+
"do_pcr": true,
|
11 |
+
"do_pfsa": true,
|
12 |
"hidden_act": "gelu",
|
13 |
"hidden_dropout_prob": 0.1,
|
14 |
"hidden_size": 768,
|
|
|
17 |
"layer_norm_eps": 1e-12,
|
18 |
"max_position_embeddings": 512,
|
19 |
"model_type": "bert",
|
20 |
+
"normalize": false,
|
21 |
"num_attention_heads": 12,
|
22 |
"num_hidden_layers": 12,
|
23 |
+
"num_iters": 1,
|
24 |
"pad_token_id": 0,
|
25 |
"position_embedding_type": "absolute",
|
26 |
+
"q": 5,
|
27 |
+
"r": 1,
|
28 |
+
"return_mean": true,
|
29 |
+
"return_std": true,
|
30 |
"transformers_version": "4.33.3",
|
31 |
"type_vocab_size": 2,
|
32 |
"use_cache": true,
|
configuration_bert.py
CHANGED
@@ -22,7 +22,18 @@ class BertConfig(PretrainedConfig):
|
|
22 |
pad_token_id=0,
|
23 |
position_embedding_type="absolute",
|
24 |
use_cache=True,
|
25 |
-
classifier_dropout=None,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
26 |
**kwargs,
|
27 |
):
|
28 |
super().__init__(pad_token_id=pad_token_id, **kwargs)
|
@@ -41,4 +52,16 @@ class BertConfig(PretrainedConfig):
|
|
41 |
self.layer_norm_eps = layer_norm_eps
|
42 |
self.position_embedding_type = position_embedding_type
|
43 |
self.use_cache = use_cache
|
44 |
-
self.classifier_dropout = classifier_dropout
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
22 |
pad_token_id=0,
|
23 |
position_embedding_type="absolute",
|
24 |
use_cache=True,
|
25 |
+
classifier_dropout=None,
|
26 |
+
affine=False,
|
27 |
+
q=5,
|
28 |
+
r=1,
|
29 |
+
center=False,
|
30 |
+
num_iters=1,
|
31 |
+
return_mean=True,
|
32 |
+
return_std=True,
|
33 |
+
normalize=False,
|
34 |
+
do_pcr=True,
|
35 |
+
do_pfsa=True,
|
36 |
+
alpha=1,
|
37 |
**kwargs,
|
38 |
):
|
39 |
super().__init__(pad_token_id=pad_token_id, **kwargs)
|
|
|
52 |
self.layer_norm_eps = layer_norm_eps
|
53 |
self.position_embedding_type = position_embedding_type
|
54 |
self.use_cache = use_cache
|
55 |
+
self.classifier_dropout = classifier_dropout
|
56 |
+
self.affine = affine
|
57 |
+
|
58 |
+
self.q = q
|
59 |
+
self.r = r
|
60 |
+
self.center = center
|
61 |
+
self.num_iters = num_iters
|
62 |
+
self.return_mean = return_mean
|
63 |
+
self.return_std = return_std
|
64 |
+
self.normalize = normalize
|
65 |
+
self.do_pcr = do_pcr
|
66 |
+
self.do_pfsa = do_pfsa
|
67 |
+
self.alpha = alpha
|