Delete config_fastesm.py
Browse files- config_fastesm.py +0 -90
config_fastesm.py
DELETED
|
@@ -1,90 +0,0 @@
|
|
| 1 |
-
from transformers.configuration_utils import PretrainedConfig
|
| 2 |
-
from transformers.utils import logging
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
logger = logging.get_logger(__name__)
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
class FastEsmConfig(PretrainedConfig):
|
| 9 |
-
model_type = "fast_esm"
|
| 10 |
-
|
| 11 |
-
def __init__(
|
| 12 |
-
self,
|
| 13 |
-
vocab_size=None,
|
| 14 |
-
mask_token_id=None,
|
| 15 |
-
pad_token_id=None,
|
| 16 |
-
hidden_size=768,
|
| 17 |
-
num_hidden_layers=12,
|
| 18 |
-
num_attention_heads=12,
|
| 19 |
-
intermediate_size=3072,
|
| 20 |
-
hidden_dropout_prob=0.1,
|
| 21 |
-
attention_probs_dropout_prob=0.1,
|
| 22 |
-
max_position_embeddings=1026,
|
| 23 |
-
initializer_range=0.02,
|
| 24 |
-
layer_norm_eps=1e-12,
|
| 25 |
-
position_embedding_type="absolute",
|
| 26 |
-
emb_layer_norm_before=None,
|
| 27 |
-
**kwargs,
|
| 28 |
-
):
|
| 29 |
-
super().__init__(pad_token_id=pad_token_id, mask_token_id=mask_token_id, **kwargs)
|
| 30 |
-
|
| 31 |
-
self.vocab_size = vocab_size
|
| 32 |
-
self.hidden_size = hidden_size
|
| 33 |
-
self.num_hidden_layers = num_hidden_layers
|
| 34 |
-
self.num_attention_heads = num_attention_heads
|
| 35 |
-
self.intermediate_size = intermediate_size
|
| 36 |
-
self.hidden_dropout_prob = hidden_dropout_prob
|
| 37 |
-
self.attention_probs_dropout_prob = attention_probs_dropout_prob
|
| 38 |
-
self.max_position_embeddings = max_position_embeddings
|
| 39 |
-
self.initializer_range = initializer_range
|
| 40 |
-
self.layer_norm_eps = layer_norm_eps
|
| 41 |
-
self.position_embedding_type = position_embedding_type
|
| 42 |
-
self.emb_layer_norm_before = emb_layer_norm_before
|
| 43 |
-
|
| 44 |
-
def to_dict(self):
|
| 45 |
-
"""
|
| 46 |
-
Serializes this instance to a Python dictionary. Override the default [`~PretrainedConfig.to_dict`].
|
| 47 |
-
|
| 48 |
-
Returns:
|
| 49 |
-
`Dict[str, any]`: Dictionary of all the attributes that make up this configuration instance,
|
| 50 |
-
"""
|
| 51 |
-
output = super().to_dict()
|
| 52 |
-
return output
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
def get_default_vocab_list():
|
| 56 |
-
return (
|
| 57 |
-
"<cls>",
|
| 58 |
-
"<pad>",
|
| 59 |
-
"<eos>",
|
| 60 |
-
"<unk>",
|
| 61 |
-
"L",
|
| 62 |
-
"A",
|
| 63 |
-
"G",
|
| 64 |
-
"V",
|
| 65 |
-
"S",
|
| 66 |
-
"E",
|
| 67 |
-
"R",
|
| 68 |
-
"T",
|
| 69 |
-
"I",
|
| 70 |
-
"D",
|
| 71 |
-
"P",
|
| 72 |
-
"K",
|
| 73 |
-
"Q",
|
| 74 |
-
"N",
|
| 75 |
-
"F",
|
| 76 |
-
"Y",
|
| 77 |
-
"M",
|
| 78 |
-
"H",
|
| 79 |
-
"W",
|
| 80 |
-
"C",
|
| 81 |
-
"X",
|
| 82 |
-
"B",
|
| 83 |
-
"U",
|
| 84 |
-
"Z",
|
| 85 |
-
"O",
|
| 86 |
-
".",
|
| 87 |
-
"-",
|
| 88 |
-
"<null_1>",
|
| 89 |
-
"<mask>",
|
| 90 |
-
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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